Solved

Get-MailboxDatabaseCopyStatus

Posted on 2014-09-23
3
391 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 28

Accepted Solution

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

Open in new window

0
 

Author Comment

by:georgedschneider
Comment Utility
What does the % signify?
0
 
LVL 28

Expert Comment

by:becraig
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
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…
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…

763 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

12 Experts available now in Live!

Get 1:1 Help Now