VMware Explore happening NOW!

5 Days – 5 PowerShell One-Liners You Can’t Live Without

5 Days now… Till? Guessed yet? If not, here are 5 PowerShell one-liner’s you cant live without.

  1. get-vm | get-snapshot | where { $_.Created -le (Get-Date).AddDays(-7)}
  2. get-vm | get-view | %{ $_.Config } | select Name,Uuid
  3. get-vm | Get-CDDrive | Set-CDDrive -Connected:$false -Confirm:$false
  4. get-template MyTemplate | new-vm -vmhost esxserver01 -name MyVM -OSCustomizationSpec MySpec
  5. get-vmhost –name servername | set-vmhost –state maintenance

What are your favorite VI ToolKit PowerShell one-liners? Tell me in the comments.