I haven’t touched Powershell in about 6 months and am stumped on a very easy question. I have a list of email address and I am trying to pull the AD accounts along with SAM names and SIP address from AD.
This is what I have so far, and I am able to pull single address at a time using -Filter and {mail -eq “youremail.com”} but I have close to 20,000 users to pull.
TLDR;
I need to make this line of code work with a variable that is a list of email address:
If you want all users who have a sip address you could do something like below and compare your email list to the results. Assuming you have really strict policies and the mail attribute corresponds to the primarysmtp.
Thanks Dan, I will attempt, all users on this list do have a sip Address, I just need to make sure their sip address match their UPN, SipProxy and email as well.