What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Remote PowerShell Script for Skype

Votes:

0

Hi there

I'm trying to monitor our Skype for Business Servers - without much luck though :( How can I get my script to be run on the remote server itself?

Script:

$query = Get-CsWindowsService RTCMEDSRV
[string]$result = $query.ActivityLevel

[string[]]$splitResult = $result.Split('=,')[1,3,5,7]

[int]$InboundCalls     = $splitResult[0] -as [int]
[int]$OutboundCalls    = $splitResult[1] -as [int]
[int]$InboundPriCalls  = $splitResult[2] -as [int]
[int]$OutboundPriCalls = $splitResult[3] -as [int]

$InboundTotalCalls     = $InboundCalls + $InboundPriCalls
$OutboundTotalCalls    = $OutboundCalls + $OutboundPriCalls

Write-Output $InboundTotalCalls

PRTG Error: Response not well-formed: "(Get-CsWindowsService : The term 'Get-CsWindowsService' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Regards
Patrick

powershell prtg skype

Created on Jan 16, 2020 12:06:23 PM

Last change on Jan 17, 2020 10:09:47 AM by  Birk Guttmann [Paessler Support]



1 Reply

Votes:

0

Hi there,

In order to run a script remotely, I would recommend to use Remote Powershell Commands.

Please also note, that the results need to be in the correct format, so PRTG can handle those correctly. How this syntax should look is explained here.


Kind regards,
Birk Guttmann, Tech Support Team

Created on Jan 17, 2020 10:13:26 AM by  Birk Guttmann [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.