Solved

quest powershell commandlets to work like exchange powershell

Posted on 2014-01-24
3
294 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

The article will show you how you can maintain a simple logfile of all Startup and Shutdown events on Windows servers and desktops with PowerShell. The script can be easily adapted into doing more like gracefully silencing/updating your monitoring s…
In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

778 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