Skip to content
TheChatArchiveThe Chat Archive
Perplexitysonar-pro-high· PerplexityHugging Face LMArena Search Arena 24K

powershell change completeafter for a batch of moverequests

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Geminigemini-2.5-flash-preview-04-17-grounding’s answer.
  1. User

    powershell change completeafter for a batch of moverequests

  2. Perplexity Assistant

    Changing the CompleteAfter Value for a Batch of Move Requests in PowerShell

    To change the CompleteAfter parameter for a batch of mailbox move requests in Exchange (on-premises or Exchange Online), you can use PowerShell to automate the process. The CompleteAfter parameter controls when a move request is allowed to complete, which is useful for scheduling mailbox cutovers to minimize user impact[2][4].

    How to Change CompleteAfter for Multiple Move Requests

    You can use the Set-MoveRequest cmdlet in combination with Get-MoveRequest to update the CompleteAfter property for a batch of move requests. Here’s a step-by-step approach:

    1. Identify the Move Requests

    You can filter move requests by batch name, status, or other criteria. For example, to get all move requests in a specific batch:

    Get-MoveRequest -BatchName "YourBatchName"
    

    2. Set the CompleteAfter Value

    To set the CompleteAfter value for each move request, use a ForEach-Object loop. The value can be a specific date/time in UTC or the current time to complete immediately.

    Example: Set CompleteAfter to a specific UTC time for all move requests in a batch

    $completeAfter = (Get-Date "2025-05-07 02:00:00").ToUniversalTime()
    Get-MoveRequest -BatchName "YourBatchName" | ForEach-Object {
        Set-MoveRequest -Identity $_.Identity -CompleteAfter $completeAfter
    }
    

    This schedules all move requests in the batch to complete after the specified time[1][2][4].

    Example: Complete all move requests immediately

    Get-MoveRequest -BatchName "YourBatchName" | ForEach-Object {
        Set-MoveRequest -Identity $_.Identity -CompleteAfter 1
    }
    

    Setting -CompleteAfter 1 triggers immediate completion[3][5].

    3. Verify the Changes

    You can verify the CompleteAfter value for each move request:

    Get-MoveRequest -BatchName "YourBatchName" | Get-MoveRequestStatistics | Select DisplayName, CompleteAfter
    

    Additional Notes

    • If the move request is stuck in a suspended state (e.g., SuspendWhenReadyToComplete is $true), you may also need to set -SuspendWhenReadyToComplete:$false and -PreventCompletion:$false before resuming the move[5].
    • For move requests with bad items, you might need to approve skipped items using the -SkippedItemApprovalTime parameter[8].
    • The CompleteAfter parameter expects a UTC time. Use .ToUniversalTime() to convert local times as needed[2][4].

    Sample Script for Bulk Update

    $batchName = "YourBatchName"
    $completeAfter = (Get-Date "2025-05-07 02:00:00").ToUniversalTime()
    
    Get-MoveRequest -BatchName $batchName | ForEach-Object {
        Set-MoveRequest -Identity $_.Identity -CompleteAfter $completeAfter
    }
    

    This script updates all move requests in the specified batch to complete after the given UTC time.


    Summary:
    Use Get-MoveRequest to select your batch, then pipe to Set-MoveRequest -CompleteAfter to update the completion timing for all move requests in that batch. This approach is efficient and fully supported in both on-premises Exchange and Exchange Online environments[1][2][4].

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.