Scan PowerShell Installation and Version

This script receives a list of computers from a text file and then scans each one to determine if PowerShell is installed. If it is, the script then determines whether it is PowerShell 1.0 or 2.0. The script then returns the results to the screen.

1,375 times
Add to favorites
Operating System
E-mail Twitter Digg Facebook
  • Workaround when Default string value is empty
    1 Posts | Last post January 09, 2012
    • This script works great for querying for the Powershell version, so I modified it to check the version of several other applications, and couldn't understand why it wasn't working on only one of the queries.
      It took awhile to find it, but I finally noticed that the Default string value on one of the parent keys of the subkey I am querying, is an empty string.  It doesn't have the usual "value not set" parameter, and it looks like PowerShell might have a problem traversing that.  It comes back with key not found.  It will find the parent key, but no child subkeys that are below the parent that has the blank default value.
      Have you seen this before, and is there any way around this?  I have a ton of remote systems I want to verify what version they are at, and this script works great for several other apps I've used it for.  Just not on this one with the blank default key.