Closed bobbybatatina closed 3 years ago
'PowerShellGet', 'PackageManagement' | % { $targetDir = "$env:ProgramFiles\WindowsPowerShell\Modules\$" $null = New-Item -Type Directory -Force $targetDir $fromComputer = 'ws1' # Specify the name of the other computer here. Copy-Item \$fromComputer\C$\LocalFolder\$** $targetDir -Recurse -Force if (-not (Get-ChildItem $targetDir)) { Throw "Copying failed." } }
'PackageManagement' |
'PowerShellGet', 'PackageManagement' | % { $targetDir = "$env:ProgramFiles\WindowsPowerShell\Modules\$" $null = New-Item -Type Directory -Force $targetDir $fromComputer = 'ws1' # Specify the name of the other computer here. Copy-Item \$fromComputer\C$\LocalFolder\$** $targetDir -Recurse -Force if (-not (Get-ChildItem $targetDir)) { Throw "Copying failed." } }