We frequently use Lync server PowerShell commands. However, it happens with me many times that I use various combinations to generate a script, use it, and when i need it again, i don\’t have it handy.
So I started this blog, to save the scripts and commands to keep it handy and it would be useful to others too. If you do have good commands or scripts, kindly comment in this post, and I\’ll include them in the blog (credit will be yours, of course).
Command to get count of users enabled for a particular domain:
Get-CsUser | where-object {$_.Enabled -eq $True -and $_.SipAddress -like \”domain.com\”} | measure
Or
Get-CsUser -Filter {RegistrarPool -eq \”PoolFqdn\”} | measure
*You may use different attributes and get the result as per your requirement.