Using Get-MailboxPlan in Powershell: All You Need Know

As an admin you already know, Microsoft Exchange Online provides a robust framework for email management, including the use of mailbox plans.

These plans are templates that define the properties and configurations for mailboxes in an organization. The Get-MailboxPlan cmdlet plays a vital role in helping administrators view and manage these mailbox plans effectively.

Using the Get-MailboxPlan cmdlet, administrators can retrieve information about existing mailbox plans in their Exchange Online environment. This cmdlet is especially useful when organizations need to verify configurations, assign licenses, or simply understand the mailbox options available to users. By leveraging this cmdlet, admins can enhance the management of their Office 365 environments, ensuring that users have access to the appropriate resources and capabilities they need.

This article provides an in-depth look at the Get-MailboxPlan cmdlet, exploring its syntax, parameters, practical uses, and how to implement it effectively in real-world scenarios.

What is the Get-MailboxPlan Cmdlet?

The Get-MailboxPlan cmdlet is designed for use in Exchange Online and is pivotal for retrieving information about mailbox plans within an organization's Exchange environment. A mailbox plan serves as a template that automatically configures mailbox properties based on the assigned license type when a user is licensed.

This streamlines mailbox management, allowing for uniform settings across various user accounts. For administrators who want to modify or apply mailbox plans, you can also reference the Set-MailboxPlan cmdlet guide for detailed instructions.

When an organization enrolls in Exchange Online, the mailbox plans available are determined by the selections made during enrollment and the age of the organization. This cmdlet helps administrators view a summary or detailed information about these mailbox plans, enabling them to make informed decisions regarding user mailbox configurations.

Syntax

Here is the official syntax as per Microsoft documentation:

Get-MailboxPlan

[[-Identity] <MailboxPlanIdParameter>]

[-AllMailboxPlanReleases]

[-Credential <PSCredential>]

[-Filter <String>]

[-IgnoreDefaultScope]

[-ResultSize <Unlimited>]

[-SortBy <String>]

[<CommonParameters>]

Parameters

  • Identity: Specifies the mailbox plan to view using a unique identifier such as name, alias, or GUID. If you do not specify a value, all mailbox plans are returned. Using $null or a value that does not exist can return all objects, but this behavior should be used with caution as it may produce unexpected results in scripts or automated processes.
  • AllMailboxPlanReleases: Includes mailbox plans from previous versions of the service in the results.
  • Credential: Allows the use of specific credentials to run the command, useful in scripts or when different permissions are needed.
  • Filter: Uses OPATH syntax to filter results based on specified properties and values. The filter must be enclosed in double quotation marks. For system values or property names that contain spaces, use single quotation marks around the value. Incorrect quotation usage can cause the cmdlet to fail.
  • IgnoreDefaultScope: Controls whether the cmdlet uses the default recipient scope. This parameter is intended for internal use and typically does not need to be set by administrators.
  • ResultSize: Specifies the maximum number of results to return. The default value is 1000, and 'unlimited' is used to return all requests that match the query.
  • SortBy: Determines the property to sort results by, such as Alias or DisplayName. Only one property can be specified at a time for sorting.

Practical Uses

1. Reviewing Available Mailbox Plans for User Licensing

In many organizations, administrators need to review the existing mailbox plans to ensure that users have the appropriate licenses assigned. By using Get-MailboxPlan, administrators can quickly pull a list of all available mailbox plans, which can help in determining which plan is suitable for each user based on their role and needs. This is particularly vital when an organization is scaling up and adding new users or when changes in licensing requirements occur.

2. Auditing Mailbox Plan Properties

Organizations often have specific policies regarding mailbox configurations, including storage limits and retention policies. By retrieving detailed information about mailbox plans with Get-MailboxPlan -Identity, administrators can audit the properties of each plan. This helps ensure compliance with internal policies and regulatory requirements, as they can verify that users are assigned plans that meet the organization's standards for email management.

3. Troubleshooting User Mailbox Issues

When users encounter problems with their mailboxes, such as missing features or storage limits being reached, it can be beneficial to check the mailbox plan they are assigned. Using Get-MailboxPlan allows administrators to cross-reference a user’s mailbox plan with the expected features and limits. This can help identify whether the issue lies with the assigned plan or if there is a different underlying problem affecting the mailbox.

Prerequisites

Before using the Get-MailboxPlan cmdlet, ensure the following requirements are met:

  • You must have the View-Only Organization Management or Organization Management role in Exchange Online.
  • The cmdlet is only available in Exchange Online and not in on-premises Exchange environments.
  • Familiarity with PowerShell and the ExchangeOnlineManagement module is required for effective usage.

How to Use Get-MailboxPlan: 6 Practical Uses

This section will introduce several practical examples of using the Get-MailboxPlan cmdlet in real-world scenarios. Understanding how to leverage this cmdlet will enhance your ability to manage mailbox configurations in Exchange Online.

1. Retrieve All Mailbox Plans

Command:

Get-MailboxPlan

This command returns a summary list of all mailbox plans in your organization. It’s a starting point for administrators who need to familiarize themselves with the available plans, especially in larger organizations with multiple licensing options. Reviewing this list can provide insights into which plans are most commonly used and help identify any plans that may no longer be relevant.

2. View Detailed Information for a Specific Mailbox Plan

Command:

Get-MailboxPlan -Identity "ExchangeOnlineEnterprise" | Format-List

By specifying the -Identity parameter, this command retrieves detailed information about the "ExchangeOnlineEnterprise" mailbox plan. Understanding the specifics of different mailbox plans, such as storage limits and features, is important when considering which plan to assign to new users or when evaluating current user configurations.

3. Filter Mailbox Plans by Specific Criteria

Command:

Get-MailboxPlan -Filter "StorageLimit -eq 50GB"

Using the -Filter parameter, this command retrieves mailbox plans that have a storage limit of 50GB. This is particularly useful when organizations need to find plans that meet specific requirements, such as storage capacity or feature sets, allowing for more tailored user assignments.

4. Include Previous Versions of Mailbox Plans

Command:

Get-MailboxPlan -AllMailboxPlanReleases

This command includes mailbox plans that were used in previous versions of the service. This is beneficial for organizations that have migrated from older versions and need to ensure that all plans are accounted for when managing users and their licenses.

5. Sorting Mailbox Plans

Command:

Get-MailboxPlan -SortBy "DisplayName"

This command sorts the mailbox plans by their display names. Sorting can help administrators quickly locate specific plans within a long list, making it easier to manage user assignments and understand available options.

6. Limit the Number of Results Returned

Command:

Get-MailboxPlan -ResultSize 5

By using the -ResultSize parameter, administrators can limit the number of results returned by the command.

This is particularly useful when working in large environments where the number of mailbox plans may be extensive, allowing for more manageable output during analysis.

Final Note

The Get-MailboxPlan cmdlet is an essential tool for managing mailbox plans in Exchange Online. By understanding its usage and parameters, administrators can efficiently handle mailbox configurations, ensuring that users have the right resources and capabilities.

Whether reviewing available plans, auditing properties, or troubleshooting issues, this cmdlet is vital for effective mailbox management in today's digital workplace.