1

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.

Chris
  • 3,400
  • 1
  • 27
  • 41

1 Answers1

1

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++.

Chris
  • 3,400
  • 1
  • 27
  • 41
  • Good to know. As for how to visualize hidden characters from within PowerShell, see [this question](https://stackoverflow.com/q/27233342/45375). – mklement0 Sep 27 '20 at 14:47