1

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?

2
  • Is this the complete code you're using? Is this the complete error message you're getting? Commented Aug 17, 2021 at 22:48
  • I've had this happen before. Don't paste the string, try to use tab-completion to set it for you. Then run the command and see if it happens again Commented Aug 17, 2021 at 22:51

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

You are right, there is an invisible character in between ls and the first ". This is because of copying and pasting something. I retyped the command manually and it works. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.