Someone asked me what is a good way for administrators to monitor or troubleshoot Horizon Connection Server Services using powershell and refresh the status every 5 seconds.
Download the powershell script at github or copy the script contents below into your notepad and save it as .ps1 file.
Enjoy!
$a = @{Expression={$_.Name};Label="Service Name";width=25}, `
@{Expression={$_.DisplayName};Label="Display Name";width=50}, `
@{Expression={$_.Status};Label="Status";width=15}, `
@{Expression={$_.StartType};Label="Start Up Type";width=15}
while ($true)
{
write-host 'Horizon Connection Server and VMware Tools Services'`n -ForegroundColor Yellow -BackgroundColor Black
Get-Service -Displayname "*VMware*" | Format-Table $a
write-host `n
For ($i=5; $i -gt 0; $i–-)
{
write-host "Refreshing in..." $i -ForegroundColor Yellow -BackgroundColor Black
Start-Sleep 1
}
cls
}
Comments
Post a Comment