Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

PowerTip: Create Array in PowerShell

Summary: Use Windows PowerShell to easily create an array. (image)  Can I use Windows PowerShell to create an array of strings and avoid typing quotation marks            around all the strings? (image)  Instead of creating an array, such as this: $array = “a”,”b”,”c&rdquo...

Help Comparing Objects in PowerShell

Summary: Microsoft Scripting Guy, Ed Wilson, helps a reader compare two objects in Windows PowerShell. (image)  Hey, Scripting Guy! I am having a problem with a script. I wrote a function to compare virtual machines with virtual drives that I have on my hard drive, and it works just fine. But when I try to put the thing into a larger ...

PowerTip: Use PowerShell to See if Media Center is Installed

Summary: Use Windows PowerShell to determine if a Windows 8.1 has Media Center installed. (image)  How can I use Windows PowerShell to determine if a version of Windows 8.1 has Media Center installed? (image)  Use WMI and look at the Caption property of the Win32_OperatingSystem WMI class, for example: (Get-CimInstance...

Use PowerShell to Detect if Hypervisor is Present

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to determine if a hypervisor is present (image)  Hey, Scripting Guy! I have been trying to use WMI to determine if a server has the hypervisor present. I found the WMI class, and even the properties I need. But alas, the WMI class seems to be broken, and it ...