Jump to content

Recommended Posts

Posted

Hi,

 

Running Sevrer 2008R2 - I want to find a way to look through user's AD user properties, without having to right click their name > Properties > Telephone for each user. Specifically I want to see if their Pager and PO Box fields are populated.

 

Is there a way to manipulate AD to, for example, show the 'telephones' property tab, and be able to page through each user? Failing that, is there a way to generate a report of which users have info in, for example, the Pager field?

 

TIA.

Posted

Have you got Powershell on your DCs, or the RSAT tools on your PC with Powershell?

 

It should be a one-liner or possibly two.

 

Import-Module ActiveDirectory

Get-ADUser -filter * -properties pager,pobox | ft DisplayName, Pager, POBox -autosize

 

That's without testing!

  • Thanks 1
Posted
Thanks - Not done much of this before - how would I restrict this to a specific OU of users, rather than all users on the system? And, can I output to a text file?
Posted (edited)
Thanks - Not done much of this before - how would I restrict this to a specific OU of users, rather than all users on the system? And, can I output to a text file?

 

[color=#333333][i]Import-Module ActiveDirectory[/i][/color]
[color=#333333][i]Get-ADUser -filter * -searchbase "OU=Somewhere,DC=Domain,DC=Local" -properties pager,pobox | ft DisplayName, Pager, POBox -autosize
[/i][/color]

 

To output to a file just replace change it to:

 

For CSV

[color=#333333][i]Import-Module ActiveDirectory[/i][/color]
[color=#333333][i]Get-ADUser -filter * -searchbase "OU=Somewhere,DC=Domain,DC=Local" -properties pager,pobox | export-csv C:\File.csv
[/i][/color]

 

For Text file

[color=#333333][i]Import-Module ActiveDirectory[/i][/color]
[color=#333333][i]Get-ADUser -filter * -searchbase "OU=Somewhere,DC=Domain,DC=Local" -properties pager,pobox | Out-file C:\File.txt
[/i][/color]

Edited by halbaradkenafin

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...