3

I want to make a list of access denied files/folders for a given account. I'm aware "icacls" handles making lists of files/folders given an account name.

e.g. This command lists access denied per folder on screen:

icacls c:\*. /findsid "User" /T /C /L /Q > c:\results.txt

...but it doesn't list the access denied folders in the results file.

How can I do this?

DavidPostill
  • 162,382

1 Answers1

2

Nevermind, I figured it out. The issue was that there's two ways to output:

  1. Through "STDOUT"

  2. Through "STDERR"

https://support.microsoft.com/en-us/kb/110930#/en-us/kb/110930

So, I can just execute something like so:

icacls c:*. /findsid "User" /T /C /L /Q 2> c:\resultsFolders.txt

icacls c:*.* /findsid "User" /T /C /L /Q 2> c:\resultsFiles.txt