This example shows how to create an application group containing a DC server and the DNS server and perform other actions on it.
Create an application group
You will need to perform the following steps:
- Get the domain controller server and the DNS server and assign them to a variable. Because the DC server is first in the search, it will boot first. Run Find-VBRHvEntity for this.
- Create the application group with Add-VSBHvApplicationGroup using the created variable.
// Get the VMs:
PS C:\PS> $vms = Find-VBRHvEntity -Name "DC", "DNSServer"
// Create the application group:
PS C:\PS> Add-VSBHvApplicationGroup -Name "Production Application Group" -VmFromBackup $vms
Look for the application group
Run Get-VSBApplicationGroup to get the application group.
PS C:\PS> Get-VSBApplicationGroup -Name "Production Application Group"
Remove the application group
Run Remove-VSBApplicationGroup to remove the application group.
PS C:\PS> Get-VSBApplicationGroup -Name "Production Application Group"| Remove-VSBApplicationGroup