Category: PowerCli

PowerCli – Check and change Advanced VM settings – disk.enableUUID

Added menu stuff: +++++++++++++ POWERCLI SCRIPT +++++++++++++++ # Autor: AA # Datum: 05.10.15 get-cluster | select Name | sort $CLName = Read-Host “Type the exact name of the Cluster to be checked/set for disk.enableUUID” $vms=get-cluster $CLName | get-vm | where {$_.Guest.OSFullName -match “Linux*” } | sort name $vmscount=($vms).count echo ” ====================================================

▶ Using PowerCLI to get the IP address of a VM (vSphere)

Here is a simple but handy PowerCLI one liner which can output the VM name and it’s IP address. Connect-VIServer  <name> <credentials> Get-VM $VM | Select Name, @{N="IP Address";E={@($_.guest.IPAddress[0])}} or get-vmguest $VM | select VM,IPADDRESS VM                IPAddress --                  --------- vmname      {, <ipv6 address>}