Disable services on list of servers
Below script will be useful for disabling the services ‘create a file called list.Txt Set Fso = CreateObject(“Scripting.FileSystemObject”)Set InputFile = fso.OpenTextFile(“list.Txt”)Do While Not (InputFile.atEndOfStream)sComputer = InputFile.ReadLineaTargetSvcs= Array(“WDSServer”)‘For list of services use below…‘arrTargetSvcs = Array(“service1”, “service2”, “service3”) Set oWMIService = GetObject(“winmgmts:” & “{impersonationlevel=impersonate}!” _ & sComputer & “rootcimv2”)Set cServices = oWMIService.ExecQuery(“SELECT * FROM Win32_Service”) For Each oService In … Read more