The 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.
REQUIREMENTS
Requires VMS connection and will attempt to connect automatically
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.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.