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

x
?
Solved

Get-MailboxDatabaseCopyStatus

Posted on 2014-09-23
3
Medium Priority
?
462 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
[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 29

Accepted Solution

by:
becraig earned 2000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 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