Skip to main content

PowerShell Core is a cross-platform automation and configuration tool/framework.

# To start an instance of PowerShell:

# To execute a script and then exit:
pwsh -File <path/to/file.ps1>

# To set the execution policy for the current session:
pwsh -ExecutionPolicy <AllSigned|Bypass|Default|RemoteSigned|Restricted|Undefined|Unrestricted>

# To execute a command and then exit:
pwsh -Command <command>

# ---

# To run a PowerShell script/file in non-interactive mode (e.g. no prompting for missing values):
pwsh -NonInteractive -NoProfile -NoLogo -ExecutionPolicy ByPass -File <file.ps1>