Autoriser un depot Powershell

Pour valider une politique de dépôt en autorisé, il faut passer la commande suivante :

[pastacode lang= »markup » manual= »Set-PSRepository%20-Name%20’LENOMDEMONDEPOT’%20-InstallationPolicy%20Trusted » message= » » highlight= » » provider= »manual »/]

 

Exemple pour faire confiance au dépôt de Microsoft « PSGallery » :

Lister d’abord les autorisations des dépôts :

[pastacode lang= »markup » manual= »Get-PSRepository » message= » » highlight= » » provider= »manual »/]

puis changer les autorisations :

[pastacode lang= »markup » manual= »Set-PSRepository%20-Name%20’PSGallery’%20-InstallationPolicy%20Trusted » message= » » highlight= » » provider= »manual »/]

C’est tout.