-2

How can I use Active Directory Powershell or Exchange Management Shell to list all users and they're mobile numbers?

1
  • You should always post the research you have performed as well as code examples of what your trying.
    – Nick Young
    Jan 12, 2016 at 3:24

1 Answer 1

5

If you have the Active Directory PowerShell module from RSAT installed, you can use Get-ADUser cmdlet to retrieve all users and the value of their mobile attribute, like this:

Get-ADUser -Filter * -Properties mobile

Get-ADUser retrieves a number of attributes by default, if you don't need those, use Select-Object to pick out the ones you need:

Get-ADUser -Filter * -Properties mobile | Select-Object Name,Mobile
2
  • Thanks but I also get a lot of unwanted fields using that. I just want 2 columns, Name | Mobile and the users and mobiles listed underneath (similar output to EMS). Jan 7, 2016 at 10:19
  • 1
    Use Select-Object (updated answer) Jan 7, 2016 at 15:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .