Function: vRA Host Create

by Simon Sparks · 11 February 2026

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

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

Filename: OrchestratorPluginVRAService.ts

Description: Orchestrator Function to Create a vRA Host

Public Function: VraHostCreate

public VraHostCreate(strDisplayName: string, strHostnameFQDN: string, strUsername: string, strPassword: string, strSessionMode: "Shared Session" | "Per User Session"): boolean {

    let objRequest: any = {
        name: strDisplayName,
        vraHost: strHostnameFQDN,
        user: strUsername,
        password: strPassword,
        connectionType: "vra-onprem",
        sessionMode: strSessionMode
    };

    try {
        let strResult: string = VraHostManager.save(objRequest);

        this.objLogger.info(`VraHostManager Result: ${strResult}.`);

        return true;
    }
    catch (objException) {
        return false;
    }
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like