Solved

Get-MailboxDatabaseCopyStatus

Posted on 2014-09-23
3
396 Views
Last Modified: 2014-09-24
Is there a way in Exchange 2010 to user a defined variable such as $exchnageserver = "srv1", "srv2" and pass these values to use in get-mailboxdatabasecopystatus -Server cmdlet in the Exchange Management Shell?  This would give me the result for various servers that I need to obtain this information for and I'd prefer not to have to do it one at  a time?
0
Comment
Question by:georgedschneider
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 40340162
 "srv1", "srv2" | %  { get-mailboxdatabasecopystatus -Server $_}

Open in new window

0
 

Author Comment

by:georgedschneider
ID: 40340213
What does the % signify?
0
 
LVL 29

Expert Comment

by:becraig
ID: 40340220
The % sign is a powershell alias for foreach:

PS C:\Users\Administrator\Desktop> get-alias

CommandType     Name                                               ModuleName
-----------     ----                                               ----------
Alias           % -> ForEach-Object
Alias           ? -> Where-Object
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

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
To show how to create a transport rule 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 Mail Flow >> Rules tab.:  To cr…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now