GPO tool

Group Policy made searchable

A free ADMX browser or comparison tool for IT administrators. Search policies, find registry keys, and see exactly what each setting writes to the Windows Registry. Or compare two GPO backups to see exactly what has changed between them.

Select a product
  • Select a category.

Do not use temporary folders per session

This policy setting allows you to prevent Remote Desktop Services from creating session-specific temporary folders.

You can use this policy setting to disable the creation of separate temporary folders on a remote computer for each session. By default, Remote Desktop Services creates a separate temporary folder for each active session that a user maintains on a remote computer. These temporary folders are created on the remote computer in a Temp folder under the user's profile folder and are named with the sessionid.

If you enable this policy setting, per-session temporary folders are not created. Instead, a user's temporary files for all sessions on the remote computer are stored in a common Temp folder under the user's profile folder on the remote computer.

If you disable this policy setting, per-session temporary folders are always created, even if the server administrator specifies otherwise.

If you do not configure this policy setting, per-session temporary folders are created unless the server administrator specifies otherwise.

Registry Information

VendorMicrosoft
ProductTerminal Server
CategoryRemote Desktop Services › Remote Desktop Session Host › Temporary folders
Applies toComputer Configuration
Supported onWindows NET
Registry Key[HKLM]SOFTWAREPoliciesMicrosoftWindows NTTerminal Services
Value NamePerSessionTempDir
TypeREG_DWORD
Enabled value0
Disabled value1

Registry File (.reg)

Windows Registry Editor Version 5.00

; Enable the policy
[HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindows NTTerminal Services]
"PerSessionTempDir"=dword:00000000

; Disable the policy
[HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindows NTTerminal Services]
"PerSessionTempDir"=dword:00000001

PowerShell

# Enable the policy
Set-ItemProperty -Path "HKLM:SOFTWAREPoliciesMicrosoftWindows NTTerminal Services" -Name "PerSessionTempDir" -Value 0 -Type DWord

# Disable the policy
Set-ItemProperty -Path "HKLM:SOFTWAREPoliciesMicrosoftWindows NTTerminal Services" -Name "PerSessionTempDir" -Value 1 -Type DWord