VMware Cloud Community
dhadhabeer
Contributor
Contributor
Jump to solution

PowerCLI script to change the OS details for guest vm

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

0 Kudos
1 Solution

Accepted Solutions
ryanrpatel
Enthusiast
Enthusiast
Jump to solution

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.Gu...

View solution in original post

0 Kudos
3 Replies
ryanrpatel
Enthusiast
Enthusiast
Jump to solution

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.Gu...

0 Kudos
dhadhabeer
Contributor
Contributor
Jump to solution

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

0 Kudos
ryanrpatel
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos