Get a list of directories in the target location: Get-ChildItem \\myserver\myshare\myshare\ -Directory; Extract only the name of the directories: Select-Object -Property name; Convert the output to CSV format: convertto-csv -NoTypeInformation; Save the result to a file: Out-File c:\temp\mydirectorylist.csv More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.