Skip to content

Instantly share code, notes, and snippets.

@vexx32
Created April 28, 2019 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vexx32/0d74efc2f00721f33340df6de1b5ab2a to your computer and use it in GitHub Desktop.
Save vexx32/0d74efc2f00721f33340df6de1b5ab2a to your computer and use it in GitHub Desktop.
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