Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Help with Exchange Powershell

Posted on 2011-03-04
5
Medium Priority
?
311 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 2000 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
In this video we show how to create a Shared Mailbox 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 Recipients >> Sha…
This video discusses moving either the default database or any database to a new volume.

705 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