1######################################################################### 2# 3# win_services.cf - Windows Service Management 4# 5######################################################################### 6 7body file control 8{ 9 inputs => { "$(sys.libdir)/stdlib.cf" }; 10} 11 12bundle agent win_services 13{ 14 vars: 15 16 # NOTE: Use "Service Name" (not "Display Name"); 17 # Administrative Tools -> Services -> Double Click on one to see its name 18 19 "bad_services" slist => { 20 "RemoteRegistry" 21 }; 22 23 24 Windows_Server_2003_R2:: 25 26 "autostart_services" slist => { 27 "Alerter", 28 "W32Time" # Windows Time 29 }; 30 31 Windows_Server_2008:: 32 33 "autostart_services" slist => { 34 "MpsSvc", # Windows Firewall 35 "W32Time" # Windows Time 36 }; 37 38 39 services: 40 41 "$(bad_services)" 42 service_policy => "disable", 43 service_method => force_deps, 44 comment => "Disable services that create security issues"; 45 46 47 Windows_Server_2003_R2|Windows_Server_2008:: 48 49 "$(autostart_services)" 50 service_policy => "start", 51 service_method => bootstart, 52 comment => "Make sure important services are running and set to start at boot time"; 53 54} 55 56