Powercli to list & delete snapshots

We have realized we are having broken NetApp VMs backup. The process left a lot of VM snapshots. To start off let’s find out those snaps with: get-vm | get-snapshot | where {$_.Description -match "SMVI Snapshot generated for backup"}| Format-Table…

PowerCLI to start and stop Remote Tech Support (SSH)

Another PowerCLI one-liner to start Remote Tech Support (SSH) on ESX/ESXi: Get-Cluster -Name "CIT2 CLuster" | Get-VMHost | Get-VMHostService | ? {$_.Key -eq "TSM-ssh"} | Start-VMHostServiceGet-Cluster -Name "CIT2 CLuster" | Get-VMHost | Get-VMHostService | ? {$_.Key -eq "TSM-ssh"} | Start-VMHostService…

PowerCLI to add vlan to vmware cluster

One-liner to add VLANs to the all hosts within vSphere cluster: Get-Cluster "CIT Cluster" | Get-VMHost | Get-VirtualSwitch -name vSwitch0 | New-VirtualPortGroup -name "Networking – Vlan80" -VLanId 80Get-Cluster "CIT Cluster" | Get-VMHost | Get-VirtualSwitch -name vSwitch0 | New-VirtualPortGroup -name "Networking…

Fork me on GitHub