Skip to content

Scripts para automatizar configuraciones de Milestone Server

Notifications You must be signed in to change notification settings

may-asver/work_automation

Repository files navigation

Automation of Milestone tasks using MilestonePSTools

Tasks automated with PowerShell for Milestone (VMS) servers.

General requirements

  • Powershell module: MilestonePSTools version 23.2.3
  • User with admin privilege or necessary permissions to run the tasks in the server and/or PC
  • CSV file (in some scripts)

Add hardware

Add new cameras from a CSV file to a Recording Server.
The CSV file should look something like this:

"CameraName","HardwareName","CameraGroup","Address","UserName","Password","Coordinates","DriverNumber","RecordingServer"
"Camara_1_F","Camara_1_F","/Group1","10.190.100.4","admin","password","20.69864628, -103.298597","676","QA-DF-NT-VMS"
"Camara_2_F","Camara_2_F","/Group1","10.190.100.5","admin","password","20.69868828, -103.298597","676","QA-DF-NT-VMS"
"Camara_3_F","Camara_3_F","/Group1","10.190.100.6","admin","password","20.69864628, -103.297797","676","QA-DF-NT-VMS"

Where the first line is the header of the CSV file.
The following lines are the cameras to add

The first line must be written like in the example, which indicates the header.
NOTE: The delimiter should be a comma (,).

Export and Import roles and profiles

Export and import roles and profiles from a Milestone Server to another Milestone Server.

The script requires two IP addresses, the first one is the server where you want to export the roles and profiles, the next one is the server to import the exported data.

Add users to roles

Get users and its role from a CSV file, validate if exists in AD to add it in the role in the Milestone recording server.
The CSV file should look like this:

"NombreUsuarioAD","NombreRolMilestone"
"username1","role1"
"username2","role2"
"username3","role3"

Where the first line is the header, and the following the users with the role where the user will be.

The first line must be written like in the example, which indicates the header.
NOTE: The delimiter should be a comma (,).

Get cameras with not responding status

This script is coded in Python language, and makes consults to all Milestone servers to get cameras which are in Not-Responding status.
The list is saved in a xlsx file and separated by server.

NOTE: You need an environment file with the sensitive variables (servers IP address, servers name, MilestonePSTools commands).

Change hardware or camera name, or both

Script to automate the process of changing camera HardwareName or CameraName, or both from Milestone Server of a camera's list.
The script needs a CSV file, which indicates the hardware id and the new hardware name.
The CSV file should look like this to change HardwareName:

"HardwareName","HardwareNewName"
"sg561-0ghb","Camera 1"
"sg561-0ghk","Camera 2"
"sg561-0gui","Camera 3"

The CSV file should look like this to change CameraName:

"CameraName","CameraNewName"
"sg561-0ghb","Camera 1"
"sg561-0ghk","Camera 2"
"sg561-0gui","Camera 3"

The CSV file should look like this to change both parameters:

"HardwareName","CameraName","NewHardwareName","NewCameraName","ServerIP"
"sg561-0ghb","Camera 1","Camera1-0ghb","Camera-01","10.0.1.1"
"sg561-0ghk","Camera 2","Camera2-0ghb","Camera-02","10.0.1.1"
"sg561-0gui","Camera 3","Camera3-0ghb","Camera-03","10.0.1.1"

The first line must be written like in the example, which indicates the header.
NOTE: The delimiter should be a comma (,).

Change driver

Script to change driver id to a cameras from a CSV file.

The CSV file that lists the cameras to change its driver id needs to include the HardwareName and the new ID.

Example:

"HardwareName","DriverNumber"
"Camara_1_F","676"
"Camara_2_F","676"
"Camara_3_F","676"

The first line must be written like in the example, which indicates the header.
NOTE: The delimiter should be a comma (,), and the DriverNumber is given in https://www.milestonesys.com/support/software/supported-devices/ doing a search by model.

Move hardware to another recording server

Script to move cameras in a CSV file to another recording server.

The CSV file that lists the cameras to move, needs to include the HardwareName, Recording server name to relocate the cameras and the storage name to save recordings.

Example:

HardwareName,RecordingServer,Storage
TZ_3_F,MILREC21.local,Local default
TZ_2_F,MILREC21.local,Local default
TZ_1_F,MILREC21.local,Local default

The following lines are the hardware to move from a recording server to another

The first line must be written like in the example, which indicates the header.
NOTE: The delimiter should be a comma (,). Also, the new recording server should be in the same main server as the current one.

The storage must to exists in the new recording server.

About

Scripts para automatizar configuraciones de Milestone Server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published