Un fichier trucmuch.ps1
Je tape :
Set-ExecutionPolicy Unrestricted -force
J’essaie :
Set-ExecutionPolicy Restricted
Lorsque je lance powershell.exe test.ps1
dans une fenêtre WindowsPowershell, j’ai en retour
File trucmuch.ps1 cannot be loaded because the execution of scripts is disabled on this system...
Une seule solution pour avoir la paix.
set-executionpolicy -executionpolicy unrestricted