Lazy enable longer than 255 characters paths on Windows
On Windows 10 / Windows Server 2016 or newer, you can use longer than 255 characters paths if you set a simple registry key value.
This script needs to be run in PowerShell as Administrator.
Tested in Windows 10, Windows 2016, Windows 2019.
#ps1 $basePath = "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" $keyName = "LongPathsEnabled" # On Windows 10 or newer, it enables the posibility to use # paths longer than 255 characters Set-ItemProperty -Path $basePath -Name $keyName -Value 1 # Applications that use this feature need to be restarted
That's all, folks!
Tweet