VMware {code} Community
tos2k
Expert
Expert

Howto differentiate HostFolder from VmFolder

Hi!

Short question: Is there a property that can be used to detect if a given Folder from Virtual Center is a HostFolder or a VmFolder using the .NET API?

Currently I check the ManagedObjectReference (value), which starts with "group-h" for hostFolders, but doen't seem to be the perfect implementation though Smiley Happy

TIA, tos2k

0 Kudos
1 Reply
msherman
Enthusiast
Enthusiast

Try the Folder's childType[]. As per the docs, a folder can only have two child types: folder and where something_else is a datacenter, host, vm, etc.

Marc

0 Kudos