Category Archives: accesschk.exe

Auditing file permissions with Powershell and accesschk.exe

I needed to determine the level of access specific users had.  I used a mix of Powershell and accesschk.exe (You can download from here (new window):
Using the command from powershell:
.accesschk.exe –s “%DOMAIN%%USER%” %DIRECTORYTOCHECK% | Out-File %LOGFILE%
eg: to find out which files in the f:qld folder that the user SALESjohnsa has access to, logging to f:itaccessjohnsa.txt
.accesschk.exe –s “SALESJohnsa” f:qld | Out-File f:itaccessjohnsa.txt
You can also restrict this to listing the directories that can be accessed, by using the –d switch:
.accesschk.exe –s –d “SALESJohnsa” f:qld | Out-File f:itaccessjohnsa.txt