Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Publish-DSCResourcePull {
- Param(
- [string[]]
- $Module
- )
- foreach ($ModuleName in $Module){
- $ModuleVersion = (Get-Module $ModuleName -ListAvailable).Version
- Compress-Archive -Update `
- -Path "$Env:PROGRAMFILES\WindowsPowerShell\Modules\$ModuleName\$ModuleVersion\*" `
- -DestinationPath "$Env:PROGRAMFILES\WindowsPowerShell\DscService\Modules\$($ModuleName)_$($ModuleVersion).zip"
- New-DscChecksum "$Env:PROGRAMFILES\WindowsPowerShell\DscService\Modules\$($ModuleName)_$($ModuleVersion).zip"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement