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]Products test failed #58

Closed
rileysea opened this issue Oct 17, 2020 · 2 comments · Fixed by #71
Closed

[UpdateServicesServer]Products test failed #58

rileysea opened this issue Oct 17, 2020 · 2 comments · Fixed by #71

Comments

@rileysea
Copy link

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

I have a specific array of Windows Products that I have entered for the "Products" portion in the UpdateServicesServer resource. When I attempt to load the DSC configuration, I get the following error during test/set:

Products test failed.
Cannot validate argument on parameter 'ErrorRecord'. The argument is null. Provide a valid value for the argument, and then try running the command again. At line:1 char:21 + $params = $args[0]; Set-TargetResource @params -Verbose + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Verbose logs showing the problem

See above

Suggested solution to the issue

Uncertain at this time. I switched to a single product for the configuration resource & it completed successfully. I believe it has something to do with my product list.

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

See the code here: https://github.com/microsoft/WindowsServerUpdateServicesConfig/blob/master/WindowsServerUpdateServicesConfig.ps1#L70-L73

The operating system the target node is running

N/A

Version and build of PowerShell the target node is running

Should be running PS 5.1

Version of the DSC module that was used

'UpdateServicesDsc' Version 1.2.1

@mvds-vdsc
Copy link

It seems that the problem is related to the fact that the same product title is used in different places in the WSUS product structure, for example Windows Server 2019 is used under Developer Tools and also under the Windows product group. I guess the code will need to be adjusted to use GUID's instead of Title to make this work because the title property is ambiguous.

@ericscheffler
Copy link

ericscheffler commented Mar 16, 2021

Piling on, I'm seeing this issue as well, but in a totally different context; my resource is configured as follows:

        # Set up WSUS
        UpdateServicesServer 'WSUSConfig'
        {
            Ensure     = 'Present'
            SQLServer  = "$sqlServer.$DomainName"
            ContentDir = "${disk}:\Software"
            SetupCredential = $DomainCreds
        }

The configuration compiles correctly and seems to set the correct values as verified in the registry, but I see the same output the OP posted above. After perusing the code the only instance I can find of the "ErrorRecord" parameter is in the PDT function, can someone verify what that function is doing? There might be something else going on in my config that might be interfering, would like to rule that out.

The operating system the target node is running
WS2019 Datacenter (Azure VM)

Version and build of PowerShell the target node is running

Name Value


PSVersion 5.1.14393.3866
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3866
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used
'UpdateServicesDsc' Version 1.2.1

**** Update to my comment above; after debugging the Set-TargetResource function the error seems to be triggered after executing line 663 of MSFT_UpdateServicesServer.psm1. I'm guessing the pipeline variable isn't getting populated? If I comment out lines 660-664 the full Set seems to run without issue.

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