If you've built the SharePoint Pop-up Lab, you'll want to automate the process of popping it up and popping it back down again. This video shows you how to take the lab you've already built and do exactly that in Powershell. This video assumes you've already built a SharePoint pop-up lab. If not, then follow the instructions here.
You can access the scripts themselves at this location.