Scripting UCM Startup and Shutdown

March 12, 2009

I do content server development a lot. Unfortunately I have other responsibilities as well. I also move around a fair bit so I fire up the old laptop and shut it down a lot. I set my SQL Server, Apache and Content Server services all to manual. I really hate waiting for all that to load up when all I want to do is get online to triage email, etc.

I have created two PowerShell scripts I have used to startup and shutdown various services in the “proper order”. The scripts themselves are very simple. They include a list of service names set into a variable and one more line to start or stop each service in the list.

The StartUCM Script

$services = “MSSQLSERVER”, “msftesql”, “SQLWriter”, “IdcAdminService idc_admin”, “IdcContentService idc”, “IdcRefineryService ibr”, “Apache2.2″ $services | get-service -ErrorAction silentlycontinue | start-service

The StopUCM Script

$services = “Apache2.2″, “IdcContentService idc”, “IdcAdminService idc_admin”, “IdcRefineryService ibr”, “SQLWriter”, “msftesql”, “MSSQLSERVER” $services | get-service -ErrorAction silentlycontinue | start-service

When I fire up my laptop and want to work with content server I can click start and enter “powershell startcum” and press enter. I could also have shortcut on the desktop, etc. For the trick I use to work I had to add the directory where I keep my PowerShell scripts to my Path environment variable.

© 2020 Jason Stortz (version 20200607-210013)