How to enable pnshell logging for all users on every login.
Steps for Terminal Servers and RDSH
Edit C:\windows\system32\pnshell.cmd on 32bit machines or C:\windows\system32\pnshell.cmd and C:\windows\syswow64\pnshell.cmd on 64bit machines.
The version of pnshell.cmd that the 64bit machine uses depends on the Path Environment Variables settings, modifying both files is required.
Opening the file in a text editor will display similar to the following;
Rem *******************************************************
Rem Added by PMF to prevent app permissions
Rem from applying to admins
Rem *******************************************************
%windir%\SysWOW64\Ifmember Administrators
If Not ErrorLevel 1 Goto SkipAdmins
%windir%\SysWOW64\pnshell.exe /noapp
Goto SkipNonAdmins
:SkipAdmins
%windir%\SysWOW64\pnshell.exe
:SkipNonAdmins
Rem *******************************************************
Rem End of script
Rem *******************************************************
Edit the file as follows:
Rem *******************************************************
Rem Added by PMF to prevent app permissions
Rem from applying to admins
Rem *******************************************************
%windir%\SysWOW64\Ifmember Administrators
If Not ErrorLevel 1 Goto SkipAdmins
%windir%\SysWOW64\pnshell.exe /noapp /log
Goto SkipNonAdmins
:SkipAdmins
%windir%\SysWOW64\pnshell.exe /log
:SkipNonAdmins
Rem *******************************************************
Rem End of script
Rem *******************************************************
The log file will be located in the home drive & path of each user. For example if the users Homedrive were=H: and the Homepath=\users\robert then the log file will be located at H:\users\robert\pnshell.log
Steps for VDI
Technical Support does not provide support for problems that arise from improper modification of the registry. The Windows registry contains information critical to your computer and applications. Make sure you back up the registry before modifying it. For more information on the Windows Registry Editor and how to back up and restore it, refer to Microsoft Article ID 256986 "Description of the Microsoft Windows registry" at Microsoft Support http://support.microsoft.com/default.aspx?kbid=256986
1. Open up Regedit.
2. (X64) Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Provision Networks\Provision-IT
(x86) HKEY_LOCAL_MACHINE\SOFTWARE \Provision Networks\Provision-IT
3. Create a new String Value called PNShellLog
4. Set the path and file name (The path must already exist)
Eg, C:\Logs\Pnshell.log
5. Now log in again in order to generate the log.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center