Thank you. That worked. Now I am having issue exporting it to a CSV.
When I add Export-CSV cmd to a CSV file I get coded output. When I OUT-FILE cmd to a TXT file I get the correct data. However the table format is not correct for Excel to recognize it cleanly when I import the TXT file. While a headache for formating, I would like to correct this, make it clean and automated. I have a couple of these for several differnet vCenters.
Works for TXT file:
Get-Folder | Get-FolderPath | Format-Table -AutoSize | Out-File "C:\Scripts\folder_structure\results.txt"
Doesnt Work for CSV:
Get-Folder | Get-FolderPath | Format-Table -AutoSize | Export-CSV "C:\Scripts\folder_structure\results.csv"
Thanks,
BostonTechGuy