Public/Unlock-Account.ps1
function Unlock-Account { <# .SYNOPSIS -Taylor Lee Modified 05172019 .DESCRIPTION Unlocks an Active Directory Account .PARAMETER username Username of account being unlocked .NOTES Requires the Active Directory Module. .Example Use Get-lockedAccounts to quickly obtain the identity to use in the command. Get-LockedAccounts Unlock-ADAccount -identity JohnD .Link Get-DCLockoutEvents2 Get-LockedAccounts Get-PasswordExpired Set-Password Unlock-AllAccounts .Link https://github.com/TheTaylorLee/AdminToolbox #> [CmdletBinding()] Param ( [Parameter(Mandatory = $true)]$Username ) Import-Module ActiveDirectory Unlock-ADAccount -identity $username } |