Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Get-MailboxDatabaseCopyStatus

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

WatchGuard Case Study: Museum of Flight

“With limited money and limited staffing, we didn’t have a lot of choices in terms of what we could do to bring efficiency. WatchGuard played a central part in changing that.” To provide strong, secure Wi-Fi access within the museum, Hunter chose to deploy WatchGuard’s AP120 APs.

Question has a verified solution.

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

A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
Eseutil Hard Recovery is part of exchange tool and ensures Exchange mailbox data recovery when mailbox gets corrupt due to some problem on Exchange server.
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…
Loops Section Overview

886 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