#Enable DRA User
 
Function Enable-User ($UserName,$DRAServer)
    {
        $UserName = $UserName.split(",")        
        If ($DRAServer -eq "" -or $DRAServer -eq $null) {$DRAServer = "lackland.dra.us.af.mil"}
        $CN = "cn="
        $OU = ",OU=McGuire AFB Users,OU=McGuire AFB,OU=AFCONUSWEST,OU=Bases,DC=AREA52,DC=AFNOAPPS,DC=USAF,DC=MIL"
        <# Enable USER in DRA #>
        $count = $UserName.count
        $i = 1
        ForEach($User in $UserName)
            {
                $Percent = ($i/$count) * 100
                $ID = $CN+$User+$OU 
                Show-ProgressBar -Activity "Enabling $User" -PercentComplete $Percent  
                 Try
                    {
                               Enable-DRAUser -ErrorAction STOP `
                        -Domain $env:USERDNSDOMAIN `
                        –DRARestServer $DRAServer `
                        -DRARestPort 8755 `
                        –DRAHostServer $DRAServer `
                        –DRAHostPort 11192 `
                        -Identifier $ID `
                        -Force;
                    }
                Catch
                    {
                        Write-Host "Could not enable $User"
                    }
                $i++
            }
   
    }