I believe that this is possible by taking the 'Mode' information. ( See this answer here )
Basically, then, anything listed by the Get-ChildItem command whereby the 'Mode' begins with "d".
Here's the actual meanings of the 6 possible values in 'Mode', if you didn't want to go to @Joey's answer:
In any case, the full list is:
d - Directory a - Archive r - Read-only h - Hidden s - System l - Reparse point, symlink, etc.
So I've used this to output a CSV, which I'll then flag the folders in excel, or my Flow, or SharePoint. The command I've used is:
Get-ChildItem -Recurse | Select-Object DirectoryName, BaseName, Extension, Mode | Export-Csv -Path INSERTPATH\listings.csv -Encoding ascii -NoTypeInformation
Hope that this helps anyone that comes across it.
Caveat, this is first time that I'm answering with the full intent of answering. I believe that even though this is 6 years old, people will still find it useful when trying to achieve the same thing.