To use this function add it to the class library file named OrchestratorPluginSRMService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorPluginSRMService.ts
Public Function: FindForType
publicFindForType<T>(strObjectType:"Command"|"ConfigurationSettings"|"FaultDomain"|"LocalDatacenter"|"LocalNetwork"|"LocalResourcePool"|"NetworkDevice"|"PlaceholderDatastore"|"Prompt"|"ProtectedDatastore"|"ProtectedVm"|"ProtectionFolder"|"ProtectionGroup"|"RecoveryFolder"|"RecoveryPlan"|"RecoveryPriority"|"RemoteDatacenter"|"RemoteNetwork"|"RemoteResourcePool"|"ReplicationGroup"|"Root"|"ScriptingObjectTask"|"Site"|"UnassignedReplicatedDatastore"|"UnassignedReplicatedVm"|"UnreplicatedDatastore"|"VirtualMachinePowerState",strObjectID:string):T{
letstrObjectTypePrefix:string="SRM";
letstrObjectTypeName:string=`${strObjectTypePrefix}:${strObjectType}`;
letobjObjectType:T=this.serverFindForType<T>(strObjectTypeName,strObjectID);
returnobjObjectType;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
