Powershell, enable windows update error

0

I'm trying to configure windows update with the Microsoft.Update.AutoUpdate COM object with Powershell v4, on a Windows 2008 r2. I'm however running into a little trouble. When trying to set the NotificationLevel, I'm getting the following error (Note running with elevated permissions).

$WUSettings = (New-Object -com "Microsoft.Update.AutoUpdate").Settings
$WUSettings.NotificationLevel=4
$WUSettings.save()

Output:

Exception setting "NotificationLevel": "Exception from HRESULT: 0x80240037" At line:1 char:1 + $WUSettings.NotificationLevel=4 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], SetValueInvocationException + FullyQualifiedErrorId : CatchFromBaseAdapterSetValueTI

Any help greatly appreciated!

powershell
windows-update
asked on Stack Overflow May 13, 2015 by jaspernygaard

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0