You can change UserRoles of virtual machines on SCVMM 2012 SP1 with following command: 1 2 3 4 5 6 $VMs = Get-VM | Where Name -like "*CALL*" | Where UserRole -eq $Null foreach ($VM in $VMs) { $UserRole = Get-SCUserRole "MyUserRole" $VM | Set-VM -Owner "DOMAIN\Owner" -UserRole $UserRole } That will only change “null” [...]
↧