Powershell, SharePoint Solutions, and Waiting for Deployment

When installing SharePoint solution packages using Powershell, you’ll need to wait for the solution to be installed after calling install-spsolution before you can enable features using enable-spfeature.  As a part of an automated script, you’d like for the script to...