2012-02-02 9 views
0

PowerShellを使用してリモートサーバーのWindows更新設定を変更しようとしていますが、以下のコマンドを実行するとエラーが表示されます。 RemotePSセッションでWindows Update COMオブジェクトを使用できません

PS C:\Windows\system32> Enter-PSSession opalisbinary 

[opalisbinary]: PS C:\Users\superv\Documents> $AUSettings = (New-Object -com "Microsoft.Update.AutoUpdate").Settings 
[opalisbinary]: PS C:\Users\superv\Documents> $AUSettings.NotificationLevel=2 
Property 'NotificationLevel' cannot be found on this object; make sure it exists and is settable. 
At line:1 char:14 
+ $AUSettings. <<<< NotificationLevel=2 
    + CategoryInfo   : InvalidOperation: (NotificationLevel:String) [], RuntimeException 
    + FullyQualifiedErrorId : PropertyNotFound 



[opalisbinary]: PS C:\Users\superv\Documents> $AUSettings.IncludeRecommendedUpdates=$true 


Property 'IncludeRecommendedUpdates' cannot be found on this object; make sure it exists and is settable. 
At line:1 char:14 
+ $AUSettings. <<<< IncludeRecommendedUpdates=$true 
    + CategoryInfo   : InvalidOperation: (IncludeRecommendedUpdates:String) [], RuntimeException 
    + FullyQualifiedErrorId : PropertyNotFound 

[opalisbinary]: PS C:\Users\superv\Documents> $AUSettings.Save() 


You cannot call a method on a null-valued expression. 
At line:1 char:18 
+ $AUSettings.Save <<<<() 
    + CategoryInfo   : InvalidOperation: (Save:String) [], RuntimeException 
    + FullyQualifiedErrorId : InvokeMethodOnNull 

私は、サーバー上でローカルに実行したときに、それが正常に動作しますが、

...

は、誰も私を助けてくださいでした。

答えて

0

リモートデスクトップ経由で接続してコマンドを実行すると機能しますか?それはまたbittnesに依存します。私はMicrosoft.Update.AutoUpdateを知らないので推測していますが、PowerShellのx64版で利用できますか?言い換えれば、x64バージョンとx86でローカルに実行すると、エラーが表示されますか?

+0

いいえRDP経由でサーバーにアクセスするときにコマンドを実行するとエラーが表示されない – PowerShell

+0

Ok、どのバージョンのPowerShellをRDP、x86、またはx64経由で実行しますか? – stej

0

申し訳ありませんが、私は本当の答えを見つけることができませんでした。私が見つけたのはthis linkで、リモートのPSセッションはSCCM 2012で使用できますが、SCCM 2007では使用できないと書いてあります。

これは役に立ちませんが、すべてのCOMオブジェクトがリモートPSセッション。

関連する問題