Are you just trying to set the accounts to the "Enabled" status?
If so, see if this helps:
Get-Content x:file.txt |
ForEach-Object{
$uname = $_ # needed because you can't use $_ in a "Catch" block for this value
if ($user = Get-ADUser -Filter {Name -eq $uname}){
Try{
$user | Set-ADUser -Enabled -ErrorAction STOP
}
Catch{
Write-Host "Failed to enable user '$uname'"
}
}
else{
Write-Host "Failed to find user '$uname'"
}