Solved

Get-MailboxDatabaseCopyStatus

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Read this checklist to learn more about the 15 things you should never include in an email signature.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
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…

828 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