From 4300575df62283d9a260d4abd285f620fb96f3ca Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 14 Aug 2023 01:32:57 +0200 Subject: [PATCH] Set Windows to store UTC time --- profiles/DerGeret/Windows/Restore.ps1 | 4 ++++ scripts/Windows/Config/Windows/Install.ps1 | 2 -- scripts/Windows/OS/Install.ps1 | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/profiles/DerGeret/Windows/Restore.ps1 b/profiles/DerGeret/Windows/Restore.ps1 index dac5225d..14e03cdb 100644 --- a/profiles/DerGeret/Windows/Restore.ps1 +++ b/profiles/DerGeret/Windows/Restore.ps1 @@ -3,6 +3,10 @@ . "$PSScriptRoot/../../../scripts/Windows/Scripts/Prerequisites.ps1"; . "$PSScriptRoot/../../../scripts/Windows/Scripts/Context.ps1"; +function Initialize-Configuration { + Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Value 1 -Type "DWord"; +} + Write-Host "Starting Restoration of Windows"; . "$PSScriptRoot/../../../scripts/Windows/OS/Install.ps1"; [Context]$context = [Context]::new(); diff --git a/scripts/Windows/Config/Windows/Install.ps1 b/scripts/Windows/Config/Windows/Install.ps1 index eb9bfe2f..1e17483c 100644 --- a/scripts/Windows/Config/Windows/Install.ps1 +++ b/scripts/Windows/Config/Windows/Install.ps1 @@ -77,7 +77,5 @@ $startLayout | Add-Member -NotePropertyName "primaryOEMPins" -NotePropertyValue $startLayout | ConvertTo-Json -Compress | Set-Content "$env:SystemDrive\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.json"; -Write-Information "Copy Region & Language Settings to System Configuration"; - Pop-Location; Remove-Item -Recurse "$tempDir"; diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index d51ceb8d..0a6b4da1 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -11,6 +11,9 @@ function Invoke-WindowsInstallation([Context] $context) $softwarePath = "$PSScriptRoot/../Software"; if (-not $context.Get("InitialConfiguration")) { + if ((Get-Command Initialize-Configuration -ErrorAction SilentlyContinue)) { + Initialize-Configuration $context; + } $null = Enable-WindowsOptionalFeature -Online -All -FeatureName "NetFx3";