I’ve put together another script that might be useful for monitoring how busy your Terminal Services Gateway is at various times of the day. This Powershell Script can be used with GFI Max Remote Management or SpiceWorks to easily identify busy servers.
$GETTSGWCC = Get-Counter ‘\Terminal Service Gateway\Current connections’
$TSGWCC = $GETTSGWCC.CounterSamples |Select-Object CookedValue
Write-Host You have $TSGWCC.CookedValue Current Connection\s to the Terminal Services Gateway
Feel free to edit the text part of the output (Last line), this could be reduced/simplified if required.Follow @aid_in_it