?
Solved

Get pager number from Active Directory based on fax list

Posted on 2013-01-02
1
Medium Priority
?
779 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

770 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