Public/Unlock-Account.ps1

function Unlock-Account {

    <#
    .SYNOPSIS
    -Taylor Lee
    Modified 05172019
 
    .DESCRIPTION
    Unlocks an Active Directory Account
 
    .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
    #>


    [CmdletBinding()]

    Param (
        [Parameter(Mandatory = $true)]$Username
    )

    Import-Module ActiveDirectory

    Unlock-ADAccount -identity $username

}