Skip to content

Commit

Permalink
Disable/Enable Unlimited Admin - correcting validation
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed May 29, 2021
1 parent fbb0c87 commit 2c32f8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions src/functions/configurations/Disable-UnlimitedAdmin.ps1
Expand Up @@ -57,17 +57,12 @@ function Disable-UnlimitedAdmin {
Write-Verbose "$($invokeParams.Method) $uri with:`n$($invokeParams.Body)`n"
try {
$restResponse = . $InvokeApi @invokeParams
Write-Verbose 'Unlimited Admin mode Disabled'
} catch {
Write-Warning 'Issue disabling Unlimited Admin Mode'
$err = $_
. $ErrorHandling $err
}

if ($restResponse) {
Write-Verbose 'Unlimited Admin mode Disabled'
} else {
Write-Warning 'Unlimited Admin mode has not been Disabled'
}
}
} else {
Write-Warning 'No valid session found'
Expand Down
7 changes: 1 addition & 6 deletions src/functions/configurations/Enable-UnlimitedAdmin.ps1
Expand Up @@ -57,17 +57,12 @@ function Enable-UnlimitedAdmin {
Write-Verbose "$($invokeParams.Method) $uri with:`n$($invokeParams.Body)`n"
try {
$restResponse = . $InvokeApi @invokeParams
Write-Verbose 'Unlimited Admin mode enabled'
} catch {
Write-Warning 'Issue enabling Unlimited Admin Mode'
$err = $_
. $ErrorHandling $err
}

if ($restResponse) {
Write-Verbose 'Unlimited Admin mode enabled'
} else {
Write-Warning 'Unlimited Admin mode has not been enabled'
}
}
} else {
Write-Warning 'No valid session found'
Expand Down

0 comments on commit 2c32f8f

Please sign in to comment.