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

Which host should i deploy to based off current CPU & Memory usage?

The function “VP-WhichHost” will check the average CPU & Memory utilization of a specified cluster and then display all hosts that are below the average. All results are taken from real time metrics. It is broken out into 3 sections of “Below Average Memory”, “Below Average CPU” & “Below both AVG CPU & Memory” to

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

Configure NTP & Syslog

The below script allows you to quickly configure the NTP & Syslog settings on all hosts in a specified cluster. It will prompt you to enter an NTP server & Syslog server address before applying it to each host. Im using my usual variables:$Global:DCChoice – DC Choice$Global:CLUChoice – Cluster Choice function VP-SetNTPandSyslog { $NTPServer =

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

Check VUM Compliance of a cluster

This is a fairly straightforward couple of one liners that use my usual variables (i will list them below). $global:DCChoice – DC Choice $global:CLUChoice – Cluster Choice You can add or remove these variables as required #Run a VUM compliance checkGet-Datacenter $global:DCChoice | Get-Cluster $global:CLUChoice | Scan-Inventory #Check VUM Compliance resultsGet-Datacenter $global:DCChoice | Get-Cluster $global:CLUChoice

Loading