Hi,
It's quite simple to fix, I had similar problem with other statuses and after thinking for a while and some testing I came up with this:
do {
Start-Sleep -Seconds 20;
$vm = Get-VM $vm.name # The new line that does the refresh.
$toolsStatus = $vm.extensionData.Guest.ToolsStatus;
} while($toolsStatus -ne "toolsOK");
You have to look at it like the web client.
For example if you delete a vm it will still be present in the web client untill you press refresh.
so in powerCLI if you do $vm = Get-VM $vm.name, you refresh the $vm variable with current vm statuses and then you know the server should have started properly.
Regards
/Hasse