Skip to content

Commit

Permalink
Create Service-Status-Checker.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
rswio authored Jan 26, 2025
1 parent d6ba98d commit 2923189
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Monitoring/Service-Status-Checker.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$ServiceName = "Spooler" # Replace with your service
$Servers = @("Server1", "Server2")

foreach ($Server in $Servers) {
$Status = Get-Service -Name $ServiceName -ComputerName $Server
Write-Output "Service $ServiceName on $Server is $($Status.Status)."
}

0 comments on commit 2923189

Please sign in to comment.