I am writing a batch file to automatically start/stop Orion services.
Does anyone know a better order to start/stop the services than how the Orion Service Manager handles things?
I use this order for starting:
- SWInfoServiceSvc
- SWOrionInformationServicev1
- SWJobEngineSvc
- SWJobSchedulerSvc
- SWJobEngineSvc2
- OrionModuleEngine
- NetPerfMonService
- SWCollectorDataProcessorSvc
- SWCollectorManagementAgentSvc
- SWCollectorPollingControllerSvc
- SolarWindsAlertingEngine
- SolarwindsSyslogService
- SolarWindsTrapService
and reverse order for stopping.
Everything works fine.
I use powershell script
$app = Get-WmiObject -Class Win32_Service | Where-Object { $_.PathName -match "Solarwinds*" }foreach( $item in $app){ Write-host "Stopping .... " $item.Name if( ($item.State -eq "Stopped") -or ($item.StopService().returnValue -eq 0) ) { Write-host "ok" } else { Write-host "Failed ... " $item.State }}
ouch, it's about order. Ignore my previous post.