Tag: start service on remote

Powershell Script to start/stop/disable service on multiple remote server

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

Filed under: Scripting (Automation)Tagged with: , , , , , , , ,