New-VMGroup `
-Name testgroup1 `
-GroupType VMCollectionType

New-VMGroup `
-Name testgroup2 `
-GroupType VMCollectionType

New-VMGroup `
-Name mgmtgroup `
-GroupType ManagementCollectionType

Add-VMGroupMember `
-name testgroup1 `
-VM (get-vm 'core1', 'core3')

Add-VMGroupMember `
-name testgroup2 `
-VM (get-vm 'test-machine', 'test-machine2')

Add-VMGroupMember `
-Name mgmtgroup `
-VMGroupMember (Get-VMGroup 'testgroup1', 'testgroup2')

Stop-VM `
-VM (Get-VMGroup 'testgroup1').VMMembers `
-Force

$collec = (Get-VMGroup 'mgmtgroup').VMGroupMembers
$vms = ($collec).vmmembers
Start-VM `
-VM $vms 

Get-VMGroup -Name mgmtgroup

Remove-VMGroup -Name *

