So I'm trying to make a drain-stop function for my webfarm deployment script.
The overall script will be breaking the keepalive page, monitoring the active connections to the server until they drop below a given value then executing the deployment etc.
I've hit limitations working with the following code in powershell:
Get-Counter '\Web Service(_total)\Current Anonymous Users'
All I want to do is retrieve the value out of that, but, all my attempts at reformatting, looping through, pipelining etc are failing.
Can someone give me the appropriate functions / switches I need in order to retrieve that value please? Thanks!