Copies one or more XProtect Smart Client view groups.
Copies one or more XProtect Smart Client view groups to another top-level view group, or as a child group to a specified destination view group.
If a view group with the same name already exists, the string " - Copy" will be appended repeatedly until the new name of the top-level view group is unique. The entire view group and view hierarchy will be duplicated in the destination view group.
Permissions from the source view group will not be copied to the destination.
- Requires VMS connection and will attempt to connect automatically
- Requires VMS version 21.1
After ensuring there is an open connection to the Management Server, we retrieve a list of top-level view groups. After selecting view group, a copy of the view group is created. Both the source and destination view groups will be top-level view groups. The copy will be named the same, as the original, except the text " - Copy" will be appended to the end of the name.
$viewGroup = Get-VmsViewGroup | Out-GridView -OutputMode Single $subgroup = $viewGroup | Get-VmsViewGroup | Select-Object -First 1 $destination = New-VmsViewGroup -Name 'MilestonePSTools' -Force | New-VmsViewGroup -Name 'Subgroup' -Force $subGroup | Copy-VmsViewGroup -DestinationViewGroup $destination -PassThru
The first subgroup from the selected top-level view group is copied to a subgroup of a new top-level view group named "MilestonePSTools", demonstrating that both your source, and destination view groups can be child view groups if needed.
Specifies an optional destination view group. When omitted, the selected view group will be copied to the root folder as a top-level view group.
Specifies that if a view group with the same name exists in the destination view group, the existing view group should be overwritten as long as the ID is different than the source view group. This is likely to throw an error until a Configuration API bug is resolved on the Management Server in 2022 R2, or via a cumulative patch for older versions of the VMS.
Specifies that the new view group copy should be returned to the pipeline.
Specifies the source view group to be copied.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.