mirror of
https://github.com/PowerShell/PSDscResources
synced 2026-06-21 13:45:29 +00:00
simplifying logic in helper function
This commit is contained in:
@@ -1040,14 +1040,7 @@ function Test-TargetResourceOnNanoServer
|
||||
if ($_.FullyQualifiedErrorId -match 'UserNotFound')
|
||||
{
|
||||
# The user is not found
|
||||
if ($Ensure -eq 'Absent')
|
||||
{
|
||||
return $true
|
||||
}
|
||||
else
|
||||
{
|
||||
return $false
|
||||
}
|
||||
return ($Ensure -eq 'Absent')
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user