Reputation: 3529
I ran into this problem today. I have reduced my script to nothing but gci 'c:\'
and it is throwing this error.
Get-PSPath
clearly lists a C drive and I have not experienced any other significant PowerShell issues until today.
Upvotes: 3
Views: 5405
Reputation: 3529
The root of my issue appears to be a Windows 10 bug.
I had copied a path from the Security
tab of the Properties
dialog for a folder. This field now contains a non-printable character at the start.
Interestingly, when I copy/pasted it into my browser for this question, it got stripped out. The only way to diagnose it was to convert it to hex in Notepad++.
Upvotes: 3