mirror of
https://github.com/Disassembler0/Win10-Initial-Setup-Script.git
synced 2026-04-23 03:00:50 -04:00
Add DisableNTFSLastAccess (#136)
This commit is contained in:
committed by
Disassembler0
parent
c5c107c59f
commit
e2646d13e4
@@ -68,6 +68,7 @@ DisableAutorun # EnableAutorun
|
||||
# DisableDefragmentation # EnableDefragmentation
|
||||
# DisableSuperfetch # EnableSuperfetch
|
||||
# DisableIndexing # EnableIndexing
|
||||
# DisableNTFSLastAccess # EnableNTFSLastAccess
|
||||
# SetBIOSTimeUTC # SetBIOSTimeLocal
|
||||
# EnableHibernation # DisableHibernation
|
||||
# DisableSleepButton # EnableSleepButton
|
||||
|
||||
19
Win10.psm1
19
Win10.psm1
@@ -993,6 +993,25 @@ Function EnableIndexing {
|
||||
Start-Service "WSearch" -WarningAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable the updating of the NTFS Last Access Time stamps
|
||||
Function DisableNTFSLastAccess {
|
||||
Write-Output "Disabling the updating of the Last Access Time stamps..."
|
||||
# User Managed, Last Access Updates Disabled
|
||||
fsutil behavior set DisableLastAccess 1 | Out-Null
|
||||
}
|
||||
|
||||
# Enable the updating of the NTFS Last Access Time stamps
|
||||
Function EnableNTFSLastAccess {
|
||||
Write-Output "Enabling the updating of the Last Access Time stamps..."
|
||||
If ([System.Environment]::OSVersion.Version.Build -ge 17134) {
|
||||
# System Managed, Last Access Updates Enabled
|
||||
fsutil behavior set DisableLastAccess 2 | Out-Null
|
||||
} Else {
|
||||
# Last Access Updates Enabled
|
||||
fsutil behavior set DisableLastAccess 0 | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
# Set BIOS time to UTC
|
||||
Function SetBIOSTimeUTC {
|
||||
Write-Output "Setting BIOS time to UTC..."
|
||||
|
||||
Reference in New Issue
Block a user