List DRS Recommendations and apply them

Heres a function i put together that pulls a list of DRS recommendations for your chosen cluster then asks whether you want to apply them. It uses my usual variables from my menu system $Global:DCChoice – Datacenter Choice$global:CLUChoice – Cluster Choice #Apply DRS recomendations? function VP-ApplyDRSRecommendations { Get-Datacenter $global:DCChoice | Get-Cluster $global:CLUChoice | Get-DrsRecommendation Write-Host

Loading

Check host domain membership

Quick one line list all host in a cluster and display their domain membership status Get-Datacenter $global:DCChoice | Get-Cluster $global:CLUChoice | get-vmhost | Get-VMHostAuthentication | select -Property VMhost, @{N=”Domain”;E={$_.vmhost.Domain}},@{N=”DomainMembershipStatus”;E={$_.vmhost.DomainMembershipStatus}}

Loading

Orphaned Files

May been a few years old but the below post from legendary PowerCLI vExpect Luc Dekens is very much still worth checking out…. Awesome script for finding orphaned files on your datastores! During a recent audit i managed to located almost 1TB of forgotten vmdks and iso files on numerous datastores. Anyway, Check it out:

Loading