# 启用 Windows 自动设置时间 Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Parameters" -Name Type -Value "NTP" # 启用 Windows 时间服务 Set-Service w32time -StartupType Automatic Start-Service w32time # 重新同步时间 w32tm /config /update w32tm /resync /nowait
powershell.exe -ExecutionPolicy Bypass -File "C:\Scripts\EnableAutoTime.ps1"
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FsDepends\Parameters] "VirtualDiskExpandOnMount"=dword:00000004