You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ConvertTo-DWord -RegistryKeyValue 4294967295
Exception calling "Parse" with "1" argument(s): "Value was either too large or too small for an Int32."
At line:43 char:13
+ $dwordRegistryKeyValue = [System.Int32]::Parse($singleReg ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : OverflowException
DSC configuration
- Key: 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\[rest of the path contains sensitive information]'
ValueName: Enabled
Ensure: Present
ValueData: 4294967295
ValueType: DWord
Force: true
Suggested solution
Change the type Int32 to UInt32 in ConvertTo-DWord. Probably also check if other types are correctly implemented.
Problem description
When providing a registry DWORD value above 2147483647 the function exits with an error message:
Value was either too large or too small for an Int32.
However the registry DWORD is of type UInt32 which accept no negative numbers but positivie numbers up to 4294967295.
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2
Verbose logs
DSC configuration
Suggested solution
Change the type Int32 to UInt32 in ConvertTo-DWord. Probably also check if other types are correctly implemented.
Operating system the target node is running
PowerShell version and build the target node is running
xPSDesiredStateConfiguration version
The text was updated successfully, but these errors were encountered: