tldr/pages/common/pwsh.md

26 lines
592 B
Markdown
Raw Normal View History

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