Share via

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

Butter Chicken 0 Reputation points
Apr 10, 2024, 3:40 AM

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,720 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 47,496 Reputation points
    Apr 10, 2024, 6:31 PM

    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.