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 configure the DrsAutomationLevel on your cluster as Manual or PartiallyAutomated. The syntax of the Get-DrsRecommendation cmdlet is as follows:

Get-DrsRecommendation [[-Cluster] <Cluster[]>] [-Refresh]
    [-Priority <Int32[]>] [-Server <VIServer[]>] [<CommonParameters>]

The Get-DrsRecommendation cmdlet has no required parameters.

In the following example, you will retrieve all the DRS recommendations for all the clusters:

PowerCLI C:\ > Get-DrsRecommendation


    Priority Recommendation                Reason
-------- --------------                ------
2 Migrate VM 'VM1' from host... Fix soft VM/host affinity r... ...

Get Learning PowerCLI - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.