Public/Renderer/Enable-ASLightsByType.ps1

function Enable-ASLightsByType
{
    Param(
        [String]$Shell,
        [ValidateSet('Spot', 'Directional', 'Point', 'Area', 'Rectangle', 'Disc')]
        [Parameter(Mandatory, Position=0)][string]$type
        )

        # first, get Shell we want to talk to
        $shellLocal = Get-ASDefaultShell
        if($PSBoundParameters['Shell']) {
            $shellLocal  = $Shell
        }
        if([System.String]::IsNullOrEmpty($shellLocal)) {
            Write-Host 'Target shell is not set. Please specify target shell with -Shell parameter or by Set-ASDefaultShellTarget snippet.'
            return
        }


        $uri = "http://$($shellLocal):4444/api/renderer/EnableLightsByType?type=$($type)" 
        $result = Invoke-RestMethod -Uri $uri -Method POST
        Write-Host $result
}