Solved

Help with Exchange Powershell

Posted on 2011-03-04
5
300 Views
Last Modified: 2012-05-11
1. In Exchange 2007 environment, we have three regions - emea, apac, ltam.

EMEA Hub Transports servers are along the naming convention of hub-emea1, hub-emea2, hub-emea3 etc.

APAC Hubs are hub-apac1, hub-apac2 and so on.

Sometimes I just want to search on the EMEA or APAC or LTAM Hubs.

Does anyone know how I can run a Powershell along the lines of:

Get-transport server -[EMEA Hub Transport servers only] | Get-messagetrackinglog -sender ....etc etc

2. Sometimes, I'd like to view details of Exchange certificates on other servers, I've tried

Get-Exchangeserver -identity mailboxserver1 | get-exchangecertificate

Does anyone know the correct way?

3. Finally, for, say Exch1-SG1-IS1 database, is there an easy way to find out the count of mailboxes on there?
0
Comment
Question by:kam_uk
[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
  • 3
  • 2
5 Comments
 
LVL 49

Expert Comment

by:Akhater
ID: 35042000
Get-transport | ?{ $_.name -like "*emea*"} | Get-messagetrackinglog -sender ....etc etc


>> 2. Sometimes, I'd like to view details of Exchange certificates on other servers, I've tried

As far as I know this won't work on exchange 2007 you will need exchange 2010 for it

>> 3. Finally, for, say Exch1-SG1-IS1 database, is there an easy way to find out the count of mailboxes on there?

$mbx = get-mailbox -database Exch1-SG1-IS -resultsize unlimited
$mbx.count
0
 
LVL 3

Author Comment

by:kam_uk
ID: 35044294
Thanks Akhater.

Couple of follow up questions..

#1: Get-transport | ?{ $_.name -like "*emea*"} | Get-messagetrackinglog -sender

Excellent, thanks very much for this. I've also seen people use the word "where" when specifying servers such as hub-emea1, hub-emea2 ,etc. Do you know if it's possible in this case or is  ?{ $_.name -like "*emea*"}  the only way?

#3: >> 3. Finally, for, say Exch1-SG1-IS1 database, is there an easy way to find out the count of mailboxes on there?

$mbx = get-mailbox -database Exch1-SG1-IS -resultsize unlimited
$mbx.count

Sorry, I should have mentioned, our EMEA Mailbox servers are also EMEA-Exch1, EMEA-Exch2, etc. Do you know how I would amend you query so I am only returned results for EMEA Mailbox servers?
0
 
LVL 49

Expert Comment

by:Akhater
ID: 35044305
#1

? is nothing by  a shortcut to where

#1: Get-transport | where { $_.name -like "*emea*"} | Get-messagetrackinglog -sender

is exactly the same

#3 I am not sure I understood your question you want the count of all mailboxes on emea-exch1 or emea-exch2 ? that's it ?
0
 
LVL 3

Author Comment

by:kam_uk
ID: 35044318
Hi Akhater

#1 Ah makes sense :) Thanks for clarifying that!

#3: I would like a count of mailboxes on all stores for servers starting with emea-exch* please?
0
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
ID: 35044401
Oki this should do it (sorry from the top of my head i can't test right now but it should be fine)

$servers = get-MailboxServer | ? { $_.name -like "emea-exch*"}
$mbxes = Get-Mailbox -ResultSize unlimited | ? {$servers -contains $_.servername}
$mbxes.count
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

710 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