Skip to content

Instantly share code, notes, and snippets.

@sean-gilliam
Created March 9, 2020 22:06
Show Gist options
  • Save sean-gilliam/7a07f501cbfb4d1659a75d5984ea7424 to your computer and use it in GitHub Desktop.
Save sean-gilliam/7a07f501cbfb4d1659a75d5984ea7424 to your computer and use it in GitHub Desktop.
Powershell exclusion list
$folderExclusionList = @("bin", "obj" ,"packages")
...
Where-Object {
$dir = $_.DirectoryName
# return all directories that don't have part of the exclusion list in the name
$null -eq ($folderExclusionList | Where-Object { $dir -match $_ })
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment