?
Solved

quest powershell commandlets to work like exchange powershell

Posted on 2014-01-24
3
Medium Priority
?
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
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 antispam), the admini…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

800 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