Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

get-mcasfile doesn't filter on "Other" parameter #109

Open
silviews opened this issue Feb 15, 2023 · 0 comments
Open

get-mcasfile doesn't filter on "Other" parameter #109

silviews opened this issue Feb 15, 2023 · 0 comments

Comments

@silviews
Copy link

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]}))}}}

'

Limits the results to items 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[]]$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,
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant