pwsh
all
Shell and scripting language designed especially for system administration. This command refers to PowerShell version 6 and above (also known as PowerShell Core and cross-platform PowerShell). To use the original Windows version (5.1 and below, also known as the legacy Windows PowerShell), use `powershell` instead of `pwsh`.
More info →Examples (8)
Start an interactive shell session
Start an interactive shell session without loading startup configs
pwsh -NoProfileExecute specific commands
pwsh -Command "echo 'powershell is executed'"Execute a specific script
pwsh -File path/to/script.ps1Start a session with a specific version of PowerShell
pwsh -Version versionPrevent a shell from exit after running startup commands
pwsh -NoExitDescribe the format of data sent to PowerShell
pwsh -InputFormat Text|XMLDetermine how an output from PowerShell is formatted
pwsh -OutputFormat Text|XMLmade by @shridhargupta | data from tldr-pages