There is a problem with get-mcasfile with -Filetype Other or "0" . The filer is ignored & all results are returned.
My understanding is when passing 0 as int, returning false.
if ($Filetype) {$filterSet += @{'fileType'=@{'eq'= ([int[]]($Filetype | ForEach-Object {$_ -as [int]}))}}}
if ($FiletypeNot) {$filterSet += @{'fileType'=@{'neq'=([int[]]($FiletypeNot | ForEach-Object {$_ -as [int]}))}}}
[Parameter(ParameterSetName='List', Mandatory=$false)]
[ValidateNotNullOrEmpty()]
[file_type[]]$Filetype,
# Limits the results to items not of the specified file type. Value Map: 0 = Other,1 = Document,2 = Spreadsheet, 3 = Presentation, 4 = Text, 5 = Image, 6 = Folder.
[Parameter(ParameterSetName='List', Mandatory=$false)]
[ValidateNotNullOrEmpty()]
[file_type[]]$FiletypeNot,