Hello,
My apologies, I am struggling with this one, I am not experienced with Powershell scripting, and I can't find another way to obtain a count of "Established Connections" a monitored server has. The end goal is to have a time chart with this count over a period of time.
So I found a basic Poweshell command that performs a Get-NetTCPConnection, but I'm not sure what all should be modified to add the Server name that I need to point this script too.
Get-NetTCPConnection | Where-Object { $_.RemotePort -eq '1433' -and $_.State -eq 'ESTABLISHED' }).count
Also, I don't want to filter on a specific Port, I need the full count of established connections.
Second question is where would I place the credentials at in this command? Sorry again that I am way behind in my Powershell knowledge. 
Could anyone please help me out on how I can achieve this?
Thank you very much,
Tom