PowerCLI Code Capture

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

 643 total views,  2 views today

Connect-VIServer “The SSL Connection Could Not be established”

A super quick post about an issue you’re only really likely to see the first time you use PowerCLI on a system. If youre vCenter is using a certificate that’s not trusted by your device you will see the error: “The SSL Connection could not be established, see inner exception” Fortunately, it’s a quick fix

 487 total views

Reconfigure your VMs following a vSphere Replication Failover

Unfortunately were not always lucky enough to have an awesome product like SRM to manage DR for us and we have to make do with the tools we have available. While vSphere replication will allow you to automatically replicate VMs between sites, that’s about it… once you fail over, it can be a long manual

 790 total views,  1 views today

Back up all VMhost configuration

Quick function that pulls the configuration from all of your vmhosts and saves its to a specified location. If you want to tie this down to a specific Datacenter or Cluster just specify it before “Get-VMHost” Function BackupHosts { $FilePath = Read-host ” Enter located to save files” foreach($esxcli in Get-VMHost){Get-VMHostFirmware -VMHost $esxcli -BackupConfiguration -DestinationPath

 356 total views

List my hosts BIOS version

Today i was asked to confirm the BIOS version of all the hosts in a customers estates to allow them to plan an upgrade. Initially they had planned to check each iLO individually which would have been extremely time consuming, fortunately, there is a quick PowerCLI method: get-vmhost | select name, @{N=” Model”;E={($_ | get-view).hardware.systeminfo.Model}},

 322 total views

VMs with Ballooned or Swapped memory

Here is a short script that will list all VMs that have Swapped & Ballooned Memory, it can be useful for tracking down VMs experiencing performance issues on clusters running into contention issues get-vm | select name, @{N=’MemoryMB’;E={$_.MemoryMB}}, @{N=’SwappedMemory’;E={$_.ExtensionData.Summary.QuickStats.SwappedMemory}}, @{N=’Ballooned’;E={$_.ExtensionData.Summary.QuickStats.BalloonedMemory}} | Where {$_.SwappedMemory -ne “0” -or $_.Ballooned -ne “0”} | ft  299 total views

 299 total views