I have added and installed couple of .wsp solutions to farm using following commands:
$getSolution = Get-SPSolution -Identity "MySolution.wsp"
if($getSolution -eq $null)
{
Add-SPSolution -LiteralPath "Path\MySolution.wsp"
}
if($getSolution.Deployed -eq $false )
{
Install-SPSolution –Identity MySolution.wsp -GACDeployment
}
As above command will take some time to fully deployed the solution from status deploying to deployed. I want to move forward in the script only if the status of solution is deployed. How can i check this using powershell?