ISSUE: Create Hybrid Archive Mailbox step error 'Could not get any available PowerShell session'
Last modified:
Overview
When mapping a large batch of users (a few hundred or more) the Create Hybrid Archive Mailbox step fires off, and generates the error below:
$HYBRID_CreateArchiveMailbox: An error occurred during Exchange OnPrem Powershell | Could not get any available PowerShell session. [ProcessResult]
This can occur when there are too many PowerShell sessions created and not released in a short amount of time.
Solution
This can be remediated by manually 'restarting' those failed in groups of 10. However, this is a tedious manual process.
The best approach is to restart the Exchange module on the Bridgehead server. This will release any hung sessions and allow the process to work again. Note that when restarting the Remad.Exchange service, it will appear to hang on the 'stopping' process. This is completely normal and may take upward of 20 minutes. It will eventually stop and start again. This can also be monitored in the backend Exchange logs.
Once the service is back online, restart the failed jobs.