Skip to content

Find-ExchangeEnvironmentByObject

SYNOPSIS

Determine the Exchange environment for a specified object.

SYNTAX

Find-ExchangeEnvironmentByObject [-Identity] <String> [<CommonParameters>]

DESCRIPTION

The `Find-ExchangeEnvironmentByObject` function identifies the Exchange environment (e.g., OnPrem, EXO1, EXOOND) for a specified object. It connects to the appropriate Exchange environments and retrieves recipient details to determine the environment.

EXAMPLES

EXAMPLE 1

Find-ExchangeEnvironmentByObject -Identity "[email protected]"

Determines the Exchange environment for the user `user@example.com`.

EXAMPLE 2

"[email protected]", "[email protected]" | Find-ExchangeEnvironmentByObject

Determines the Exchange environments for the users `user1@example.com` and `user2@example.com`.

PARAMETERS

-Identity

The identity of the object (e.g., DistinguishedName, UserPrincipalName, or sAMAccountName) for which the Exchange environment will be determined.

Type: String
Parameter Sets: (All)
Aliases: DN, DistinguishedName, UserPrincipalName, UPN, sAMAccountName

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
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.

INPUTS

OUTPUTS

NOTES