There are a few of these scripts floating around for batch scripting around starting and stopping the BES services, but I haven't seen one that also including changing the service startup type from automatic to disabled and vice versa. This one can be used for DR or migration purposes.
Notes:
- Based on BlackBerry Enterprise Server 4.1 SP4 for Microsoft Exchange
- 'sc.exe' included natively in Windows Server 2003 (and Windows XP and Windows Vista for those of you wanting to alter these to run remotely); can be installed Windows 2000 Server using the Resource Kit
- Uses the Service Name not Display Name of service
Set to Disabled and Stop Services:
Code:
sc config "BlackBerry Router" start= disabled | sc stop "BlackBerry Router"
sc config "BlackBerry Dispatcher" start= disabled | sc stop "BlackBerry Dispatcher"
sc config "BlackBerry Controller" start= disabled | sc stop "BlackBerry Controller"
sc config "BlackBerry MDS Connection Service" start= disabled | sc stop "BlackBerry MDS Connection Service"
sc config "BlackBerry Policy Service" start= disabled | sc stop "BlackBerry Policy Service"
sc config BBAttachServer start= disabled | sc stop BBAttachServer
sc config "BlackBerry SyncServer" start= disabled | sc stop "BlackBerry SyncServer"
sc config "BlackBerry Server Alert" start= disabled | sc stop "BlackBerry Server Alert"
Set to Automatic and Start Services:
Code:
sc config "BlackBerry Router" start= auto | sc start "BlackBerry Router"
sc config "BlackBerry Dispatcher" start= auto | sc start "BlackBerry Dispatcher"
sc config "BlackBerry Controller" start= auto | sc start "BlackBerry Controller"
sc config "BlackBerry MDS Connection Service" start= auto | sc start "BlackBerry MDS Connection Service"
sc config "BlackBerry Policy Service" start= auto | sc start "BlackBerry Policy Service"
sc config BBAttachServer start= auto | sc start BBAttachServer
sc config "BlackBerry SyncServer" start= auto | sc start "BlackBerry SyncServer"
sc config "BlackBerry Server Alert" start= auto | sc start "BlackBerry Server Alert"
Other Services:
BlackBerry Collaboration Service
Service Name: "BlackBerry Collaboration Service"
BlackBerry Database Consistency Service
Service Name: "BlackBerry Database Consistency Service"
BlackBerry Instant Messaging Connector
Service Name: "BlackBerry Instant Messaging Connector"
BlackBerry MDS Services - Apache Tomcat Service
Service Name: MdsTomcat
BlackBerry User Administration Service
Service Name: BESUserAdminService
BlackBerry Administration Service - AS
Service Name: BAS-AS
BlackBerry Administration Service - NCC
Service Name: BAS-NCC
These may differ from platform to platform (Domino, Groupwise, Exchange), although I don't think they do. The others are optional installations for Collaboration and Instant Messaging, MDS Services (MDSS), BlackBerry User Admin Service (from BRK) and BAS (Web Desktop/future web-based platform for RIM apps). Let me know if there are any more services to add.
The above scripts are in batch format already, so just save as a .bat file. They can be altered to be a replacement for the 'net stop' batch files we've had posted on here before. Maybe someone will be able to use this. (: