-
-
Save vexx32/0d74efc2f00721f33340df6de1b5ab2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-InactiveUser { | |
[CmdletBinding()] | |
param( | |
[Parameter()] | |
[uint32] | |
$Inactive = 90, | |
[Parameter()] | |
[ValidateSet('Disable','Move','Expired','NoLogon','DisabledAccounts')] | |
[string[]] | |
$Action | |
) | |
switch ($Action) { | |
'Disable' { | |
Write-Host "Disable was detected" | |
} | |
'Move' { | |
Write-Host "Move OU was detected" | |
} | |
'Expired' { | |
Write-Host "Expired accounts was selected" | |
} | |
'NoLogon' { | |
Write-Host "NoLogon was selected" | |
} | |
'DisabledAccounts' { | |
Write-Host "Finding all disabled accounts" | |
} | |
default { | |
Write-Host "Running default actions" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment