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

Direct Access Statistics.ps1 no longer working?



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>' 

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
<channel>Total Bytes In Out</channel>

Any Ideas?

access direct ps1 script statistics

Created on Mar 18, 2020 9:06:58 AM

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

4 Replies



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]



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



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]



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]

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.