Orchestrator Function: vCenter Virtual Machine Get All Virtual Devices by Type

by Simon Sparks · 2 February 2026

To use this function add it to the class library file named vCenterServerService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: vCenterServerService.ts

Function: VcVirtualMachineGetAllVcVirtualDevicesByType

privateVcVirtualMachineGetAllVcVirtualDevicesByType<T>(objVcVirtualMachine:VcVirtualMachine):T[]{

letarrVcVirtualDevice:VcVirtualDevice[]=this.VcVirtualMachineGetAllVcVirtualDevices(objVcVirtualMachine);

//@ts-ignore
letarrVcVirtualDeviceType:T[]=arrVcVirtualDevice.filter((objVcVirtualDevice:VcVirtualDevice):objVcVirtualDeviceisT=>{
//@ts-ignore
returnobjVcVirtualDeviceinstanceofT;
});

returnarrVcVirtualDeviceType;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like