Test-ExMailboxProxyAddress
SYNOPSIS
Test if a given proxy address exists in the proxy addresses of a mailbox.
SYNTAX
Single
Test-ExMailboxProxyAddress [-Mailbox <String>] [-ProxyAddress <String>] [-MatchOnly] [-NotMatchOnly]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Csv
Test-ExMailboxProxyAddress [-CsvPath <String>] [-MailboxColumn <String>] [-ProxyAddressColumn <String>]
[-MatchOnly] [-NotMatchOnly] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
This cmdlet checks whether a specified proxy address is present in the proxy addresses of a given mailbox. It can process a single mailbox/proxy address pair or read multiple entries from a CSV file.
EXAMPLES
EXAMPLE 1
Test-ExMailboxProxyAddress -Mailbox "user@example.com" -ProxyAddress "alias@example.com"
Tests if "alias@example.com" exists in the proxy addresses of the mailbox "user@example.com".
EXAMPLE 2
Test-ExMailboxProxyAddress -CsvPath "C:\path\to\file.csv" -MailboxColumn "PrimarySmtpAddress" -ProxyAddressColumn "OnMicrosoftAddress"
Reads mailbox and proxy address pairs from the specified CSV file and tests each pair.
EXAMPLE 3
Test-ExMailboxProxyAddress -CsvPath "C:\path\to\file.csv" -MatchOnly
Reads mailbox and proxy address pairs from the specified CSV file and returns only those that match.
EXAMPLE 4
Test-ExMailboxProxyAddress -CsvPath "C:\path\to\file.csv" -NotMatchOnly
Reads mailbox and proxy address pairs from the specified CSV file and returns only those that do not match.
PARAMETERS
-Mailbox
The identity of the mailbox to check (e.g., email address, alias, or GUID). This parameter is used when processing a single mailbox/proxy address pair.
Type: String
Parameter Sets: Single
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProxyAddress
The proxy address to check for in the mailbox's proxy addresses. This parameter is used when processing a single mailbox/proxy address pair.
Type: String
Parameter Sets: Single
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CsvPath
The path to a CSV file containing mailbox and proxy address pairs. This parameter is used when processing multiple entries from a CSV file.
Type: String
Parameter Sets: Csv
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MailboxColumn
The name of the column in the CSV file that contains mailbox identities. Default is 'PrimarySmtpAddress'.
Type: String
Parameter Sets: Csv
Aliases:
Required: False
Position: Named
Default value: PrimarySmtpAddress
Accept pipeline input: False
Accept wildcard characters: False
-ProxyAddressColumn
The name of the column in the CSV file that contains proxy addresses. Default is 'OnMicrosoftAddress'.
Type: String
Parameter Sets: Csv
Aliases:
Required: False
Position: Named
Default value: OnMicrosoftAddress
Accept pipeline input: False
Accept wildcard characters: False
-MatchOnly
If specified, only returns entries where the proxy address matches.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-NotMatchOnly
If specified, only returns entries where the proxy address does not match.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.