• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 594
  • Last Modified:

Powershell command or script

I  am looking for script or command to Fetch both AD user object and Exchange all attributes together  in same powershell command/script.  I can use get-aduser for AD and get-mailbox for exchange but togrther is not working.
0
vijaygotur
Asked:
vijaygotur
  • 2
1 Solution
 
Elmar KoschkaIT System EngineerCommented:
Please use following:

Get-QADUser | foreach { Get-Mailbox $_.name -ErrorAction silentlyContinue }
Or
Get-User | Get-Mailbox -errorAction silentlyContinue

I hope it helps?!
0
 
vijaygoturAuthor Commented:
Hi,
I can see few attributes are missing like homemdb, i want all attributes from both.
0
 
suriyaehnopCommented:
Get-AdUser -Identity <Username> -Properties *

To get information of attributes properties

Get-ADUser -Identity <Username> -Properties * | Get-Member
0
 
vijaygoturAuthor Commented:
Thanks i got required solution
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now