Was the Import/Export Utility broken with the latest 2019 R1 revision?

It does not fit any issues that I am currently aware of. I assume you have experienced an issue. Please elaborate on your question or describe what you have experienced.

Hi Stephen,

I’m the author of the config import/export ​utility and I’m not aware of an incompatibility with 2019 R1. However, that tool does have some bugs here and there, and could stand to be updated.

You may be interested in a more powerful and flexible utility I’ve been working on. In the PowerShell Gallery (PSGallery) you’ll find MilestonePSTools. It’s an unofficial module with a collection of nearly 70 cmdlets which make it relatively easy to work with the configuration via PowerShell. If you’re comfortable writing some basic PS script, you can do far more with that module than the more long-in-the-tooth classic command-line utility.​

I consider this module “alpha quality” and like the CIEU, it’s directly authored by me and not a part of Milestones core products and features. Instead, it reflects my own interest in the MIP SDK and automation. I would be greatful for your feedback if you do end up using it. I’m new to Powershell myself but I personally believe the use of PowerShell for these kinds of tasks is the way forward and will be more familiar and appreciated by those in a sysadmin role who are responsible for VMS maintenance.

To install, you can type “Install-Module MilestonePSTools” from an internet-connected PowerShell session. I have a 15-minute introduction to the module here: https://youtu.be/qZ-I-Imm7tk

And I’ve added a fair bit more to the module since I made that introduction, including managing and triggering user defined events, managing evidence locks and bookmarks, exporting in AVI/MKV/native Milestone ​formats, retrieving jpeg snapshots and testing video recording/retention by attempting to move the DB cursor to a point in time.

If you do post the issues you’re having with the CIEU tool though, I’d be happy to look into it.​

Joshua,

​Thank you for your response. I am really enjoying the added functionality of the Powershell module. I am having success poking around in the Cmdlet’s, but I am having issues getting the correct command string to pull the hardware password on the devices. That used to come as part of the hardware request in the older utlilty.

Hi Stephen,

Glad you like it! I’m a bit addicted to building this out right now - I think there’s a lot of good it can do. Here’s a script that should generate a CSV with the same information as the older CIEU command-line tool (including password). You can see that the hardware password is not readily available on the “Hardware” object and is a value you must explicitly make a method call to request. In this example I have a hardware object saved in $hardware, and I call “$hardware | Get-HardwarePassword” to assign that to a NoteProperty in my row to be written to CSV.

Here’s a small ZIP with a few examples including this one: http://download.milestonesys.com/tools/MilestonePSTools/samples.zip

if (!(Get-Module -ListAvailable -Name MilestonePSTools))
{
    Install-Module MilestonePSTools
}
 
$mgmtServerAddress = 'xprotect'
$csvFilePath = 'C:\demo\hardware.csv'
 
Import-Module MilestonePSTools
Connect-ManagementServer -Server $mgmtServerAddress
 
$hardwareInfo = @()
foreach ($rec in Get-RecordingServer)
{
    foreach ($hardware in $rec | Get-Hardware)
    {
        $driver = $hardware | Get-HardwareDriver
 
        $row = New-Object -TypeName PSObject
        $row | Add-Member -MemberType NoteProperty -Name Name -Value $hardware.Name
        $row | Add-Member -MemberType NoteProperty -Name Enabled -Value $hardware.Enabled
        $row | Add-Member -MemberType NoteProperty -Name Address -Value $hardware.Address
        $row | Add-Member -MemberType NoteProperty -Name UserName -Value $hardware.UserName
        $row | Add-Member -MemberType NoteProperty -Name Password -Value ($hardware | Get-HardwarePassword)
        $row | Add-Member -MemberType NoteProperty -Name MacAddress -Value ($hardware | Get-HardwareSetting -Name MacAddress).Value
        $row | Add-Member -MemberType NoteProperty -Name DriverName -Value $driver.Name
        $row | Add-Member -MemberType NoteProperty -Name DriverNumber -Value $driver.Number
        $row | Add-Member -MemberType NoteProperty -Name HardwareId -Value $hardware.Id
        $row | Add-Member -MemberType NoteProperty -Name RecordingServerName -Value $rec.Name
        $row | Add-Member -MemberType NoteProperty -Name RecordingServerId -Value $rec.Id
        
        $hardwareInfo += $row        
    }
}
 
$hardwareInfo | Export-Csv -Path $csvFilePath -NoTypeInformation
Disconnect-ManagementServer

Joshua,

Thanks again for this. I am having an issue running it though. I get an error

WARNING: ConfigurationAPI unable to parse HardwareDriverSettings. Run with -Verbose for more info.

Any thoughts? TIA

Which cmdlet is throwing that error and what does the output look like when you add -Verbose?

I did report a bug with the way the Arecont driver was causing ConfigAPI issues due to a property called “Day/Night” causing parsing errors due to the key name of the setting having a forward slash in it. I believe the next version of the Management Server/config API will handle that better and I suspect the driver team will revisit the naming convention there.

Might be something similar causing problems reading a particular setting value?