|
|
@ -20,11 +20,12 @@
|
|
|
|
# POWERSHELL_COMMON
|
|
|
|
# POWERSHELL_COMMON
|
|
|
|
|
|
|
|
|
|
|
|
$params = Parse-Args $args;
|
|
|
|
$params = Parse-Args $args;
|
|
|
|
|
|
|
|
$state = Get-Attr $params "state" $null;
|
|
|
|
$result = New-Object PSObject;
|
|
|
|
$result = New-Object PSObject;
|
|
|
|
Set-Attr $result "changed" $false;
|
|
|
|
Set-Attr $result "changed" $false;
|
|
|
|
|
|
|
|
|
|
|
|
If ($params.state) {
|
|
|
|
If ($state) {
|
|
|
|
$state = $params.state.ToString().ToLower()
|
|
|
|
$state = $state.ToString().ToLower()
|
|
|
|
If (($state -ne 'present') -and ($state -ne 'absent') ) {
|
|
|
|
If (($state -ne 'present') -and ($state -ne 'absent') ) {
|
|
|
|
Fail-Json $result "state is '$state'; must be 'present', or 'absent'"
|
|
|
|
Fail-Json $result "state is '$state'; must be 'present', or 'absent'"
|
|
|
|
}
|
|
|
|
}
|
|
|
|