Hi All! I've been working on this script for quite a while and I seem to have run into a roadblock where I just cannot figure out what is going wrong. It's likely something to do with my $Userfound statement but I'm not sure how to fix it, so I am turning to the Spiceworks community to help. I am relatively new to Powershell so please keep that in mind.
$path=Read-Host-Prompt'Input full file path and name of the file you wish to analyze'$foundenabled=New-ObjectSystem.Collections.ArrayList$founddisabled=New-ObjectSystem.Collections.ArrayList$notfound=New-ObjectSystem.Collections.ArrayListImport-Csv$path|Foreach-Object{try{$UserFound=Get-ADUser-Identity$_.UserName-PropertiesipPhone,EmailAddress-ErrorActionStop}catch{}if($UserFound){if($UserFound.Enabled-eq$true){$foundenabled.Add((...