Converting VBScript's ScriptEngineMinorVersion Function

Definition: Returns the minor version number of the scripting engine in use.


As you might expect, if you can use Windows PowerShell to determine the major version of the product you can also use it to determine the minor version. In fact, all you have to do is call the Get-Host Cmdlet and take a look at the value of the Version.Minor property. This command returns the minor version and stores it in the variable $a:

$a = (get-host).version.minor

When you run this command and then echo back the value of $a you should get the following, depending on which version of PowerShell you are running:


Return to the VBScript to Windows PowerShell home page