Solved

Get pager number from Active Directory based on fax list

Posted on 2013-01-02
1
758 Views
Last Modified: 2013-02-04
I have a raw list of fax numbers in a text file.  These fax numbers are all assigned to Active Directory users.  I'd like to use this list of fax numbers to build an AD query that will glean the following info....for each fax number, i need to know the matching SAMAccount name, display name, and most importantly, the pager field value.

I'm fairly new to powershell scripting, but this seems like something that should be easy to accomplish.  I have the Quest Active Roles management shell installed.  I was thinking I could run a get-qaduser command and combine it with for-each or perhaps use an ldap filter, however, I'm still a bit fuzzy on how the syntax would work out.  Please forgive my inexperience with this.
0
Comment
Question by:patriots
1 Comment
 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 500 total points
ID: 38736789
Just simply try this code in Quest powerShell
get-content c:\faxes.txt | %{ Get-QADUser -Fax $_ | Select sAMAccountName,DisplayName,Pager } | Export-CSV c:\users.csv

Open in new window


Regards,
Krzysztof
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question