Determine installed PowerShell version

前端 未结 19 2375
半阙折子戏
半阙折子戏 2020-11-22 09:40

How can I determine what version of PowerShell is installed on a computer, and indeed if it is installed at all?

19条回答
  •  隐瞒了意图╮
    2020-11-22 10:02

    You can look at the built in variable, $psversiontable. If it doesn't exist, you have V1. If it does exist, it will give you all the info you need.

    1 >  $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    
    

提交回复
热议问题