mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
switch parameter to booleans
This commit is contained in:
parent
d4b6fc595b
commit
e8077d5c21
1 changed files with 8 additions and 0 deletions
|
|
@ -57,5 +57,13 @@ function Get-ParameterValue {
|
|||
}
|
||||
finally {}
|
||||
}
|
||||
|
||||
#Convert switch parameters to booleans so it converts nicely to json
|
||||
foreach ( $key in @($ParameterValues.Keys)) {
|
||||
if ($true -eq $ParameterValues[$key].IsPresent){
|
||||
$ParameterValues[$key]=$true;
|
||||
}
|
||||
}
|
||||
|
||||
return $ParameterValues
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue