Move-Mailboxes
SYNOPSIS
Move mailboxes in Exchange with various options.
SYNTAX
Move-Mailboxes [[-User] <String>] [[-BatchName] <String>] [-StartSuspended] [-SuspendWhenReadyToComplete]
[-Nomail] [<CommonParameters>]
DESCRIPTION
The `Move-Mailboxes` function facilitates moving mailboxes in Exchange. It supports options such as starting the move in a suspended state, suspending the move when ready to complete, and specifying a batch name. The function also handles mailbox configurations post-move and provides progress updates.
EXAMPLES
EXAMPLE 1
Move-Mailboxes -User "[email protected]" -BatchName "Batch1" -StartSuspended
Moves the mailbox for `user@example.com` in a batch named `Batch1` and starts the move in a suspended state.
EXAMPLE 2
Move-Mailboxes -User "[email protected]" -SuspendWhenReadyToComplete
Moves the mailbox for `user@example.com` and suspends the move when it is ready to complete.
EXAMPLE 3
Move-Mailboxes -User "[email protected]" -Nomail
Moves the mailbox for `user@example.com` without sending notification emails.
PARAMETERS
-User
The identity of the user (e.g., DistinguishedName, LegacyExchangeDN, or SamAccountName) whose mailbox will be moved.
Type: String
Parameter Sets: (All)
Aliases: Identity, LegacyExchangeDN, DistinguishedName
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-BatchName
The name of the batch for the mailbox move. Defaults to the current date and time in `yyyyMMdd-HHmm` format.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: (Get-Date -Format 'yyyyMMdd-HHmm')
Accept pipeline input: False
Accept wildcard characters: False
-StartSuspended
A switch to start the move in a suspended state.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-SuspendWhenReadyToComplete
A switch to suspend the move when it is ready to complete.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Nomail
A switch to skip sending notification emails after the mailbox move.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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.