How to change ownership of virtual machines via PowerShell with SCVMM 2008 R2

Just wanted to make everyone aware of a method to change the owner field of multiple VMs via Powershell, written by a colleague, Dave Guenthner.  This is a great method to use if you need to change the owner field of a lot of VMs at once.  Please visit his blog for more information.

* Where "%Domain\1stUser% is the current owner and "%Domain\2ndUser% is the desired owner

Get-VM -VMMServer "%YourVMMServername%" | where {$_.Owner -eq "%Domain\1stUser%"} | Set-VM -Owner "%Domain\2ndUser%"

 

Also be sure and check out the VMM08R2 Cmdlet Reference.  It is a great doc to read to learn about lots of cool tricks like this using Powershell to manage your VMM environment. Especially if you're one of those scripting guys :-)