Orchestrator Function: Find vCenter Host Service by Name

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

Description: Orchestrator Function to Find vCenter Host Service by Name

Function VcHostServiceFindByName

publicVcHostServiceFindByName(objVcHostServiceSystem:VcHostServiceSystem,strVcHostServiceName:string):VcHostService{
letobjVcHostServiceInfo:VcHostServiceInfo=objVcHostServiceSystem.serviceInfo;

letarrVcHostService:VcHostService[]=objVcHostServiceInfo.service;

letobjVcHostService:VcHostService=arrVcHostService.find((objVcHostService:VcHostService):void=>{
returnobjVcHostService.key===strVcHostServiceName;
});

returnobjVcHostService;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like