5 Days now… Till? Guessed yet? If not, here are 5 PowerShell one-liner’s you cant live without.
- get-vm | get-snapshot | where { $_.Created -le (Get-Date).AddDays(-7)}
- get-vm | get-view | %{ $_.Config } | select Name,Uuid
- get-vm | Get-CDDrive | Set-CDDrive -Connected:$false -Confirm:$false
- get-template MyTemplate | new-vm -vmhost esxserver01 -name MyVM -OSCustomizationSpec MySpec
- get-vmhost –name servername | set-vmhost –state maintenance
What are your favorite VI ToolKit PowerShell one-liners? Tell me in the comments.