SCVMM change owner of a virtual machine

Have you ever found yourself in a situation where you have a bunch of virtual machines (VMs) where the OWNER value is set to UNKNOWN or domain\administrator and you wanted to set a value owner without having to modify them one VM at a time?  There’s a PowerShell command that you can use to accomplish this.

Get-VM -VMMServer “FQDN of the SCVMM Server” | where {$_.Owner -eq “Unknown”} | Set-VM -Owner “domain\accountname”
Get-VM -VMMServer “FQDN of the SCVMM Server” | where {$_.Owner -eq “domain\Administrator”} | Set-VM -Owner “domain\accountname”