Skip to main content

SYNOPSIS

Get mailboxes based on a custom attribute and compare specified attributes.

SYNTAX

DESCRIPTION

This function retrieves mailboxes based on a custom attribute and compares specified attributes. It returns a list of mailboxes along with their primary SMTP address, the custom attribute value, and whether the specified attributes match. It’s more or less a `Get-ExoMailbox with specific filter

EXAMPLES

EXAMPLE 1

This example retrieves mailboxes with the custom attribute “CustomAttribute” and compares the values of “Attribute1” and “Attribute2”.

EXAMPLE 2

This example retrieves mailboxes with the custom attribute “CustomAttribute” without comparing any attributes.

EXAMPLE 3

Exports results to an Excel file.

PARAMETERS

-Attribute

The custom attribute to retrieve from the mailboxes.

-CheckAttributes

Optional. An array of two attributes to compare. If specified, the function checks if the values of these attributes match. Can be useful to compare two attributes for examples

-ExportPath

Optional output directory for the Excel export (defaults to the user profile).

-ExportToExcel

If specified, exports the results to an Excel file in the user’s profile directory.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

OUTPUTS

NOTES

You can also use Get-AttributeMatching to compare two attributes directly in AD/Exchange/Entra ID