By default, In windows server machines, when you login to the machines using Remote Desktop Session, it will create a temporary sub directory in the temp folder and redirects to this when we tried to access temp folder using %temp%
As you see the number marked at the end.
We can disable this behavior using the below setting in group policy.
For server 2003:
group policy: Administrative Templates\Windows Components\Terminal Services\Temporary folders . If you don’t select Do not use temporary folders per session, then these TEMP subdirectories are created.
For server 2008 and above:
group policy: Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Temporary folders
Reference: https://technet.microsoft.com/en-us/library/cc755098(v=ws.11).aspx
The following tool, from Microsoft TechNet, allows management of Group Policy via the command line, and thus scripting as well:
The registry used is:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]
“PerSessionTempDir”=dword:00000000
No comments:
Post a Comment