Search code examples
powershellonedrive

How do I list onedrive folder in powershell?


I have a onedrive folder mapped to my folder on my pc.

​Suppose I am at this path in powershell: "C:\Users\bob\OneDrive\MyContainer"

I type the following powershell command:

ls ​"C:\Users\bob\OneDrive\MyContainer"

The error message being returned is as follows:

Get-ChildItem: Cannot find drive. A drive with the name '​C' does not exist.

why does onedrive fail to work with powershell?


Solution

  • You seem to have an invisible character between ls and the first ".