Public/ps1/Configuration/Service/Start-ApprxrService.ps1

function Start-ApprxrService {
    <#
    .SYNOPSIS
        Starts the Apprxr Windows service.
    .DESCRIPTION
        Starts the Apprxr service using standard Windows service management cmdlets. The service name can be specified using the NameExtension parameter, or determined from configuration for the current session.
    .PARAMETER NameExtension
        Optional. If specified, starts the service named 'ApprxrService_<NameExtension>'. If not specified, uses the configured service name for the session via Get-ServiceNameApprxr.
    .EXAMPLE
        Start-ApprxrService -NameExtension 'Test'
        # Starts the service 'ApprxrService_Test'.
    .EXAMPLE
        Start-ApprxrService
        # Starts the currently configured Apprxr service for the session.
    #>

    [CmdletBinding()]
        param(
            [string]$NameExtension
        )
        $serviceName = if ($NameExtension) { "ApprxrService$NameExtension" } else { Get-ServiceNameApprxr }
    Start-Service -Name $serviceName
    Write-Host "Service '$serviceName' started." -ForegroundColor Green
}