mgajda83 / PSWindowsUpdate

This module contain cmdlets to manage Windows Update Client.
MIT License
253 stars 24 forks source link

Running Updates via SSH #18

Closed MaKaNu closed 3 months ago

MaKaNu commented 3 months ago

I connected via SSH on my remote clients and tried to update the system. While Reading

Get-WUList

works, the installation of given update don't:

Get-WindowsUpdate -KBArticleID KB5034441 -Hide -Verbose

After questioned if I want to execute the upgrade the script fails with permission issues:

Get-WindowsUpdate : COM001: You don't have permission to perform this task.
In Zeile:1 Zeichen:1
+ Get-WindowsUpdate -KBArticleID KB5034441 -Hide -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-WindowsUpdate], Exception
    + FullyQualifiedErrorId : 0x80240044,PSWindowsUpdate.GetWindowsUpdate

Since the SSH Connection is estabilshed via admin-authorized keys I already thought I have elevated rights.

mgajda83 commented 3 months ago

This is a limitation of the Windows Update API itself. It must be run locally. Any remote session will return error.

MaKaNu commented 3 months ago

Wow, the windows world is similar restrictive as Apple as it comes to maintenance. I have a few hundred system to maintain, all different and my recent approach via ansible was only partial successful. Either somebody takes huge bite out of their budget or we should switch to a more maintainable system. Sorry for the rant but I had to write it down.

MaKaNu commented 3 weeks ago

Just hope this restriction will be changed... After the fall of WSUS and only official support for Intune or pricey third party tools, I have little hope that I will support windows any longer. This is such a ridiculous situation for small or public institutes, where available monetization is limited. Sorry for the rant. It is not meant to you, but something I can show in the future, if somebody ask why I am not able to support it anymore.