VMware vSphere

 View Only
  • 1.  PowerCLI script to change the OS details for guest vm

    Posted Jun 25, 2019 07:45 AM

    Could you please share the powerCLI script to modify the guest OS details in offline..i.e, on a power ON state.



  • 2.  RE: PowerCLI script to change the OS details for guest vm
    Best Answer

    Posted Jun 25, 2019 04:19 PM

    Get-VM -Name XXX | Set-VM -GuestId XXXX -Confirm:$false

    See the SDK reference to get the full list of GuestIDs - https://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html



  • 3.  RE: PowerCLI script to change the OS details for guest vm

    Posted Jun 26, 2019 07:18 AM

    Thanks Ryan

    The powercli script works fine. But the only prerequisites are , VMs should be in power off status .

    the link you provided is having the GuestID for windows 2008 R2 , not for windows 2012 , 2016 . Is there any guestid available for windows 2012, 2016 ?

    Could you please share the full script to implement for multiple VMs if possible.

    thanks



  • 4.  RE: PowerCLI script to change the OS details for guest vm

    Posted Jun 26, 2019 08:40 PM

    I apologize, but that was a very OLD link. Use this one for ESXi 6.5.

    Windows Server 2008 R2 (64 bit) - windows7Server64Guest

    VMware vSphere 6.5 Documentation Library