PowerShell to Get OS Type and Count

This post was originally published on this site

My manager asked for the count of Windows Server 2012 virtual servers. So I did a fast and dirty script to get just the count of Server 2012

$server2012 = ((get-vm).extensiondata.guest | Where GuestFullName -eq "Microsoft Windows Server 2012 (64-bit)").count

After I provided the results from this, I worked to make it a better, more robust script.… Continue reading

The post PowerShell to Get OS Type and Count appeared first on Notes of a scripter.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.