Function: Get The Supported Code Pages of a PowerShell Host

by Simon Sparks · 23 September 2026

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

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

Filename: OrchestratorService.ts

Description: Orchestrator Function to Get The Supported Code Pages of a PowerShell Host

Function: getSupportedCodePages

public getSupportedCodePages(): string[] {

    // @ts-ignore
    let arrCodePage: any[] = PowerShellShellCodePage.values();

    let arrResult: string[] = arrCodePage.map((objCodePage: any): string => {
        return objCodePage.name;
    });

    return arrResult;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like