Install software on multiple computers simultaneous
Install software on multiple computers simultaneous.
Also, first make sure the server from which you install the software accepts the CredSSP connection.
1 |
icm { Enable-WSManCredSSP -Role Server -Force} -ComputerName NameOfTheServer |
You need to use CredSSP for authentication because Powershell has a build-in protection against multi-hop use.
Run the next code to install the software.
1 2 3 4 5 |
$cred = Get-Credential $allpcs = Get-ADComputer -Filter {(Name -like "wks*") -and (enabled -eq "true")} | Select-Object -expand Name Enable-WSManCredSSP -Role client -DelegateComputer $allepcs -Force icm {\\server\share\Setup.exe} -Computer $allpcs -Authentication Credssp -Credential $cred |