Command-line shell and scripting language designed especially for system administration. This command refers to PowerShell version 5.1 and below (also known as the legacy Windows PowerShell). To use the newer, cross-platform version of PowerShell (also known as PowerShell Core), use
pwsh
instead ofpowershell
. More information: https://learn.microsoft.com/windows-server/administration/windows-commands/powershell.
powershell
powershell -NoProfile
powershell -Command "{{echo 'powershell is executed'}}"
powershell -File {{path/to/script.ps1}}
powershell -Version {{version}}
powershell -NoExit
powershell -InputFormat {{Text|XML}}
powershell -OutputFormat {{Text|XML}}