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
{{ message }}
Repository navigation
A Severity setting that is not a hashtable ends Test-IntuneScript with a strict-mode error #105
The command ends with PropertyNotFoundStrict,Test-IntuneScript and the message The property 'Keys' cannot be found on this object. Verify that the property exists. The same happens for an IntuneScriptLab.settings.psd1 file that sets Severity = 'Error'.
Expected
SettingsInvalid,Test-IntuneScript, with a message that names the source (-Settings or the file) and says that Severity must be a hashtable of rule names, as every other value outside its set does. The help of the settings says a wrong value ends the command with SettingsInvalid.
Cause
The settings conversion reads $severityTable.Keys without first checking that the value is a dictionary. Under the module's Set-StrictMode -Version Latest, reading Keys from a string is a terminating error. The code is ConvertTo-IslSettingsObject on the #65 branches and the nested settings conversion of Get-IslSetting on main.
This is not a finding against ai-powershell-standards 2.0.0. It was found in a review of #100.
Activity