I found this article:
http://gallery.technet.microsoft.com/scriptcenter/79644be9-b5e1-4d9e-9cb5-eab1ad866eaf
But it only works if you run the script remotely...even if you change it so it can be run locally the services are not changed. Why is this and how can I run it locally?