This post is part of the series on PowerShell Snippets.
The following PowerShell command will export a list of folders and sub-folders from the specified location (the first highlighted section is the starting folder and the second the output path for the CS file):
Get-ChildItem -Path \\nas3\public\movies -Recurse -Directory -ErrorAction SilentlyContinue | Select-Object FullName | Export-CSV c:\temp\export.txt
Click to show/hide the PowerShell Snippets Series Index
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.