Powershell - Export structure of folders to txt or xls but only to a depth of 3 folders and no files

Viewed 25022

I am looking to export a folder structure from a server and it's kind of huge. So I am looking to narrow the list to a depth of 3 folders max and show no files. So actually I have a part of the answer here already using Get-ChildItem. But I am missing the parameter to narrow down the list. Any idea ?

Thanks

EDIT: Export to a text file or excel sheet - No robocopy

2 Answers
Related