Exports one or more roles to a JSON file.
Export-VmsRole cmdlet exports one or more roles to a JSON file. The resulting
file can be imported on the same VMS to restore lost or changed roles, or it can
be imported on a different VMS to copy or synchronize roles from one site to another.
When importing roles with references to time profile names, smart client profile
names, or external login provider names that do not exist, the associated role
properties will be skipped and the remaining properties will be imported. If you
later create the missing configuration items and re-import the role(s) with the
-Force switch, the roles will be updated accordingly.
On a default installation of Milestone XProtect Corporate, the size of the JSON file containing the exported roles is ~11KB per role. The file size will vary significantly depending on the number of role members.
- Requires VMS connection and will attempt to connect automatically
Export all roles to a file named 'roles.json' in the current folder.
Export the Administrators role to a file named 'administrators-role.json' in the current folder.
Export all roles to a variable named
$roleDefinitions instead of exporting the
roles to a file on disk. The variable is the same object or collection of objects
that, when used with the
Path parameter, is converted to JSON and written to disk.
Return the role definition(s) to the pipeline instead, or in addition to saving them to a file on disk.
Specifies a file path with a .json extension.
Specifies one or more roles to export. If no role is provided, all roles will be exported.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.