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 *


8 − = 7


Visitors Count

Subscriber Count

    3803
March 2017
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031