cheat_sheets_ps
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
cheat_sheets_ps [2022/12/29 23:42] – [Example Code] gman | cheat_sheets_ps [2022/12/29 23:43] (current) – gman | ||
---|---|---|---|
Line 48: | Line 48: | ||
Write-Host "The value of var is: $var" | Write-Host "The value of var is: $var" | ||
} | } | ||
- | </ | ||
- | |||
- | ----===== Execution Policies ===== | ||
- | |||
- | PowerShell (PS) execution policies determine your authorization to execute PS scripts or not: | ||
- | - **Restricted: | ||
- | - **AllSigned: | ||
- | - **RemoteSigned: | ||
- | - Allows any PS script written on the local machine. | ||
- | - But requires downloaded scripts to be signed by a trusted publisher. | ||
- | - **Unrestricted: | ||
- | - **Bypass:** Allows any and all PS scripts. Have at it! | ||
- | |||
- | Syntax for changing the PowerShell execution policy: | ||
- | |||
- | < | ||
- | Set-ExecutionPolicy [name] | ||
- | # Example: | ||
- | Set-ExecutionPolicy RemoteSigned | ||
</ | </ | ||
cheat_sheets_ps.1672357355.txt.gz · Last modified: by gman