VMWare/powerCLI

Aus SchnallIchNet
Wechseln zu: Navigation, Suche


Snippets

yadda


get list of snapshots (of all VMs)

get-vm | get-snapshot | format-list VM,Created,SizeGB,IsCurrent

or

foreach($vm in Get-View -ViewType VirtualMachine -Property Name,Snapshot -Filter @{'Snapshot' = ''}){

   $vm.Snapshot.RootSnapshotList | %{

   Get-SnapChild -Snapshot $_ | Select @{N='VM';E={$vm.name}},@{N='Snapshot';E={$_}}

   }

}

get VMWare-Tools status

get-vm | % { get-view $_.id } | select Name, @{ Name="ToolsVersion"; Expression={$_.config.tools.toolsVersion}},@{ Name="ToolStatus"; Expression={$_.Guest.ToolsVersionStatus}}