Solved

quest powershell commandlets to work like exchange powershell

Posted on 2014-01-24
3
293 Views
Last Modified: 2014-01-25
Good evening I had a very good guy to help me with this script which works excellent in Exchange 2010. However, when I try to use this in a quest powershell it does not bring up the same amount of entries or is even quite as accurate. Here is the script below.

Get-Recipient -resultsize:unlimited |
 where {$_.emailaddresses -match "@domain.com" } | % {
      $Name = $_.displayname
      $_.emailaddresses | where {$_ -match "@domain.com" } |
      Select @{N="displayname";E={$Name}},@{N="emailaddresses";E={$_}}
}| Export-Csv C:\report.csv -nti



I tried to rewrite this using the following. It would be nice if I can learn how to run this against an environment and it saves the email domains in hash values and then display the domains one section at a time. Being desperate to get this done I would just settle for being able to just pick one domain at a time.

get-qadobject  -size 0 |
where {$_.emailaddresses -match "@domain.com" } | % {
      $Name = $_.displayname
      $_.emailaddresses | where {$_ -match "@domain.com" } |
      Select @{N="displayname";E={$Name}},@{N="emailaddresses";E={$_}}
}| Export-Csv C:\report.csv -nti
0
Comment
Question by:techdrive
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
Comment Utility
Use ProxyAddresses attribute with Get-QADobject
get-qadobject -ProxyAddress "*@Domain.com"  -size 0 |
% {
      $Name = $_.displayname
      $_.ProxyAddresses | where {$_ -match "@domain.com" } |
      Select @{N="displayname";E={$Name}},@{N="ProxyAddresses";E={$_}}
}| Export-Csv C:\report.csv -nti 

Open in new window

0
 

Author Comment

by:techdrive
Comment Utility
Subsun you are the almighty powershell king thanks man
0
 
LVL 40

Expert Comment

by:Subsun
Comment Utility
You are welcome!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
Set OWA language and time zone in Exchange for individuals, all users or per database.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

15 Experts available now in Live!

Get 1:1 Help Now