Deploy a new VM with PowerCLI
A PowerCLI function that prompts you to select from your Clusters, Hosts, Datastores & Networks. It will then deploy a VM according to the sizes you input 710 total views
710 total views
A PowerCLI function that prompts you to select from your Clusters, Hosts, Datastores & Networks. It will then deploy a VM according to the sizes you input 710 total views
710 total views
For those of us still relatively new to PowerCLI and working towards automating as many robotic tasks as possible, there is a handy tool in vCenter called Code Capture. This has been available since vCenter Server Appliance (VCSA) 6.7U2 in the developer centre so its not exactly new but a lot of people don’t realise
1,081 total views
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
Ive decided to start making use of GitHub to make it easier for people to make use of my some of the powerCLI ive been posting and more importantly for me to keep track of when im adding additional functionality… My Link is below and i will be Uploading to it over the coming weeks
688 total views
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
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
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
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
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