A little bit of fun today with Milestone XProtect (in our case the express version) today; with the goal of improving our documentation I wanted to somehow obtain a list of all of the hardware devices (and to some degree the cameras) including there names, MAC addresses and IP addresses from our XProtect server.

Lone behold the configuration.xml file typically stored at “C:\ProgramData\Milestone\Milestone Surveillance\configuration.xml” held just the information I wanted; a little bit of PowerShell later and I had CSVs with the information in a human readable form.

To do the same on your server follow the guide using the Export-MilestoneConfig.ps1 script show below.

Download Export-MilestoneConfig.ps1 (download from GitHub)

VN:F [1.9.22_1171]
Thumbs up if this article helped you 🙂
Rating: 0 (from 0 votes)

2 Responses to A little fun with PowerShell and Milestone XProtect (read the config.xml file and get a list of Devices and Cameras)

  • Juergen says:

    Hi,
    fantastic idea, unfortunately i get an error when executing the script…(sorry, it’s german). Do you have any idea ?

    Here’s the output from Powershell:

    Export-Csv : Das Argument kann nicht an den Parameter “InputObject” gebunden werden, da es NULL ist.
    In C:\tmp\SAEL\xml\Export-MilestoneConfig.ps1:5 Zeichen:35
    + … Devices.ChildNodes | Export-Csv C:\tmp\devices.csv -NoTypeInformation
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidData: (:) [Export-Csv], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ExportCsvCommand

    • James Preston says:

      Interesting! If you run the script without | Export-Csv C:\temp\cameras.csv -NoTypeInformation does it kick out any information?

Leave a Reply

Your email address will not be published.