I have a problem with the import via MilestonePSTools. When I try to import a hardware configuration CSV, I always get an error that the Path object does not exist. → see screenshot
Can anyone help me?
I have a problem with the import via MilestonePSTools. When I try to import a hardware configuration CSV, I always get an error that the Path object does not exist. → see screenshot
Can anyone help me?
Please double check if you have a correct CSV file following this description: https://www.milestonepstools.com/commands/en-US/Import-VmsHardware/
If it still fails I think you should show us your CSV file, a small one please, I could then evaluate, perhaps also ask some colleagues here at Milestone Systems if they see something wrong.. If it works for some but fails for other cameras please share the details..
Hi @Clemens Mohr,
I suspect you have an address field that is empty or incorrectly formatted but it’s hard to know for sure.
We’re planning to improve the hardware import/export cmdlets within the next few weeks for what it’s worth - I realize the CSV format is rough around the edges and it needs better error handling.
Let us know if you figure out the issue!
Cheers,
Josh
I can’t imagine that the csv is not correct, because I exported it before. The address field is therefore also filled.
Clemens
Whoa, that’s neat - your CSV export is delimited with semicolons instead of commas. In order to properly import it we’d have to specify that the delimiter is a semicolon which the module definitely isn’t built to do right now. And because the delimiter is a semicolon, and I already use a semicolon as a delimiter in fields like “DriverFamily” and “CameraGroups”, that’s probably really messing up the import.
This is an oversight on my part as I didn’t realize the `Export-Csv` cmdlet defaulted to a culture-specific delimiter. As it turns out, the default behavior in PowerShell is to determine the delimiter from the output of `(Get-Culture).TextInfo.ListSeparator`. On my machine that value is “,” and I’m willing to bet on your machine it’s “;”.
We’re working on a completely new implementation for Import-VmsHardware and Export-VmsHardware with support for a cleaner CSV file format, as well as an extremely detailed Excel format based on this Import Hardware from Excel guide. It’s not quite done yet, but importing and exporting using both CSV and XLSX does work (usually). We’ll be sure to publish updated documentation on the cmdlets when the next version is published but for now if you want to try it out, you’re welcome to download a preview from the link below. Although this preview doesn’t explicitly define the delimiter so you might run into the same issue. Especially if you export from a system with a different culture than you import that file on.
MilestonePSTools_v24.1.10-preview.zip
To use it, you’ll need to extract the zip file (unblock the zip file after downloading it if needed before you extract it), and then in a new Windows PowerShell session, run “Import-Module path\to\MilestonePSTools.psd1”.
Thank you for your feedback. When I find some time, I will try it out.