Last active
May 31, 2017 20:18
-
-
Save PixelRobots/67b89212c609c70d7f31cedff39f42f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create new VM Group | |
New-VMGroup -Name "BackEnd" -GroupType VMCollectionType -Verbose | |
# Add VMs to VM Collection Group | |
Add-VMGroupMember -Name "BackEnd" -VM (Get-VM "SQL01"),(Get-VM "SQL02") | |
# Verify Group Members | |
(Get-VMGroup -Name "BackEnd").VMMembers | |
# Find group VM is member of | |
Get-VM | FT Name, Groups -autosize | |
# Create a Management Group | |
New-VMGroup -Name "CRM_APP" -GroupType ManagementCollectionType | |
# Nest Groups to Management Group | |
Add-VMGroupMember -VMgroup (Get-VMGroup "CRM_APP") -VMGroupMember (Get-VMGroup "FrontEnd"), (Get-VMGroup "BackEnd") | |
# Verify Group nesting | |
(Get-VMGroup -Name "CRM_APP").VMGroupMembers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment