Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function Publish-DSCResourcePull {
  2. Param(
  3. [string[]]
  4. $Module
  5. )
  6.  
  7. foreach ($ModuleName in $Module){
  8.  
  9. $ModuleVersion = (Get-Module $ModuleName -ListAvailable).Version
  10.  
  11. Compress-Archive -Update `
  12. -Path "$Env:PROGRAMFILES\WindowsPowerShell\Modules\$ModuleName\$ModuleVersion\*" `
  13. -DestinationPath "$Env:PROGRAMFILES\WindowsPowerShell\DscService\Modules\$($ModuleName)_$($ModuleVersion).zip"
  14.  
  15. New-DscChecksum "$Env:PROGRAMFILES\WindowsPowerShell\DscService\Modules\$($ModuleName)_$($ModuleVersion).zip"
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement