Created
July 29, 2017 23:22
-
-
Save kevinblumenfeld/2c43016e98231d58a680bac0fafc3f4b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$computers = "se-c-w7o13-3", "se-c-w10o10" | |
$scriptblock = { | |
$usession = $using:session | |
D: | |
cd D:\scripts | |
. .\Send-File.ps1 | |
Send-File -Source "\\source\msi\OfficeProPlus.msi" -Destination "C:\scripts\R\OfficeProPlus.msi" -Session $usession | |
} | |
$computers | % { | |
$session = New-PSSession $_ | |
Invoke-Command -ScriptBlock $scriptblock -AsJob -Session $session | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment