Zend certified PHP/Magento developer

PowerShell Get-ChildItem exclude a subfolder

I’m trying to use the PowerShell Get-ChildItem command to get all subfolders recursively of a folder but excluding one subfolder (name “Generated Files”). I tried the following commands but neither correctly exclude:

Get-ChildItem -Recurse | ? Name -notMatch 'Generated Files'
Get-ChildItem -Recurse -Exclude "Generated Files"

If it matters, the “Generated Files” folder is not directly under the directory where I’m running this command, it’s a few levels deep.

How do I correctly exclude such a subfolder?