Is PowerShell Available?

As PowerShell becomes more important, you may want to automatically check whether it is available on a machine. To determine whether any PowerShell version is available, check whether this key is available: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1

You could do that from within PowerShell, too, but you won't be able to run it if PowerShell isn't available:

Test-Path registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1

Twitter This Tip! ReTweet this Tip!


Posted Sep 10 2009, 08:00 AM by ps1

Comments

Episode 83 – with Pragma Systems « PowerScripting Podcast wrote Episode 83 – with Pragma Systems « PowerScripting Podcast
on 09-13-2009 8:36 PM

Pingback from  Episode 83 – with Pragma Systems «  PowerScripting Podcast

Thomas Lee wrote re: Is PowerShell Available?
on 10-07-2009 10:22 AM
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.