Create unique host profiles for each host in a cluster

The below command will create a host profile for each host found in $global:CLUChoice, The profile will be named “VMhostName-Profile” and will include the date the profile was taken in the description $global:DCChoice – Datacenter$global:CLUChoice – Cluster Get-Datacenter $global:DCChoice | Get-Cluster $global:CLUChoice | Get-VMHost | ForEach-Object -Process { New-VMHostProfile -Name “$($_.Name)-Profile” -Description “$($_.Name)) Profile. This

 667 total views,  1 views today

Quickly add additional disks to your VMs

You have the option of either using the variable $VM to specify multiple VMs that require the same disk configuration, or you can manually enter the VM name in its place #Specify VMs $vm = Get-VM “*VM Name*” #Add a thick provisioned, Eager Zeroed disk to 1 or more VMs: New-HardDisk -StorageFormat EagerZeroedThick -Controller “SCSI

 766 total views,  1 views today

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

 895 total views

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

 802 total views

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}}  736 total views

 736 total views

Take a snapshot with standardized naming

As with everything in IT, having things standardized generally makes your life easier. Unfortunately in many environments, snapshots tend to get overlooked and their naming convention can end up a little adhoc which can lead to confusion around who and why they were taken. Ive put together the following script which takes a snapshot with

 823 total views,  1 views today