1
我的PowerShell V2安裝在Windows XP SP3的機器上,當我今天去打開PowerShell的它說:Powerhsell v2中的崩潰上推出
The shell cannot be started. A failure occurred during initialization:
Object reference not set to an instance of an object.
在PowerShell事件日誌中的事件是:
Soruce: Powershell
Category: engine health
Event ID: 103
Settings: Object reference not set to an instance of an object.
Details:
ExceptionClass=NullReferenceException
ErrorCategory=
ErrorId=
ErrorMessage=Object reference not set to an instance of an object.
Severity=Error
SequenceNumber=
HostName=ConsoleHost
HostVersion=2.0
HostId=0fba5d45-885f-4f19-a354-4b390d5605bd
EngineVersion=2.0
RunspaceId=db9879d6-247a-40d7-9bfe-5bfd07a973f0
PipelineId=
CommandName=
CommandType=
ScriptName=
CommandPath=
CommandLine=
任何想法會導致這種情況?它似乎隨機開始。
得主運行以下命令的成功!非常感謝!我需要在密鑰中添加'HKEY_CURRENT_USER \ Environment'以及幾個條目。這似乎解決了一切。 – nat45928
我能夠通過添加一個用戶(而不是系統)PATH環境變量來解決這個問題;不使用註冊表創建所需的註冊表項。我的電腦>屬性>高級系統設置>環境變量>窗口的上半部分>新建> PATH和C:\ Windows \ System32>保存並確定。 –