【发布时间】:2014-03-18 17:05:32
【问题描述】:
我尝试按照此处的建议 (How do I set Windows Update to never check for updates with PowerShell?),它非常简单。一切似乎都在工作,直到我到达我需要实际更改 NotificationLevel 值的部分。我收到以下错误:Exception setting "NotificationLevel": "Exception from HRESULT: 0x80240037"
At line:1 char:1
+ $WUSettings.NotificationLevel=1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
+ FullyQualifiedErrorId : CatchFromBaseAdapterSetValueTI
我尝试在另一台 Windows 7 Pro 计算机上运行相同的序列,但得到的错误消息略有不同:Exception setting "NotificationLevel": "Exception from HRESULT: 0x80240037"
At line:1 char:13
+ $WUSettings. <<<< NotificationLevel=1
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException
我注意到的唯一区别是我尝试在 Windows 7 Pro 而不是 Windows Server 2008 R2 上执行此操作。这是我第一次尝试使用 PowerShell,这看起来很简单,但我现在很快就超出了我的深度。有什么建议吗?
【问题讨论】:
-
如果您在 Active Directory 环境中,最好通过 GPO 执行此操作。
-
@alroc 我们正在使用混合环境,在这种情况下,GPO 不是一个选项。
标签: windows powershell