I know how to do this with one extension in PowerShell, but since my files have a two part extension this is no longer working for me:
Get-ChildItem . -Recurse | Where-Object { $_.Extension -notin @("*.table.sql")}
>Solution :
The Extension property only contains the last . and whatever else trails after (.sql in your case).
You’ll want to test the whole Name instead, and you’ll want to use the -[not]like operator(s) for wildcard matching:
Get-ChildItem . -Recurse |Where-Object Name -notlike '*.table.sql'
If you want to include only *.sql files to begin with, use the -Filter parameter with Get-ChildItem:
Get-ChildItem . -Recurse -Filter '*.sql' |Where-Object Name -notlike '*.table.sql'