Windows Agent acting up.
-
Started PowerShell as an administrator and it threw a number of errors at me, so I took a look at the script in PowerShell(ISE) and don't see where the issue is myself. Some parameters are unexpected according to it, but removing the unexpected parameters also doesn't work. Windows, wasn't PowerShell supposed to just work like a terminal emulator sigh.
PS C:\WINDOWS\system32> @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin\" -y At line:1 char:13 + @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Ob ... + ~~~~~~~~~~ Unexpected token '-NoProfile' in expression or statement. At line:1 char:24 + @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Ob ... + ~~~~~~~~~~~~~~~~ Unexpected token '-ExecutionPolicy' in expression or statement. At line:1 char:152 + ... nt).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PA ... + ~~ The token '&&' is not a valid statement separator in this version. At line:1 char:1 + @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Ob ... + ~~~~~~~~~~~ The splatting operator '@' cannot be used to reference variables in an expression. '@powershell' can be used only as an argument to a command. To reference variables in an expression use '$powershell'. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken
-
You should be using command prompt instead of powershell to run that command.
-
@black3dynamite said in Windows Agent acting up.:
You should be using command prompt instead of powershell to run that command.
Well, bother, that'd do it!
-
@black3dynamite said in Windows Agent acting up.:
You should be using command prompt instead of powershell to run that command.
Whoopsie
-
@black3dynamite said in Windows Agent acting up.:
You should be using command prompt instead of powershell to run that command.
It's always the simple things.
-
@dbeato said in Windows Agent acting up.:
@black3dynamite said in Windows Agent acting up.:
You should be using command prompt instead of powershell to run that command.
Whoopsie
Exactly. I just default to opening PowerShell rather than a command prompt anymore.
-
Chocolatey's install page clearly states that is a command prompt command.
With the powershell command directly below it.. This is user fail from start to finish.
-
Aww JB, the little ray of sunshine in everyone's life.
-
@jaredbusch said in Windows Agent acting up.:
Chocolatey's install page clearly states that is a command prompt command.
With the powershell command directly below it.. This is user fail from start to finish.
That was like