Ever wanted to know the current number of active FTP client connections on your Windows Server FTP Service? You can get this statistic using PowerShell, the
Get-Counter cmdlet and the Microsoft FTP Service Current NonAnonymous Users performance counter.
In my case, I have an NLB FTP cluster of three FTP servers, and I wanted know the number of current connected users. They’re non-anonymous, because they’ve authenticated and are logged on.
In PowerShell, use the
Get-Counter cmdlet and connect to your FTP servers:
PS C:\Users\jan> Get-Counter ` >> -ComputerName ftp-01, ftp-02, ftp-03 ` >> "\Microsoft FTP Service(_total)\Current NonAnonymous Users" >> Timestamp CounterSamples --------- -------------- 5/3/2016 1:49:54 PM \\ftp-01\\microsoft ftp service(_total)\current nonanonymous users : 180 \\ftp-02\\microsoft ftp service(_total)\current nonanonymous users : 133 \\ftp-03\\microsoft ftp service(_total)\current nonanonymous users : 100
Remove the back ticks (
`) to put the command on one line. The Get-Counter cmdlet information on Technet provides more information and samples.
You can use
(Get-Counter -ComputerName ftp-01 -ListSet '*').counter to list and display all available performance counters in PowerShell.
My name is Jan. I am not a hacker, coder, developer, programmer or guru. I am merely a system administrator, doing my daily thing at Vevida in the Netherlands. With over 15 years of experience, my specialties include Windows Server, IIS, Linux (CentOS, Debian), security, PHP, WordPress, websites & optimization. Want to support me and donate? Use this link: https://paypal.me/jreilink.
Use -SearchBase with Get-ADComputer for faster results
ASP and ASP.NET connection string examples for Microsoft SQL Server and MySQL
MySQL Connector/ODBC C# test script
How to use SSL in PHP Data Objects (PDO) mysql
Fatal error: Uncaught Error:  operator not supported for strings – PHP 7.1
How to determine if a SQL Server backup is compressed?
How to detect ethernet network speed in Windows
List all MAC addresses of all Hyper-V Virtual Machines