Orchestrator Function: Server Find All For Type

by Simon Sparks · 1 November 2025

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

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

Filename: vCenterServerService.ts

publicserverFindAllForType<T>(strObjectTypeName:string,strXPathQuery?:string):T[]{

if (strXPathQuery){
strXPathQuery=`xpath:${strXPathQuery}`;
}

letarrObjectType:T[]=Server.findAllForType(strObjectTypeName,strXPathQuery)asT[];

returnarrObjectType;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like