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.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,509 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 46,711 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 Answers by the question author, which helps users to know the answer solved the author's problem.