en-US windows computer

Set user home folder

Verified with Windows 11 25H2 — updated on July 30, 2026

Windows 11 25H2

Supported on: At least Windows Server 2012, Windows 8 or Windows RT

Path in the GPO console

Computer Configuration\Administrative Templates\System\User Profiles

Description

This policy setting allows you to specify the location and root (file share or local path) of a user's home folder for a logon session. If you enable this policy setting, the user's home folder is configured to the specified local or network location, creating a new folder for each user name. To use this policy setting, in the Location list, choose the location for the home folder. If you choose “On the network,” enter the path to a file share in the Path box (for example, \\ComputerName\ShareName), and then choose the drive letter to assign to the file share. If you choose “On the local computer,” enter a local path (for example, C:\HomeFolder) in the Path box. Do not specify environment variables or ellipses in the path. Also, do not specify a placeholder for the user name because the user name will be appended at logon. Note: The Drive letter box is ignored if you choose “On the local computer” from the Location list. If you choose “On the local computer” and enter a file share, the user's home folder will be placed in the network location without mapping the file share to a drive letter. If you disable or do not configure this policy setting, the user's home folder is configured as specified in the user's Active Directory Domain Services account. If the "Set Remote Desktop Services User Home Directory" policy setting is enabled, the “Set user home folder” policy setting has no effect.

Registry

HKLM Software\Policies\Microsoft\Windows\System

More options available

Options

Location:
HomeDirLocation enum
  • On the network -> 1
  • On the local computer -> 0
Path:
HomeDir text
Drive letter
HomeDirDrive enum
  • G:
  • H:
  • I:
  • J:
  • K:
  • L:
  • M:
  • N:
  • O:
  • P:
  • Q:
  • R:
  • S:
  • T:
  • U:
  • V:
  • W:
  • X:
  • Y:
  • Z: (default)

MDM / Intune (CSP)

./Device/Vendor/MSFT/Policy/Config/ADMX_UserProfiles/USER_HOME
Device Since Windows 10, version 2004 with KB5005101 [10.0.19041.1202] and later | Windows 10, version 20H2 with KB5005101 [10.0.19042.1202] and later | Windows 10, version 21H1 with KB5005101 [10.0.19043.1202] and later | Windows 11, version 21H2 [10.0.22000] and later Official mapping (Microsoft Learn)

Microsoft Learn documentation Mapping data: Microsoft Learn (CC BY 4.0)

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Set user home folder
; State: Enabled
; Supported on: At least Windows Server 2012, Windows 8 or Windows RT

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\System]
"HomeDirLocation"=dword:00000001
"HomeDir"=""
"HomeDirDrive"="Z:"
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Set user home folder
# State: Enabled
# Supported on: At least Windows Server 2012, Windows 8 or Windows RT

$path = 'HKLM:\Software\Policies\Microsoft\Windows\System'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'HomeDirLocation' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'HomeDir' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'HomeDirDrive' -Value 'Z:' -Type String

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview