I have tried to obtain that data using powershell but it is not possible, if it works the powershell custom sensor that tells me the status (assembled or disassembled) and size, but I need the number of users .... any help is very much appreciated. greetings to all


Article Comments

How about using Get-Mailbox, as they should reflect the users on the Exchange Server: Get-Mailbox | Group-Object -Property:Database | Select-Object name,count Should return something like this:

Name                                    Count
----                                    -----
MB-BR-01                                   23
MB-HO-01                                  192
MB-HO-02                                  178

PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team


Mar, 2019 - Permalink

Sorry, I can not edit the question. The problem is that by remote powershell (for security) I can not execute commands, can I do the same query by WMI?


Mar, 2019 - Permalink

Not that I'm aware of. What are your objections against remote Powershell if I may ask? You could allow PRTG specifically to be the only allowed host :)


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team


Mar, 2019 - Permalink

is for a business security issue, now I'm seeing that I can do the same with powershell, export to a file and add a sensor "file" in PRTG ...

something like this

Get-MailboxStatistics –Database xxxx | ForEach {$totalItems+=$_.ItemCount} | Out-File C:\filename.txt


Mar, 2019 - Permalink

You could also use the HTTP Push Data Advanced Sensor and push the data to PRTG via Invoke-WebRequest and a scheduled task on the Exchange Server :)


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team


Mar, 2019 - Permalink

Excellent!!! i will try this

Thanks!


Mar, 2019 - Permalink