Solved

Get pager number from Active Directory based on fax list

Posted on 2013-01-02
1
745 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
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…
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 to another domain controller. Log onto the new domain controller with a user account t…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now