In Powershell, Invoke-expression is not working when entering space in the path

Question:

I have a query like when I try to execute the expression which contains a path with space, I am getting an error as below.

Code:

Could you please help me to fix this issue.?

Answer:

Use single quotes and a backtick (grave accent) to escape the space:


Or programmed:

Source:

In Powershell, Invoke-expression is not working when entering space in the path by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply