Windows10FeatureUpdates
Windows10FeatureUpdates copied to clipboard
Process-SetupDiag.ps1 error
I had to change lines 187 and 189 or I got an Compliance error for Feature Update -ISetupDiag Results. If Setupdiag has never been run, you get an error.
New code starting at line 189 is:
If(Get-ItemProperty -Path $SetupDiagKeyPath -Name 'DateTime') { $NewDateTime = (Get-Date).GetDateTimeFormats()[72] $NewKey = New-ItemProperty -Path $SetupDiagKeyPath -Name 'DateTime' -Value $NewDateTime -PropertyType string -Force | Out-Null }
Get-item Property was missing the path and $NewKey | NewItemProperty was getting a pipeline error.
Added the -Path parameter on line 187 Change the $NewKey | to $NewKey = on line 189
This fixed the problem.