Last active
February 23, 2023 14:18
-
-
Save bizouarn/1c7e73a7d649344c9145fb3ff93e7ad9 to your computer and use it in GitHub Desktop.
Gestion des droits d'exécution des scripts powershell (temporairement)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stockage de l'ancienne règle | |
$OldPolicy = (Get-ExecutionPolicy -Scope CurrentUser) | Out-String | |
echo $OldPolicy # Affiche l'ancienne règle | |
# Ajout du Bypass | |
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser | |
# Pour annuler le Bypass (après éxecution des scripts) | |
Set-ExecutionPolicy -ExecutionPolicy $OldPolicy -Scope CurrentUser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment