Agent task to Start the AppSense MC Server
Start AppSense MC Server
Agent task to Start the AppSense MC Server
Target | AppSense.AMC.8.AMC.Server |
Accessibility | Internal |
Category | Maintenance |
Enabled | True |
Remotable | False |
Timeout | 301 |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
Script | WriteAction | Microsoft.Windows.ScriptWriteAction | Default |
<Task ID="AppSense.AMC.8.AMC.Start.All.Task" Accessibility="Internal" Enabled="true" Target="AppSense.AMC.8.AMC.Server" Timeout="301" Remotable="true">
<Category>Maintenance</Category>
<WriteAction ID="Script" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
<ScriptName>AMCStartAllServices.vbs</ScriptName>
<Arguments/>
<ScriptBody> <![CDATA['Start AppSense Management Center Server 8 Processes
SetLocale("en-us")
'Start IIS Application Pools
Set objDplyPool = GetObject ("IIS://Localhost/W3SVC/AppPools/DeploymentPool")
Set objDldPool = GetObject ("IIS://Localhost/W3SVC/AppPools/DownloadsPool")
Set objMgmtSvrPool = GetObject ("IIS://Localhost/W3SVC/AppPools/ManagementServerPool")
WScript.Echo "Starting Management Server IIS Application Pool..."
objMgmtSvrPool.Start
WScript.Echo "Starting Downloads IIS Application Pool..."
objDldPool.Start
WScript.Echo "Starting Deployment IIS Application Pool..."
objDplyPool.Start
'Start AppSense Alerts Service
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colAlertSvc = objWMIService.ExecQuery("Select * from Win32_Service Where Name ='AppSense Alerts Service'")
For Each objAlertSvc in colAlertSvc
Wscript.Echo "Starting AppSense Alerts Service..."
objAlertSvc.StartService()
Next
'Start AppSense Event Dispatcher Service
Set colEVDSvc = objWMIService.ExecQuery("Select * from Win32_Service Where Name ='AppSense Events Dispatcher Service'")
For Each objEVDSvc in ColEVDSvc
Wscript.Echo "Starting AppSense Events Dispatcher Service..."
objEVDSvc.StartService()
Next
'Start AppSense Deployment Service
Set colEVDSvc = objWMIService.ExecQuery("Select * from Win32_Service Where Name ='AppSense Deployment Service'")
For Each objEVDSvc in ColEVDSvc
Wscript.Echo "Starting AppSense Deployment Service..."
objEVDSvc.StartService()
Next
'Start AppSense Scheduler Service
Set colEVDSvc = objWMIService.ExecQuery("Select * from Win32_Service Where Name ='AppSense Scheduler Service'")
For Each objEVDSvc in ColEVDSvc
Wscript.Echo "Starting AppSense Scheduler Service..."
objEVDSvc.StartService()
Next]]> </ScriptBody>
<TimeoutSeconds>301</TimeoutSeconds>
</WriteAction>
</Task>