Which .NET version is my PowerShell script using? -


I want to use .NET in some PowerShell scripts, I'm about to write - how do I know / announce /

And it's possible that with which version does my script run .net? On PowerShell 2.0, just take a peek at the $ PSVersionTable variable:

  ps & gt; $ Value Adder Name Value --------- CLRVersion 2.0.50727.4927 Build Wars 6.1.7600.16385 PSWerson 2.0 WSMtech Version 2.0 PS Console Versus {1.0, 2.0} Serialization Version 1.1.0.1 PSR Remoting Prototol Variance 2.1  

on PowerShell 1.0, use [System.Environment] :: version :

  PS & gt; [Environment] :: Version major minor construction revision ----- ----- ----- -------- 2 0 50727 4927  
< / Html>

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -