Posted in
Virtual Machine Manager,
Windows Powershell,
Windows Server |
No Comment | 2,043 views | 24/06/2014 09:42
You can update all SCVMM agents with following script:
1
2
3
4
5
6
7
| $Credential = Get-SCRunAsAccount -Name "Domain_Account"
$HyperVHosts = Get-SCVMMManagedComputer
foreach ($HyperVHost in $HyperVHosts)
{
$ManagedComputer = Get-SCVMMManagedComputer -ComputerName $HyperVHost
Update-SCVMMManagedComputer -Credential $Credential -VMMManagedComputer $HyperVHost
} |
$Credential = Get-SCRunAsAccount -Name "Domain_Account"
$HyperVHosts = Get-SCVMMManagedComputer
foreach ($HyperVHost in $HyperVHosts)
{
$ManagedComputer = Get-SCVMMManagedComputer -ComputerName $HyperVHost
Update-SCVMMManagedComputer -Credential $Credential -VMMManagedComputer $HyperVHost
}
That will update all Hyper-V hosts agents as soon as possible.