iSteve Posted September 21, 2015 Posted September 21, 2015 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.
howartp Posted September 21, 2015 Posted September 21, 2015 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! 1
iSteve Posted September 22, 2015 Author Posted September 22, 2015 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?
iSteve Posted September 22, 2015 Author Posted September 22, 2015 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?
halbaradkenafin Posted September 22, 2015 Posted September 22, 2015 (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 September 22, 2015 by halbaradkenafin
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now