# Save the Soap Query as filename.xml and Run the Below command curl -kL -X POST -H "Content-Type: text/xml; charset=utf-8" --data @cluster.xml https://esxi.fqdn/sdk # Retrieve Host Information: <_this xsi:type="ManagedObjectReference" type="PropertyCollector">propertyCollector-123 HostSystem true name,hardware host-123 # Get ESXi Version 00000001-00000001<_this xsi:type="ManagedObjectReference" type="ServiceInstance">ServiceInstance #List all VMs - Authentication Required <_this xsi:type="ManagedObjectReference" type="PropertyCollector">propertyCollector-123 VirtualMachine true name,summary group-d1 false # Query Using Username and Password <_this xsi:type="SessionManager">SessionManager YourUsername YourPassword # Retrieve DataStore information - Auth Required curl -kL -X POST -H "Content-Type: text/xml" -d ' <_this xsi:type="ManagedObjectReference" type="PropertyCollector">propertyCollector-123 Datastore true name,capacity,freeSpace datastore-folder false ' https://esxi.fqdn/sdk # Retreive Cluster Computer Resource - Auth Required <_this xsi:type="ManagedObjectReference" type="PropertyCollector">propertyCollector-123 ClusterComputeResource true name,summary group-d1 false # Retrieve Networking Information - Auth Required <_this xsi:type="ManagedObjectReference" type="PropertyCollector">propertyCollector-123 Network true name,summary network-folder false # Retrieve Resource Pool Information- Auth Required <_this xsi:type="ManagedObjectReference" type="PropertyCollector">propertyCollector-123 ResourcePool true name,summary resource-pool-folder false # Retrieve Alarm Information: <_this xsi:type="ManagedObjectReference" type="PropertyCollector">propertyCollector-123 Alarm true name,description alarm-folder false # Create VM <_this xsi:type="Folder">vm-folder NewVM NewVM 1024 2 resource-pool-123 host-123