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
When processing boolean datatypes, the ConvertFrom-XmlNode function always returns true due to powershell conversion of string to bool vice int to bool:
PS C:\Users\user> [bool]0
False
PS C:\Users\user> [bool]1
True
PS C:\Users\user> [bool]"0"
True
PS C:\Users\user> [bool]"1"
True
In the switch statement, the value from XML is a string and so will always return true. Possible solution below would be to convert to int first and then boolean.
'boolean' { bool
break
}
The text was updated successfully, but these errors were encountered:
When processing boolean datatypes, the ConvertFrom-XmlNode function always returns true due to powershell conversion of string to bool vice int to bool:
PS C:\Users\user> [bool]0
False
PS C:\Users\user> [bool]1
True
PS C:\Users\user> [bool]"0"
True
PS C:\Users\user> [bool]"1"
True
In the switch statement, the value from XML is a string and so will always return true. Possible solution below would be to convert to int first and then boolean.
'boolean' {
bool
break
}
The text was updated successfully, but these errors were encountered: