Category Archives: sysinternals

Setup Powershell Remoting … Remotely

You can use Sysinternals psexec to setup powershell remoting … remotely.

Get psexec.exe from here: 

The command to install it is:

psexec \%PCNAME% -h c:windowssystem32winrm.cmd quickconfig –quiet

Where %PCNAME% is the name of the PC you wish to install it on.

psexec \WA_P_023 –h:windowssystem32winrm.cmd quickconfig -quiet

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