HUDU exporter
This commit is contained in:
parent
62e6a1a260
commit
f9e5f8cdad
1 changed files with 70 additions and 0 deletions
70
VMSExportToHUDU.ps1
Normal file
70
VMSExportToHUDU.ps1
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
# Get Hardware from VMS
|
||||||
|
$hardwarelist = Get-VmsCameraReport -IncludeRetentionInfo
|
||||||
|
|
||||||
|
# Create Empty table object with the right headers needed for CSV Data Import
|
||||||
|
$table = New-Object System.Data.DataTable
|
||||||
|
[void]$table.Columns.Add("company_name")
|
||||||
|
[void]$table.Columns.Add("name")
|
||||||
|
[void]$table.Columns.Add("Stream 1 - Frames per second (FPS)")
|
||||||
|
[void]$table.Columns.Add("Stream 1 - Bitrate")
|
||||||
|
[void]$table.Columns.Add("Privacy mask")
|
||||||
|
[void]$table.Columns.Add("Eigendom klant")
|
||||||
|
[void]$table.Columns.Add("Serienummer")
|
||||||
|
[void]$table.Columns.Add("MAC-adres")
|
||||||
|
[void]$table.Columns.Add("Afbeelding")
|
||||||
|
[void]$table.Columns.Add("Day-Image")
|
||||||
|
[void]$table.Columns.Add("Night Image")
|
||||||
|
[void]$table.Columns.Add("Day / Night Mode")
|
||||||
|
[void]$table.Columns.Add("Wide Dynamic Range (WDR)")
|
||||||
|
[void]$table.Columns.Add("Privacy Mask omschrijving")
|
||||||
|
[void]$table.Columns.Add("Opmerkingen")
|
||||||
|
[void]$table.Columns.Add("IP-adres")
|
||||||
|
[void]$table.Columns.Add("Model")
|
||||||
|
[void]$table.Columns.Add("Installatiedatum")
|
||||||
|
[void]$table.Columns.Add("Locatie")
|
||||||
|
[void]$table.Columns.Add("Montage")
|
||||||
|
[void]$table.Columns.Add("Exposure Time / Shutter Speed")
|
||||||
|
|
||||||
|
# Loop through the Cameralist
|
||||||
|
foreach ($camera in $hardwarelist) {
|
||||||
|
# Match HardwareID and fetch camera settings
|
||||||
|
try {
|
||||||
|
$setting = Get-VmsHardware -Id $camera.HardwareId | Get-HardwareSetting
|
||||||
|
} catch {
|
||||||
|
Write-Host "Failed to fetch data for Camera ID:" $camera.HardwareId
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add data rows to table
|
||||||
|
[void]$table.Rows.Add(
|
||||||
|
$camera.RecorderName,
|
||||||
|
$camera.HardwareName,
|
||||||
|
$camera.CurrentRecordedFPS,
|
||||||
|
$camera.CurrentRecordedBitrate,
|
||||||
|
[int][bool]::Parse($camera.PrivacyMaskEnabled),
|
||||||
|
"",
|
||||||
|
$setting.SerialNumber,
|
||||||
|
$camera.MAC,
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
$camera.Address.TrimStart('http://').TrimEnd('/'),
|
||||||
|
$camera.Model,
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"")
|
||||||
|
}
|
||||||
|
|
||||||
|
# Output table
|
||||||
|
try {
|
||||||
|
$table | Export-Csv -Path .\export.csv -NoTypeInformation
|
||||||
|
Write-Host "Export created"
|
||||||
|
Disconnect-Vms
|
||||||
|
} catch {
|
||||||
|
Write-Host "Failed writing file."
|
||||||
|
Disconnect-Vms
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue