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 + = 18


Visitors Count

Subscriber Count

    3891
April 2017
M T W T F S S
« Feb    
 12
3456789
10111213141516
17181920212223
24252627282930