Fehlermeldung Installation Schokoladig in der PowerShell

Ich versuche zu installieren Schokoladig zu verwenden mit PowerShell.

Ist der empfohlene Weg, um es zu installieren, ist das kopieren und einfügen der folgenden Zeile.

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

Aber ich bekomme die folgende Fehlermeldung:

At line:1 char:13
+ @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object  ...
+             ~~~~~~~~~~
Unexpected token '-NoProfile' in expression or statement.
At line:1 char:24
+ @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object  ...
+                        ~~~~~~~~~~~~~~~~
Unexpected token '-ExecutionPolicy' in expression or statement.
At line:1 char:150
+ ... nstall.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
+                    ~~
The token '&&' is not a valid statement separator in this version.
At line:1 char:1
+ @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object  ...
+ ~~~~~~~~~~~
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

ExecutionPolicy RemoteSigned " festgelegt ist, und ich bin mit Powershell v3

Ich habe versucht, einige gelten einige bits der installation code, anstatt die gesamte Zeile, sondern im Prinzip alles, was nach @Powershell ist ein unerwartetes token.

  • Es ist ein batch-Skript. Führen Sie das Skript in einem CMD Fenster, nicht in eine powershell-Konsole.
  • In meiner box die Zeile return-Fehler bei @powershell für die falsche Verwendung von splatting operator @
InformationsquelleAutor RafaelGP | 2013-02-08
Schreibe einen Kommentar