Home » Scripting (Automation) » Powershell Script to start/stop/disable service on multiple remote server

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

Print Friendly

Leave a comment

Your email address will not be published. Required fields are marked *


9 − 1 =


Visitors Count

Subscriber Count

    3986
May 2017
M T W T F S S
« Apr    
1234567
891011121314
15161718192021
22232425262728
293031