The Import-VmsRule cmdlet imports rules that have been exported using
Export-VmsRule. 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.
REQUIREMENTS
Requires VMS connection and will attempt to connect automatically
Exports all rules available through the Configuration API to a file on the
desktop named "rules.json".
Then the rules are imported, which would normally create new rules with duplicate
names unless the previously exported rules have been renamed or deleted, or the
definitions for the rules to be imported have been manually provided with unique
DisplayName values.
Thanks to the presence of the -WhatIf switch, you will only see what would
happen if you ran the command again without -WhatIf.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.