Advertisement
stephanlinke

[PRTG] Get Remote Probe List

Apr 29th, 2016
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #region configuration
  2. [string] $ConfigurationFilePath = ((Get-ItemProperty -Path "hklm:SOFTWARE\Wow6432Node\Paessler\PRTG Network Monitor\Server\Core" -Name "Datapath").DataPath) + "PRTG Configuration.dat"
  3.    [xml] $configuration = New-Object -TypeName XML;
  4.          $configuration.Load($ConfigurationFilePath)
  5.  
  6. $Probes = $configuration.SelectNodes("//probenode")
  7.  
  8. $ProbeList = foreach($Probe in $Probes){
  9.     [pscustomobject]@{
  10.         ID   = $probe.ID
  11.         GID  = $probe.data.probegid.Trim()
  12.         Name = $probe.data.name.Trim()
  13.         IP   = $probe.data.probeip.Trim()
  14.     }
  15. }
  16.  
  17. $ProbeList
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement