I need to generate a configuration file for our Pro/Engineer CAD system. I need a recursive list of the folders from a particular drive on our server. However I need to EXCL
I'd do it like this:
Get-ChildItem -Path $folder -r | ? { $_.PsIsContainer -and $_.FullName -notmatch 'archive' }