Converting VBScript's ScriptEngine Function

Windows PowerShell

Definition: Returns a string representing the scripting language in use.


Not really applicable; after all, if you’re running Windows PowerShell you’re using the Windows PowerShell script engine. Still, you can use the Get-Host Cmdlet and the Version property to return information about which version of Windows PowerShell you’re running:

$a = (get-host).version

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

Major  Minor  Build  Revision
-----  -----  -----  --------
1      0      0      0

Return to the VBScript to Windows PowerShell home page