Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell Version

$
0
0

I have seen few PSP's are typed "host" for getting the Powershell Version but there is an issue if we are using "Enter-PSSession". We will not get expected result. See the output but there PS ver. is 2.

[JBL-ADS0034]: PS C:\> host


Name             : ServerRemoteHost
Version          : 1.0.0.0
InstanceId       : 5307c6d7-4545-4530-8235-e3d7ae6c28f8
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      :
IsRunspacePushed :
Runspace         :

Alway use $psversiontable for getting the PS ver.

[JBL-ADS0034]: PS C:\> $psversiontable

Name Value
---- -----
CLRVersion 2.0.50727.4927
BuildVersion 6.1.7600.16385
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1


Regards~Biswajit

Disclaimer: This posting is provided & with no warranties or guarantees and confers no rights.

MCP 2003,MCSA 2003, MCSA:M 2003, CCNA, MCTS, Enterprise Admin

MY BLOG

Domain Controllers inventory-Quest Powershell

Generate Report for Bulk Servers-LastBootUpTime,SerialNumber,InstallDate

Generate a Report for installed Hotfix for Bulk Servers



Viewing all articles
Browse latest Browse all 21975

Trending Articles