DRS Category

Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations.

Step 1: Retrieve a object by running a Get command 


You can READ objects by using Get-DrsClusterGroup cmdlet. See example below:
Get-DrsClusterGroup -VM $vm1, $vm2

Step 2: Run commands from the CRUD group 

You can CREATE objects by using New-DrsClusterGroup cmdlet.

You can UPDATE objects by using Set-DrsClusterGroup cmdlet. See example below:
$vm = Get-VM "MyVM"
Get-DrsClusterGroup "MyClusterGroup" | Set-DrsClusterGroup -VM $vm -Add

You can REMOVE objects by using Remove-DrsClusterGroup cmdlet.

Step 3: Explore More Related Commands: 


Get-DrsRecommendation This cmdlet retrieves the available DRS recommendations from the provided clusters.
Get-DrsRule This cmdlet retrieves the list of DRS rules for the specified clusters.
Get-DrsVMHostRule This cmdlet retrieves VM to VMHost DRS rules that match the specified filters.
Invoke-DrsRecommendation This cmdlet applies the specified DRS recommendations.
New-DrsRule This cmdlet creates a new DRS rule.
New-DrsVMHostRule This cmdlet creates a new VM to VMHost DRS rule.
Remove-DrsRule This cmdlet removes the specified DRS rules.
Remove-DrsVMHostRule This cmdlet removes the specified VM to VMHost DRS rule.
Set-DrsRule This cmdlet modifies an existing DRS rule.
Set-DrsVMHostRule This cmdlet modifies the specified VM to VMHost DRS rule.
Feedback

Was this page helpful?