We help IT Professionals succeed at work.

Access is denied. Install-WindowsUpdate

Hi team,

[Server00]: PS C:\Users\dperezb\Documents> Install-WindowsUpdate

Confirm
Are you sure you want to perform this action?
Performing the operation "(13/02/2020 8:59:39) Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.281.594.0)[197MB]" on target
"MDMVFS01".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): A

X ComputerName Result     KB          Size Title
- ------------ ------     --          ---- -----
1 Server00     Accepted   KB2267602  197MB Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.281.594.0)
1 Server00     Accepted   KB4524244   67KB Security Update for Windows Server 2016 for x64-based Systems (KB4524244)
1 Server00     Accepted   KB4537764    1GB 2020-02 Cumulative Update for Windows Server 2016 for x64-based Systems (KB4537764)
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    + CategoryInfo          : NotSpecified: (:) [Get-WindowsUpdate], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,PSWindowsUpdate.GetWindowsUpdate

I connect with a administrator user.

Regards.
Comment
Watch Question

Distinguished Expert 2019

Hi.


" I connect with a administrator user." - that doesnot matter. You did not start powershell elevated, that's the reason.

Search powershell in the start menu, right click powershell.exe and select "run as administrator" and repeat.

David Pérez BonillaSystem Administrator

Author

Commented:
The same problem.
Distinguished Expert 2019

Ok. What happens if you run the windows update GUI?

David Pérez BonillaSystem Administrator

Author

Commented:
No problem.
Distinguished Expert 2019

So you have executed the installations successful already using the GUI?

Chris CadeyHead of IT

Are you running this remotely?

Head of IT

Microsoft by design doesn't let you run these commands remotely iirc.

Patrick BogersDatacenter platform engineer Lindows
Hi

Maybe this server is part off a cluster wherein the menitoned CU is wanting to update but your local admin has no authority over the cluster (partners)?

Cheers.
Distinguished Expert 2019

Chris will be right. The screenshot shows something that I didn't notice: [Server00] at the beginning. That is a remote session.