Skip to content

Instantly share code, notes, and snippets.

@colindooley11
Last active April 29, 2021 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colindooley11/4cf930a2f70e62157470 to your computer and use it in GitHub Desktop.
Save colindooley11/4cf930a2f70e62157470 to your computer and use it in GitHub Desktop.
#powershell Powershell - Get services
$computers = @("distributorserver","workeraserver","workerbserver")
foreach ($computer in $computers)
{
foreach ($service in Get-Service -Name OrganisationRootNamespace.* -ComputerName $computer)
{
Get-Service -ComputerName $computer -ServiceName $service.Name | Start-Service
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment