Hello,
I am in the process of customizing the user roles via MilestonePSTools.
I need to be able to give and take away the right to live and playback from a camera group within an role.
The background is that a guard center may only have access to live and playback when an alarm center triggers.
If I know how the PS Script must look like, then I can send these depending on the signal input of a camera per batch by a rule.
I can read the role, add users etc. via Powershell, however I don’t know how exactly I can assign and revoke the right of a role.
See marked points, I need to enable und disable this within a Role.
Could someone please help me here?
Thanks in advance
Maik
Hi Maik,
Have a look at Get-DeviceAcl and Set-DeviceAcl. These cmdlets are made to help simplify changing device level permissions. They are stored per device and per role, so you would provide Get-DeviceAcl with the camera object, and the role object, then you can change the permissions in the ACL object you get back. When ready, send the ACL object back using Set-DeviceAcl and the permissions will be updated.
If you want to apply new permissions to all devices in a group, you will need to get the group (see Get-DeviceGroup) and then enumerate through the devices in the group, using get/Set-DeviceAcl on each member of the group.
Hi Josh,
thank you very much for your answer.
I have now managed to change the Overall-Security so that the connection to the cameras is revoked for one role. However, this is not the cleanest solution I think.
However, I can’t get the camera with Get-DeviceAcl -Camera “Cameraname”.
Example: Get-DeviceAcl -Camera Garage
I get the following error message:
Get-DeviceAcl : The parameter “Camera” cannot be bound. The value “Garage” of type “System.String” cannot be converted to type
“VideoOS.Platform.ConfigurationItems.Camera” type.
In line:1 character:23
+ Get-DeviceAcl -Camera Garage
+ ~~~~~~~~~
+ CategoryInfo : InvalidArgument: (
[Get-DeviceAcl], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,MilestonePSTools.PermissionCommands.GetDeviceAcl
How can I get my DeviceAcl?
What parameters do I need ?
Could you please give me that command if possible?
Thanks in advance.
Maik