Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

quest powershell commandlets to work like exchange powershell

Posted on 2014-01-24
3
Medium Priority
?
301 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 2000 total points
ID: 39808620
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
ID: 39808659
Subsun you are the almighty powershell king thanks man
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39808664
You are welcome!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Screencast - Getting to Know the Pipeline

810 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