cnquery
cnquery copied to clipboard
MQL losses type
I would like to select a value from a variable depending on the operating system language.
cnspec> auditpolCredentialValidation = { "en-US": "Credential Validation", "de-DE": "Benutzerkontenverwaltung" }; auditpolCredentialValidation[windows.computerInfo['OsLocale']]
failed to compile: incorrect argument 0: expected string got dict
how to build it
cnspec> auditpolCredentialValidation = { "en-US": "Credential Validation", "de-DE": "Benutzerkontenverwaltung" }; auditpolCredentialValidation["de-DE"]
auditpolCredentialValidation[de-DE]: "Benutzerkontenverwaltung"
cnspec> windows.computerInfo['OsLocale']
windows.computerInfo.OsLocale: "de-DE"