Istanbul/Turkey

List and Export Hidden Folders on Shared Folders

First create the csv file that lists your shared folders

Get-SmbShare | select name, path |Export-Csv "C:\hiddenimport.csv" -NoTypeInformation -Encoding UTF8 

Then import the csv and check for hidden folders and export

Import-Csv -Path "C:\hiddenimport.csv" | ForEach-Object{
$path =$_.Path
Get-ChildItem -Directory $path -Hidden -Recurse -ErrorAction SilentlyContinue | select FullName
} |Export-Csv "C:\hiddenFoldersOutput.csv" -NoTypeInformation -Encoding UTF8
  • Hits: 388