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

UpdateServicesServer unable to handle duplicate product name values #67

Closed
rileysea opened this issue Mar 30, 2021 · 2 comments · Fixed by #71
Closed

UpdateServicesServer unable to handle duplicate product name values #67

rileysea opened this issue Mar 30, 2021 · 2 comments · Fixed by #71

Comments

@rileysea
Copy link

Details of the scenario you tried and the problem that is occurring

Loading new products into an array under "UpdateServicesServer" DSC resource has failed due to WSUS now containing multiple product titles with the same name.

Verbose logs showing the problem

ERROR - An error occurred running method 'Set' in resource 'UpdateServicesServer' for resourceID '[UpdateServicesServer]UpdateServices': System.Management.Automation.MethodException: Cannot find an overload for "GetUpdateCategory" and the argument count: "1".

Suggested solution to the issue

Modify this code block to handle product names with the same title Code Reference

The DSC configuration that is used to reproduce the issue (as detailed as possible)

Not sharing the DSC configuration, since it's an array of products. But here is the example of multiple products returned from the $AllWsusProducts = $WsusServer.GetUpdateCategories() line that is pulling duplicate product titles.

Title                                                                               Description
-----                                                                               -----------
Windows Server 2016                                                                 Windows 10 Server
Windows Server 2016                                                                 Windows Server 2016
Windows Server 2019 and later, Servicing Drivers                                    Windows Server 2019 and later, Servicing Drivers
Windows Server 2019 and later, Upgrade & Servicing Drivers                          Windows Server 2019 and later, Upgrade & Servicing Drivers
Windows Server 2019 Datacenter: Azure Edition Hotpatch                              Windows Server 2019 Datacenter: Azure Edition
Windows Server 2019                                                                 Category for Windows Server 2019
Windows Server 2019                                                                 Windows Server 2019 (RS5 Server) and above

The operating system the target node is running

OsName               : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Version and build of PowerShell the target node is running

Name                           Value
----                           -----
PSVersion                      5.1.17763.1490
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.1490
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version of the DSC module that was used

1.2.0

@MartinVokurek
Copy link

This seems to be the same issue as in #61

@lopez1de
Copy link

I still got this error in 1.2.1.

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