Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Overview of this book

Table of Contents (22 chapters)
Microsoft Exchange 2010 PowerShell Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring archive mailbox quotas


As you enable archive mailboxes for end users and set up retention policies, you may find that the default limitations configured for archive mailboxes do not meet your needs. In this recipe, you'll learn how to modify archive mailbox quotas using the Exchange Management Shell.

How to do it...

  1. To modify the archive quota settings for a single mailbox, use the Set-Mailbox cmdlet:

    Set-Mailbox dsmith -ArchiveQuota 10gb -ArchiveWarningQuota 8gb
  2. To do this in bulk, use the Get-Mailbox cmdlet to retrieve the mailboxes that need to be updated and pipe the results to the Set-Mailbox cmdlet. For example, this one-liner would update all users in the DB01 database:

    Get-Mailbox -Database DB01 | 
      Where-Object {$_.ArchiveName} | 
        Set-Mailbox -ArchiveQuota 10gb -ArchiveWarningQuota 8gb

As you can see here, we're filtering the results of the Get-Mailbox cmdlet based on the ArchiveName property. If this property is defined, then we know that the user has an archive mailbox...