Exports the specified rule(s) into a simplified and portable JSON format.
Export-VmsRule cmdlet exports rules to simplified PSCustomObjects and/or
JSON objects on disk. These exported rules can be used for reporting, or for
rebuilding rules on the same, or a different XProtect Management Server.
Note that when importing rules, the ID's of the devices, time profiles, events, and other items referenced in the rule definitions must exist with either the same ID, or at least the same name, otherwise the rules will fail to import.
When importing rules with references to user-defined events, generic events, or analytic events, it may be enough for the properties in the rule definitions to reference the events by name. However, for rules with references to specific cameras or other devices, or device groups, you must modify the rule definitions to include the item "Paths" or ID's as needed prior to importing.
- Requires VMS connection and will attempt to connect automatically
Exports all rules in JSON format to a file named "rules.json" on the desktop of the current user profile.
Exports all rules with the word "Default" in the name to a file named "default-rules.json" on the desktop of the current user profile.
Exports all rules with the word "Default" in the name and then creates copies with names prepended with "Copy of ".
Specifies the file at the path specified should be overwritten if it exists.
Specifies that the simplified rule definition should be returned to the pipeline.
Specifies the full path to a file where the JSON formatted rule definitions
should be exported. If the file already exists, you must include
indicate that the file should be overwritten.
Specifies one or more rules returned by Get-VmsRule. When omitted, all rules will be exported. Rules may be provided by name and names will be tab-completed.
- Allowed item types: Rule
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Milestone's Configuration API does not support all possible types of rules, and some rules defined in Management Client may not be returned by Get-VmsRule or exported with Export-VmsRule. See the [Rules Configuration](https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/intro_configurationapi.html&tree=tree_4.html) section of the configuration api getting-started guide in Milestone's MIP SDK documentation for more information.