Forum Discussion
farismalaeb
Jan 06, 2021Steel Contributor
Why the Queue is not available after running Set-ServerComponentState
Hi all I am doing a script to automate some steps related to server maintenance, but there is a strange behavior from Exchange, The Queue is not available for sometime after Running Set-ServerCompon...
SteveMacNZ
Apr 27, 2021Iron Contributor
I have a restart of the MSExcahngeTransport and MSExchangeFrontEndTransport services in my script directly after the Set-ServerComponentState to speed up the draining process in out automation script
Set-ServerComponentState $script:server -Component HubTransport -State Draining -Requester Maintenance
Get-Service "MSExchangeTransport" -ComputerName $script:server | Restart-Service -PassThru
Get-Service "MSExchangeFrontEndTransport" -ComputerName $script:server | Restart-Service -PassThru
then it goes on to Redirect-Message ... this may help?
- farismalaebApr 28, 2021Steel ContributorThanks for your response, but instead, I used TRAP to get the error, wait until the trap is completed, then proceed with the next step.