Generate a list of crypto walled folders with Powershell

    $item = "F:\"
    $params = New-Object System.Collections.Arraylist
    $params.AddRange(@("/L","/S","/NJH","/FP","/NC","/NDL","/TS","/XJ","/R:0","/W:0"))
    $countPattern = "^\s{3}Files\s:\s+(?<Count>\d+).*"
    $sizePattern = "^\s{3}Bytes\s:\s+(?<Size>\d+(?:\.?\d+)\s[a-z]?).*"
    write-host "starting run"
    ((.\robocopy.exe $item NULL $params)) | ForEach {
        If ($_ -match "(?<Size>\d+)\s(?<Date>\S+\s\S+)\s+(?<Time>\S+)\s+(?<FullName>.*)") {
            $FName = $matches.FullName
            if ($FName -like'*HELP_DECRYPT*'){
                write-host $FName
            }
        }
    }

Put robocopy in the same folder as the script.

Jeremy Tirrell

Read more posts by this author.