Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

quest powershell commandlets to work like exchange powershell

Posted on 2014-01-24
3
Medium Priority
?
300 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

Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

Question has a verified solution.

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

This article will help you understand what HashTables are and how to use them in PowerShell.
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
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…

618 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