12 Replies Latest reply on Jun 13, 2019 6:24 AM by unibn

    powercli get guest OS version reported by VMware tools versus configured when VM created or edited.

    mprobst Lurker

      in my inventory scripts and in what RV tools outputs I get the OS version that is selected for the VM in edit settings - options - version.  I would like to also output a list of the OS version that VMware tools is reporting so I can find the ones with wrong OS selected and fix them.  I have tried .extensiondata.config.tools  and I dont see the OS listed there, does anyone know where it is listed?


      PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $vm1.extensiondata.config.tools


      ToolsVersion         : 9354

      AfterPowerOn         : True

      AfterResume          : True

      BeforeGuestStandby   : True

      BeforeGuestShutdown  : True

      BeforeGuestReboot    :

      ToolsUpgradePolicy   : upgradeAtPowerCycle

      PendingCustomization :

      SyncTimeWithHost     : True

      LastInstallInfo      : VMware.Vim.ToolsConfigInfoToolsLastInstallInfo

      DynamicType          :

      DynamicProperty      :



      side note,  where can I find a resource that shows what options are available for each get command, like get-host and get-vm?  I am learning a lot about what I can find in powercli by running this command and exploring the ones that return VMware.Vim......, but would save me a lot of time to be able to just go look it up.


      PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $vm1 = get-vm test-vm1

      PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $vm1.extensiondata



      Capability           : VMware.Vim.VirtualMachineCapability

      Config               : VMware.Vim.VirtualMachineConfigInfo

      Layout               : VMware.Vim.VirtualMachineFileLayout

      LayoutEx             : VMware.Vim.VirtualMachineFileLayoutEx

      Storage              : VMware.Vim.VirtualMachineStorageInfo

      EnvironmentBrowser   : EnvironmentBrowser-envbrowser-653

      ResourcePool         : ResourcePool-resgroup-11

      ParentVApp           :

      ResourceConfig       : VMware.Vim.ResourceConfigSpec

      Runtime              : VMware.Vim.VirtualMachineRuntimeInfo

      Guest                : VMware.Vim.GuestInfo

      Summary              : VMware.Vim.VirtualMachineSummary

      Datastore            : {Datastore-datastore-591}

      Network              : {Network-network-145}

      Snapshot             :

      RootSnapshot         : {}

      GuestHeartbeatStatus : green

      LinkedView           :

      Parent               : Folder-group-v41

      CustomValue          : {}

      OverallStatus        : green

      ConfigStatus         : green

      ConfigIssue          : {}

      EffectiveRole        : {-1}

      Permission           : {}

      Name                 : test-vm1

      DisabledMethod       : {Destroy_Task, UnregisterVM, RevertToCurrentSnapshot_Task, RemoveAllSnapshots_Task...}

      RecentTask           : {}

      DeclaredAlarmState   : {alarm-10.vm-653, alarm-11.vm-653, alarm-2.vm-653, alarm-23.vm-653...}

      TriggeredAlarmState  : {}

      AlarmActionsEnabled  : True

      Tag                  : {}

      Value                : {}

      AvailableField       : {FA.GosAgent}

      MoRef                : VirtualMachine-vm-653

      Client               : VMware.Vim.VimClientImpl