Using DRS recommendations
To retrieve the available DRS recommendations from the provided clusters, you can use the Get-DrsRecommendation
cmdlet. This is useful if you configured DrsAutomationLevel
on your cluster as Manual
or PartiallyAutomated
. The syntax of the Get-DrsRecommendation
cmdlet is:
Get-DrsRecommendation [[-Cluster] <Cluster[]>] [-Refresh] [-Priority <Int32[]>] [-Server <VIServer[]>] [<CommonParameters>]
In the next example, you will retrieve all of the DRS recommendations for all of the clusters:
PowerCLI C:\ > Get-DrsRecommendation Priority Recommendation Reason -------- -------------- ------ 2 Migrate VM 'VM1' from host... Fix soft VM/host affinity r...
To apply a DRS recommendation, you can use the Apply-DrsRecommendation
cmdlet. This cmdlet has the following syntax:
Apply-DrsRecommendation [-DrsRecommendation] <DrsRecommendation[]> [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
The -DrsRecommendation...