2021-07-29 04:06:50 +01:00
|
|
|
# pwsh
|
|
|
|
|
|
|
|
> PowerShell Core is a cross-platform automation and configuration tool/framework.
|
2022-10-04 16:06:23 +01:00
|
|
|
> More information: <https://learn.microsoft.com/powershell/>.
|
2021-07-29 04:06:50 +01:00
|
|
|
|
|
|
|
- Start an instance of PowerShell:
|
|
|
|
|
|
|
|
`pwsh`
|
|
|
|
|
|
|
|
- Execute a script and then exit:
|
|
|
|
|
|
|
|
`pwsh -File {{path/to/file.ps1}}`
|
|
|
|
|
|
|
|
- Set the execution policy for the current session:
|
|
|
|
|
|
|
|
`pwsh -ExecutionPolicy {{AllSigned|Bypass|Default|RemoteSigned|Restricted|Undefined|Unrestricted}}`
|
|
|
|
|
|
|
|
- Execute a command and then exit:
|
|
|
|
|
|
|
|
`pwsh -Command {{command}}`
|