Advertisement
Old-Lost

Confirm-WSPGallery

Apr 7th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Import-Module PowerShellGet
  2. if (-not (Get-PSRepository -Name 'WSPGallery' -ErrorAction Ignore)) {
  3.     $paramRegisterPSRepository = @{
  4.         Name = 'WSPGallery'
  5.         SourceLocation = '\\enaaritt01\WSPGallery'
  6.         PublishLocation = '\\enaaritt01\WSPGallery\modules'
  7.         ScriptSourceLocation = '\\enaaritt01\WSPGallery'
  8.         ScriptPublishLocation = '\\enaaritt01\WSPGallery\scripts'
  9.         InstallationPolicy = 'Trusted'
  10.     }
  11.     Register-PSRepository @paramRegisterPSRepository
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement