Powershell script to control windows service on multiple remote servers.
Get-content “Filename” | foreach {set-Service -ComputerName $_ -Name “Service Name” -StartupType Disabled -Status Stopped}Note:
Replace Filename with filename location (Ex C:\hostname.txt).
Add all servers names to filesname (Ex hostname.txt)
Change StartupType as Disabled/Manual/Automatic
Change Status as Stopped/started
-WintelAdmin
Facebook Comments