The gMan nixWiki

Because the mind is made of Teflon...

User Tools

Site Tools


cheat_sheets_ps

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
cheat_sheets_ps [2022/12/29 23:42] – [Example Code] gmancheat_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"
 } }
-</code> 
- 
-----===== Execution Policies ===== 
- 
-PowerShell (PS) execution policies determine your authorization to execute PS scripts or not:  
-  - **Restricted:** [default] Blocks all use of PS scripts 
-  - **AllSigned:** Requires PS scripts to e signed by a trusted publisher 
-  - **RemoteSigned:** This is a common "normal" setting in many systems... 
-    - Allows any PS script written on the local machine. 
-    - But requires downloaded scripts to be signed by a trusted publisher. 
-  - **Unrestricted:** Allows any PS script but prompts you for confirmation on downloaded scripts. 
-  - **Bypass:** Allows any and all PS scripts. Have at it! 
- 
-Syntax for changing the PowerShell execution policy:  
- 
-<code> 
-Set-ExecutionPolicy [name] 
-# Example: 
-Set-ExecutionPolicy RemoteSigned 
 </code> </code>
  
cheat_sheets_ps.1672357355.txt.gz · Last modified: by gman