New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Remote PowerShell Script for Skype

Votes:

0

Your Vote:

Up

Down

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 by  DolbySR (0) 1

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



1 Reply

Votes:

0

Your Vote:

Up

Down

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]



Please log in or register to enter your reply.


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.