PowerShell one liner to get the operating systems of all your virtual machines in SCVMM

Every once in a while I go to a customer that has no clue what operating systems they are running inside their virtual machines. But when this is a datacenter managed with SCVMM, one simple line of PowerShell code is all I need to get the information I desire:

Get-VM –VMMServer SCVMM | Select-Object Name, OperatingSystem | ConvertTo-HTML | Out-File D:\Temp\VMOSList.html

This will provide a nice list with VM names and their operating systems:

Note that this command will look at the VM as they are known within SCVMM, not inside the VM!

Leave a Reply

Your email address will not be published. Required fields are marked *