Download and install administrative templates for Windows Server 2016 and 2019 in your Windows Server 2012 R2 Active Directory
Folow these steps:
- Download Windows 10 and Windows Server 2016 specific administrative templates – or
.admx
files. - Install the downloaded
.msi
file Windows 10 and Windows Server 2016 ADMX.msi on a supported system: Windows 10 , Windows 7, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2. You also need user rights to run the Group Policy Management Editor (gpme.msc
), or the Group Policy Object Editor (gpedit.msc
). But that’s for later use. - The administrative templates are installed in
C:\Program Files (x86)\Microsoft Group Policy\Windows 10 and Windows Server 2016
, or whatever directory you provided during the installation. Copy over the entire folder PolicyDefinitions to your Primary Domain Controller’sSYSVOL\domain\Policies
directory. - Verify you’ve copied the folder, and not just the files. The full path is:
SYSVOL\domain\Policies\PolicyDefinitions
. This is explained in Microsoft’s Technet article Managing Group Policy ADMX Files Step-by-Step Guide.
That’s it, you now have Group Policy Objects available for Windows Server 2016. Let’s enable Win32 long paths support now.
Configure Enable Win32 long paths Group Policy
Protip: learn how to set up WMI filters for Group Policy.
Now that you have your Windows Server 2016 Group Policy Objects available, it’s time to setup a GPO to enable NTFS long path support. Create the GPO in your preferred location, but be sure to target it on Windows Server 2016 only.
Please note that the GPO is called Enable Win32 long paths, not NTFS.
Enabling Win32 long paths will allow manifested win32 applications and Windows Store applications to access paths beyond the normal 260 character limit per node on file systems that support it. Enabling this setting will cause the long paths to be accessible within the process.
Start your Group Policy Management console and click through to the location where you want to add the GPO. Create a new GPO: Create a GPO in this domain, and Link it here...
, and provide your GPO with a relevant name.
In the Settings tab, right click and choose Edit…. Now under Computer Configuration in the Group Policy Management Editor, click through to Policies > Administrative Templates > System > Filesystem. Configure and enable the Setting Enable Win32 long paths.
This is all you have to do to create the Group Policy for long Win32 paths. All that is left is to run gpupdate
in an elevated cmd.exe
command prompt.
Verify LongPathsEnabled registry value
If needed, you can use the following cmd.exe or PowerShell commands to verify the LongPathsEnabled registry value is set correctly:
C:\>reg query HKLM\System\CurrentControlSet\Control\FileSystem /v LongPathsEnabled
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem
LongPathsEnabled REG_DWORD 0x1
Code language: PowerShell (powershell)
PS C:\> (Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled
1
Code language: PowerShell (powershell)
A reboot is not required, and don’t forget your Windows Server 2019 servers.