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

function Restart-ApprxrService {
    <#
    .SYNOPSIS
        Restarts the Start-Apprxr Windows service.
    .DESCRIPTION
        Stops and then starts the Start-Apprxr service using standard Windows service management cmdlets.
    #>

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