@@ -1161,16 +1161,28 @@ Function EnableSwapFile {
11611161 Remove-ItemProperty - Path " HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" - Name " SwapfileControl" - ErrorAction SilentlyContinue
11621162}
11631163
1164- # Disable the updating of the NTFS Last Access Time stamps
1164+ # Enable NTFS paths with length over 260 characters
1165+ Function EnableNTFSLongPaths {
1166+ Write-Output " Enabling NTFS paths with length over 260 characters..."
1167+ Set-ItemProperty - Path " HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" - Name " LongPathsEnabled" - Type DWord - Value 1
1168+ }
1169+
1170+ # Disable NTFS paths with length over 260 characters
1171+ Function DisableNTFSLongPaths {
1172+ Write-Output " Disabling NTFS paths with length over 260 characters..."
1173+ Set-ItemProperty - Path " HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" - Name " LongPathsEnabled" - Type DWord - Value 0
1174+ }
1175+
1176+ # Disable updating of NTFS last access timestamps
11651177Function DisableNTFSLastAccess {
1166- Write-Output " Disabling the updating of the Last Access Time stamps ..."
1178+ Write-Output " Disabling updating of NTFS last access timestamps ..."
11671179 # User Managed, Last Access Updates Disabled
11681180 fsutil behavior set DisableLastAccess 1 | Out-Null
11691181}
11701182
1171- # Enable the updating of the NTFS Last Access Time stamps
1183+ # Enable updating of NTFS last access timestamps
11721184Function EnableNTFSLastAccess {
1173- Write-Output " Enabling the updating of the Last Access Time stamps ..."
1185+ Write-Output " Enabling updating of NTFS last access timestamps ..."
11741186 If ([System.Environment ]::OSVersion.Version.Build -ge 17134 ) {
11751187 # System Managed, Last Access Updates Enabled
11761188 fsutil behavior set DisableLastAccess 2 | Out-Null
0 commit comments