0 Replies Latest reply on Oct 24, 2014 6:00 AM by ToroAzul

    Powershell autostart (delay) view

    ToroAzul Lurker

      I use Healthcheck powershell scripts.

       

      I'm search to the autostart parameter within VMware like autostart of startpolicy, i try a lot of possibilities until now without success.

      I use this script and hopefully there is somebody with experience

       

      get-vm | where { $_.Name -notmatch "_esXpress" } | % {

        $vm = Get-View $_.ID

          $vms = "" | Select-Object VMName, Hostname, IPAddress, VMState, TotalCPU, TotalMemory, MemoryUsage, TotalNics, ToolsStatus, ToolsVersion, MemoryLimit, MemoryReservation, CPUreservation, CPUlimit, AutoStart

          $vms.VMName = $vm.Name

          $vms.HostName = $vm.guest.hostname

          $vms.IPAddress = $vm.guest.ipAddress

          $vms.VMState = $vm.summary.runtime.powerState

          $vms.TotalCPU = $vm.summary.config.numcpu

          $vms.TotalMemory = $vm.summary.config.memorysizemb

          $vms.MemoryUsage = $vm.summary.quickStats.guestMemoryUsage

          $vms.TotalNics = $vm.summary.config.numEthernetCards

          $vms.ToolsStatus = $vm.guest.toolsstatus

          $vms.ToolsVersion = $vm.config.tools.toolsversion

          $vms.MemoryLimit = $vm.resourceconfig.memoryallocation.limit

          $vms.MemoryReservation = $vm.resourceconfig.memoryallocation.reservation

          $vms.CPUreservation = $vm.resourceconfig.cpuallocation.reservation

          $vms.CPUlimit = $vm.resourceconfig.cpuallocation.limit

          $vms.AutoStart = $vm.VMware.VimAutomation.ViCore.Impl.V1.VimClient.StartPolicy

          $Report += $vms