Hi
I have a requirement to check the status of a move request in Exchange and once completed move to the next step and i am using the below script for the task
Do
{
sleep 10
}
Until((Get-MoveRequest -Identity 'ID').Status -eq 'Completed')
Recently i have noticed that the script waits indefinitely as Status moves to 'Failed'. How can i incorporate such a condition to the script.
Do
{
sleep 10
}
Until((Get-MoveRequest -Identity 'ID').Status -eq 'Completed' -or (Get-MoveRequest -Identity 'ID').Status -eq 'Failed' )
The above exits the loop but it does not show whether the process was 'Completed' or 'Failed'. How can i achieve it. Please assist.
Justin