From 101aa05c65124553c20b9b9824584b4272585f75 Mon Sep 17 00:00:00 2001 From: Emily Grace Seville Date: Tue, 31 Jan 2023 03:00:42 +1000 Subject: [PATCH] pwsh: refresh page (#7983) Co-authored-by: K.B.Dharun Krishna --- pages/common/pwsh.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pages/common/pwsh.md b/pages/common/pwsh.md index be3f7cb9b..a9f477546 100644 --- a/pages/common/pwsh.md +++ b/pages/common/pwsh.md @@ -1,20 +1,25 @@ # pwsh > PowerShell Core is a cross-platform automation and configuration tool/framework. +> See also: `powershell`. > More information: . -- Start an instance of PowerShell: +- Start an interactive shell session: `pwsh` -- Execute a script and then exit: +- Start an interactive shell session without loading startup configs: -`pwsh -File {{path/to/file.ps1}}` +`pwsh -NoProfile` -- Set the execution policy for the current session: +- Execute specific commands: -`pwsh -ExecutionPolicy {{AllSigned|Bypass|Default|RemoteSigned|Restricted|Undefined|Unrestricted}}` +`pwsh -Command "{{string}}"` -- Execute a command and then exit: +- Execute a specific script: -`pwsh -Command {{command}}` +`pwsh {{path/to/script.ps1}}` + +- Start an interactive shell session with a specific execution policy: + +`pwsh -ExecutionPolicy {{AllSigned|Bypass|Default|RemoteSigned|Restricted|...}}`