Filter enabled AD users from CSV file
问题 I have a script to import a list of users and want to check if any of these users are disabled. I did try to run the script below but it doesn't filter the users in the CSV file it filters everyone in the entire organization. any suggestions would be appreciated. displayname and SIP address in one of the headers in the CSV file if needed to use the header. Import-CSV -Path .\Piscataway-+1732.csv | ForEach-Object { Get-ADUser -Filter "Enabled -eq '$true'" | select Enabled,EmailAddress