Hi @KShahzad-8722
You can use the PowerShell command:
Start-Service -Name "eventlog"
---------------------------------------
If this is helpful please accept answer.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
i have application installed on windows and services can be started from services utility,
there are multiple servers,
i need touse poweshell script to start services on all servers with one script execution.
kindly advise script template, for example sql services/
Hi @KShahzad-8722
You can use the PowerShell command:
Start-Service -Name "eventlog"
---------------------------------------
If this is helpful please accept answer.
Hi @KShahzad-8722 ,
if you want to start a service on remote computers Start-Service
might not help/work. Start-Service
will start the service on the local computer where the cmdlet is executed.
But maybe you like to try this:
$servers = "server1", "server2"
$servers | ForEach-Object {
Get-Service -Name wuauserv -ComputerName $_ | Set-Service -Status Running
}
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten