安装 dot net framework 4.5 和 Powershell 4.0 肯定出了问题
我尝试修复安装框架 4.5,甚至卸载并重新安装,但都没有帮助。
PS D:\Var\bin> get-command
get-command : Object reference not set to an instance of an object.
In Zeile:1 Zeichen:1
+ get-command
+ ~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-Command], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.GetCommandCommand
PS D:\Var\bin> $psversiontable
Name Value
---- -----
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.18408
BuildVersion 6.3.9600.16406
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2
PS D:\Var\bin> $Error.FullyQualifiedErrorId
System.NullReferenceException,Microsoft.PowerShell.Commands.GetCommandCommand