Public/Debugging/Clear-ASDConsole.ps1


function Clear-ASDConsole
{
    Param(
        [Parameter(Mandatory=$false)][String]$Shell
        )

        $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-ASDefaultShell snippet.'
            return
        }
        $uri = "http://$($shellLocal):4444/api/debugging/disableonscreenconsole" 
        $result = Invoke-RestMethod -Uri $uri -Method POST
        Write-Host $result
}