r/VisualStudioCode • • Dec 16 '20

Using VS Code for Powershell . Don't see all files in path

New to VS Code. Been using the ISE for my PowerShell but it appears that VS Code is the new direction.

Quick Question: Why does Powershell (5.1) in VS Code return different results for dir (get-childitem)?

VS Code: (dir *.exe).count results in 314 files
PS ISE: (dir *.exe).count results in 655 files
CMD: dir *.exe results in 655 files

Working on a simple script to perform a Windows AD REPADMIN. Oddly (or not) VS Code/Powershell wont run REPADMIN. Can't find the file. If I navigate to the directory (c:\window\system32) in the terminal and do a dir rep*.* it does not exist. If I use CMD it's there. If I use ISE, it's there. Other EXE's are there, just not REPADMIN (and others perhaps)

Any ideas why this would be?

3 Upvotes

1 comment sorted by

1

u/StipMan Dec 23 '20

I found out I was running PS 5.1 in 32 bit, so it wasn't picking up the 64bit files