VMware Cloud Community
Ashley004
Contributor
Contributor
Jump to solution

New-vm -GuestID

Hello All

Is there a way to get a listing of all the GuestId's available using PowerCLi  ?

Regards

Ashley

Reply
0 Kudos
1 Solution

Accepted Solutions
mattboren
Expert
Expert
Jump to solution

Hello, Ashley004-

Yes, you can use the GetNames()static method of the System.Enum .NET class to get the names of this enumeration.  Like:

[System.Enum]::GetNames([VMware.Vim.VirtualMachineGuestOsIdentifier])

How does that do?

View solution in original post

Reply
0 Kudos
2 Replies
mattboren
Expert
Expert
Jump to solution

Hello, Ashley004-

Yes, you can use the GetNames()static method of the System.Enum .NET class to get the names of this enumeration.  Like:

[System.Enum]::GetNames([VMware.Vim.VirtualMachineGuestOsIdentifier])

How does that do?

Reply
0 Kudos
Ashley004
Contributor
Contributor
Jump to solution

That is perfect thank you for the help !

Reply
0 Kudos