Pages

Friday, July 20, 2012

Registering a Websphere Application Server instance as a windows service.

By default, the default profile of the WAS is registered as windows service during installation. Any new app server profiles that you create can be registered using the following command
 WASService.exe -add <<serviceName>> -serverName <<serverName>> -profilePath <<profilePath>> -startType automatic 

where <<serviceName>> is the name of the service that appears in the component service prepended with "IBM Websphere Application Server V7.0"  
<<serverName>> is the name of the server to start (e.g. server1)<<profilePath>> is the path to the websphere application server profile
startType can be either automatic, manual or disabled
     
Following is the usage for the command

Usage: WASService.exe (with no arguments displays this help)
                    || -add <service name>
                       -serverName <Server>
                       -profilePath <Server's Profile Directory>
                           [-wasHome <Websphere Install Directory>]
                           [-configRoot <Config Repository Directory>]
                           [-startArgs <additional start arguments>]
                           [-stopArgs <additional stop arguments>]
                           [-userid <execution id> -password <password>]
                           [-logFile <service log file>]
                           [-logRoot <server's log directory>]
                           [-encodeParams]
                           [-restart <true | false>]
                           [-startType <automatic | manual | disabled>]
                    || -remove <service name>
                    || -start <service name> [optional startServer.bat parameters]
                    || -stop <service name> [optional stopServer.bat parameters]
                    || -status <service name>
                    || -encodeParams <service name>


                   
To remove a service, use the following command
                   
WASService.exe -remove SOLRSL02Node01
Remove Service: SOLRSL02Node01
Successfully removed service