Getting user and registration count for Lync 2013 Frontend and edge servers

To get the count for active, directly connected users, and registered endpoints on all frontends, use the following:

$feservers=get-cspool "fepoolfqdn"

foreach ($server in $feservers.computers){Get-Counter -computername $server -counter "\ls:usrv - endpointcache\usrv - Active Registered Endpoints", "\ls:usrv - endpoint cache\usrv - active registered users", "\LS:SIP - Networking\SIP - Unique users connected directly"}

On the edge servers you may have to check each server separately due to firewall restrictions.  Use the following to do so:

Get-Counter  -counter "\LS:SIP - Networking\SIP - Unique users connected directly"