New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.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


Direct Access Statistics.ps1 no longer working?

Votes:

0

Your Vote:

Up

Down

Hi There,

We have a lot of users working from home and I notice our Direct Access Statistics.ps1 script is not out putting any results to PRTG? This is the script:

 Try {
$DAC = Get-RemoteAccessConnectionStatisticsSummary -ComputerName DASERVER } Catch [system.exception] { } Finally { 
$myxml = '<prtg>' + "`n" + '<result>' + "`n" + '<channel>TotalConnections</channel>' + "`n" + '<value>' + $DAC.TotalConnections + '</value>' + "`n" + '</result>' + "`n" + '<result>' + "`n" + '<unit>Custom</unit>' + "`n" + '<Customunit>MB</Customunit>' + "`n" + '<VolumeSize>MegaByte</VolumeSize>' + "`n" + '<Float>1</Float>' + "`n" + '<channel>Total Bytes In Out</channel>' + "`n" + '<value>' + ($DAC.TotalBytesInOut/(1024*1024)) + '</value>' + "`n" + '</result>' + "`n" + '<result>' + "`n" + '<channel>MaxConcurrentConnections</channel>' + "`n" + '<value>' + $DAC.MaxConcurrentConnections + '</value>' + "`n" + '</result>' + "`n" + '</prtg>' 
$myxml 
}

Now when I run the .ps1 script manually in Powershell ICE it outputs a value correct

PS C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML> C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\Direct Access Statistics.ps1
<prtg>
<result>
<channel>TotalConnections</channel>
<value>838</value>
</result>
<result>
<unit>Custom</unit>
<Customunit>MB</Customunit>
<VolumeSize>MegaByte</VolumeSize>
<Float>1</Float>
<channel>Total Bytes In Out</channel>
<value>498874.701332092</value>
</result>
<result>
<channel>MaxConcurrentConnections</channel>
<value>844</value>
</result>
</prtg>

Any Ideas?

access direct ps1 script statistics

Created on Mar 18, 2020 9:06:58 AM by  CallumWalker (0) 1

Last change on Mar 18, 2020 2:10:49 PM by  Arne Seifert [Paessler Support]



4 Replies

Votes:

0

Your Vote:

Up

Down

Dear CallumWalker,

if the output works from the command line, please check in PRTG if the correct security context is set in the sensor settings and if the Windows device credentials are correct. For further debugging, you can enable the sensor option "Write Exe result to disk". After the next sensor scan, the sensor log appears in the log folder, default path "C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)".

Created on Mar 18, 2020 2:17:24 PM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I've tried to set the Credentials for Windows Systems with both my Admin and the PRTG service account with no luck. The "Write Exe result to disk" was turned on but I couldn't see any results. Please can i log a support ticket for this.

Created on Mar 19, 2020 12:06:20 PM by  CallumWalker (0) 1



Votes:

0

Your Vote:

Up

Down

Dear CallumWalker,

please contact us through the webinterface, Setup / Contact Support, with the Support Bundle option. In case the bundle cannot be send, contact us at [email protected] and reference this case.

Created on Mar 20, 2020 12:13:21 PM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Note: Opening a new Powershell session (new-PSSession) to the target system within the script (before the actual code) seems to work.


Kind Regards,
Timo Dambach
Paessler Tech Support

Created on Aug 4, 2020 5:45:55 AM by  Timo Dambach [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.