All KB cards
vRealize Automation – Explore IaaS objects with Linqpad

Get Linqpad and run the setup.

Connect

Once installed, you can connect LinqPad with your IaaS server:

  • URL: https://iaas-manager.domain.tld/Repository/Data/ManagementModelEntities.svc
  • Type: ODATA3
  • Credential: IaaS Service Account

After validation, and a couple of minutes to load the database schema, you should see the list of tables:

And on the right part of screen you can enter C# Expression (by default) requests.

Requests

Here are some requests samples:

To get a subset list of VMs in the IaaS db:

VirtualMachines.Take(100)

To filter on VM name:

VirtualMachines.Where(vm=> vm.VirtualMachineName == "MyVMName")

To display expanded properties of an object, it’s possible to use:

VirtualMachines.Expand("StaticIPv4Addresses").Where(vm=> vm.VirtualMachineName == "MyVMName")

Credits

This card is highly inspired by the two following blog posts: