I am Looking for a way to detect if the a solution is deploying the following code does not seem to return "Deploying" like I see in central admin.
$wspID = Get-SPSolution -Identity 'mysolution.wsp';
Write-Host $wspID.Status;
running the above code repeatedly while deploying or retracting never returns "deploying" only things like "NotDeployed","GlobalDeployed", etc.
I want to determine it's deploying state so my code will wait until the previous solution is deployed.