2021-07-29 04:06:50 +01:00
|
|
|
# pwsh
|
|
|
|
|
|
|
|
> PowerShell Core is a cross-platform automation and configuration tool/framework.
|
2023-01-30 17:00:42 +00:00
|
|
|
> See also: `powershell`.
|
2022-10-04 16:06:23 +01:00
|
|
|
> More information: <https://learn.microsoft.com/powershell/>.
|
2021-07-29 04:06:50 +01:00
|
|
|
|
2023-01-30 17:00:42 +00:00
|
|
|
- Start an interactive shell session:
|
2021-07-29 04:06:50 +01:00
|
|
|
|
|
|
|
`pwsh`
|
|
|
|
|
2023-01-30 17:00:42 +00:00
|
|
|
- Start an interactive shell session without loading startup configs:
|
2021-07-29 04:06:50 +01:00
|
|
|
|
2023-01-30 17:00:42 +00:00
|
|
|
`pwsh -NoProfile`
|
2021-07-29 04:06:50 +01:00
|
|
|
|
2023-01-30 17:00:42 +00:00
|
|
|
- Execute specific commands:
|
2021-07-29 04:06:50 +01:00
|
|
|
|
2023-01-30 17:00:42 +00:00
|
|
|
`pwsh -Command "{{string}}"`
|
2021-07-29 04:06:50 +01:00
|
|
|
|
2023-01-30 17:00:42 +00:00
|
|
|
- Execute a specific script:
|
2021-07-29 04:06:50 +01:00
|
|
|
|
2023-01-30 17:00:42 +00:00
|
|
|
`pwsh {{path/to/script.ps1}}`
|
|
|
|
|
|
|
|
- Start an interactive shell session with a specific execution policy:
|
|
|
|
|
|
|
|
`pwsh -ExecutionPolicy {{AllSigned|Bypass|Default|RemoteSigned|Restricted|...}}`
|