Commit ba4b2d04 by Paul Durivage Committed by Matt Martz

Fix logic to ensure state is either present or absent

parent 630c0cf5
......@@ -37,8 +37,8 @@ Else {
If ($params.state) {
$state = $params.state.ToString().ToLower()
If (!($state -eq 'present') -or ($state -eq 'absent')) {
Fail-Json $result "state must be 'present' or 'absent'"
If (($state -ne 'present') -and ($state -ne 'absent')) {
Fail-Json $result "state is '$state'; must be 'present' or 'absent'"
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment