

To reference variables in an expression use '$powershell'. can be used only asĪn argument to a command. The splatting operator cannot be used to reference variables in an expression. The token '&' is not a valid statement separator in this version. nstall.ps1'))" & SET PATH=%PATH% %systemdrive%\chocolatey\bin Unexpected token '-ExecutionPolicy' in expression or statement.

Unexpected token '-NoProfile' in expression or statement. + -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object. NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString(''))" & SET PATH=%PATH% %systemdrive%\chocolatey\binīut I get the following error: At line:1 char:13 The recommended way to install it is copy and paste the following line. I'm trying to install Chocolatey to use with PowerShell.
