I have this line:

```
$output.GetEnumerator() | Where-Object { $_.ItemPath -notlike "*.zip" } | Select ItemPath

```

Example output:

```
ItemPath                                                    
--------                                                    
\\devws04                                                   
\\devws04\c$                                                
\\devws04\c$\share                                          
\\devws04\c$\share\Dieser ORdner ist offline erstellt worden
\\devws04\c$\share\FileOfflineMode - Copy.txt               
\\devws04\c$\share\FileOfflineMode.txt                      
\\devws04\c$\share\Personal                                 
\\devws04\c$\share\Personal\Okey Cuuus.txt                  
\\devws04\c$\share\Portfolio.txt   

```

The line excludes path values which contain "\*.zip". It works but I want to use a variable at this place and not append everything to the same line with "and".

I tried following:

```
$ignoreFiles = @("*.zip", "*.psd")
$output.GetEnumerator() | Where-Object { $_.ItemPath -notin $ignoreFiles } | Select ItemPath

```

And several other snippets but none of them worked. It did just nothing to the result. Any hint appreciated! 

This is the full output:

```
ItemPath                                                                            
--------                                                                            
\\devws04                                                                           
\\devws04\c$                                                                        
\\devws04\c$\share                                                                  
\\devws04\c$\share\Dieser ORdner ist offline erstellt worden                        
\\devws04\c$\share\Dieser ORdner ist offline erstellt worden\MeineofflineDateien.zip
\\devws04\c$\share\FileOfflineMode - Copy.txt                                       
\\devws04\c$\share\FileOfflineMode.txt                                              
\\devws04\c$\share\Personal                                                         
\\devws04\c$\share\Personal\Okey Cuuus.txt                                          
\\devws04\c$\share\Portfolio.txt 

```

EDIT:
This is the actual code and my goal is to do a csv-export but before I want to filter the values like described above:

```
$ignoreFiles = "\.zip|\.psd"
#$ignoreFiles = @("*.zip", "*.psd")
    $query = Get-WmiObject -query "SELECT * FROM Win32_OfflineFilesItem"
    $hostName = [System.Net.Dns]::GetHostName()
    $user = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
    $output = @()
    $query | ? {
    $output += [PSCustomObject] @{
            User = $user
            Hostname = $hostName
            ItemPath = $_.ItemPath 
        }
    } 

    $output  | Export-CSV $outputPath -NoTypeInformation # ONLY EXPORT OBJECTS WHERE $_.ItemPath does not contain one of the values from $ignoreFiles!

```