How to fix "Unexpected token 'C:\Program' in expression or statement" error with Invoke-Expression

Butter Chicken 0 Reputation points
2024-04-10T03:40:58.0966667+00:00

User's image

After installing windows build tools, I have encountered this error. I tried reinstalling it and most of what chatgpt recommended me, but Conda isn't working and PowerShell also takes too long to load.

Loading personal and system profiles took 2792ms.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 48,026 Reputation points
    2024-04-10T18:31:58.19+00:00

    You'd have to (at least) provide the source code in your script for anyone to give you a definitive answer.

    However, just by looking at what's available it seems you might have a quoting problem.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.