Closed HakonD closed 4 years ago
@HakonD thanks for this great suggestion. We will make appropriate fixes on the lines you have suggested in the upcoming releases.
@HakonD we have included changes for this in release v.3.1.1:
https://github.com/Esri/arcgis-powershell-dsc/releases/tag/v3.1.1
Closing this issue, but if this is still being encountered please feel free to reopen.
Community Note
Module Version
Affected Resource(s)
Windows
Configuration Files
Expected Behavior
Actual Behavior
We noticed that the Application event log on one of our customers sites filled up with Event ID 1035. Checking for the issue, I have found it on all inspected Windows servers with a DSC configuration and an installed arcgis module.
The culprit are line 288-289 in ArcGIS_Install.psm1, but there are also 18 other occurrences of Win32_product.
As far as I can see the two lines are not even necessary, as the Write-Verbose is the only use of the $ver variable. A quick fix is to comment out these two lines in the installed module, or remove the arcgis module after installation.
Microsoft has strongly advised against using the Win32_Product class for application queries.
https://docs.microsoft.com/en-us/troubleshoot/windows-server/admin-development/windows-installer-reconfigured-all-applications
The recommended approach to get this information seems to be use of registry as mentioned in this devblog article. https://devblogs.microsoft.com/scripting/use-powershell-to-quickly-find-installed-software/
Code example using registry:
Steps to Reproduce
Important Factoids
References