Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install-WindowsUpdate via Remote Call fails due to insufficient permissions #17

Open
JochenEckwerth opened this issue Apr 5, 2024 · 3 comments

Comments

@JochenEckwerth
Copy link

Our Powershell script operates from a central machine and cycles thru a bunch of virtual machines (Win2019, Win2022) in order to install the existing Windows updates using cmdlet "Install-WindowsUpdate".

eg.
.....
$Computer="SRV37V162"
Invoke-Command -ComputerName ($Computer) {Install-WindowsUpdate -ForceInstall -Verbose -AcceptAll}
.....

However, this results in the following error:

VERBOSE: Accepted [1] Updates ready to Download
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
+ CategoryInfo : NotSpecified: (:) [Get-WindowsUpdate], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,PSWindowsUpdate.GetWindowsUpdate
+ PSComputerName : SRV37V162

The Powershell is executed with Administrator privileges.

Jochen Eckwerth
Kaufmännische Krankenkasse
Hannover

@MaKaNu
Copy link

MaKaNu commented Apr 5, 2024

Funny we have similiar issue just at the same moment

@areis422
Copy link

areis422 commented May 1, 2024

Also seeing a similar issue:

Get-WUList -Verbose -Debug -AcceptAll -Install -IgnoreReboot -Computername HOSTNAME

DEBUG: 5/1/2024 10:15:47 AM ParameterSetName: Default
DEBUG: 5/1/2024 10:15:47 AM Set pre search criteria: IsInstalled = 0
DEBUG: 5/1/2024 10:15:47 AM Set pre search criteria: IsHidden = 0
DEBUG: 5/1/2024 10:15:47 AM Search criteria is: IsInstalled = 0 and IsHidden = 0
DEBUG: 5/1/2024 10:15:47 AM HOSTNAME: Connecting...
DEBUG: 5/1/2024 10:15:48 AM Module version: 2.2.1.4
DEBUG: 5/1/2024 10:15:48 AM Dll version: 2.2.1.4
DEBUG: 5/1/2024 10:15:49 AM UpdateSessionObj mode: Activator

Confirm
HOSTNAME: Unknown failure.
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): a
get-wulist : HOSTNAME: Unknown failure.
At line:1 char:1
+ get-wulist -Verbose -Install -AcceptAll -IgnoreReboot -ComputerName @ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (:) [Get-WindowsUpdate], Exception
    + FullyQualifiedErrorId : Unknown,PSWindowsUpdate.GetWindowsUpdate

This is after running Enable-WURemoting

@patch-work
Copy link

get-help Invoke-WUJob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants