Page History
...
- PowerShell is available for Windows servers by default.
- Consider the shebang in the first line of the job that indicates the PowerShell version in use:
- the string following string indicates use of
powershell.exe
from version 5.1:@@setlocal enabledelayedexpansion & @@findstr/v "
^@@[fs].*&" "%~f0" | powershell.exe -
NonInteractive -Command - & exit !errorlevel!/b&
- the following string indicates use of
powershellpwsh.exe
from version 5.1.the string 6 or 7:@@setlocal enabledelayedexpansion & @@findstr/v "
^@@[fs].*&" "%~f0" |
powershell.exe
pwsh.exe
from version 6 or 7.-NonInteractive -Command - & exit !errorlevel!/b&
- the string following string indicates use of
- Consider the shebang in the first line of the job that indicates the PowerShell version in use:
- PowerShell can be installed for Unix environments such as Linux and MacOS.
- Consider modifying the shebang in the first line of the job like this:
- the string
#!/usr/bin/env pwsh
can be used assuming thatpwsh
is the binary of the PowerShell interpreter.
- the string
- Consider modifying the shebang in the first line of the job like this:
...
Overview
Content Tools