Remove-XboxFile.ps1

function Remove-XboxFile
{
    param(
    [string]$filename,
    [switch]$isdirectory
    )
    
    process {
        $Result = $xbdm::DmDeleteFile($filename, $isdirectory)
        if ($Result -lt 0) {
            Write-Error $xbdm::DmTranslateError($Result)
        }
    }
}