From b48821eeffb3a4dc4218d5811ff8080dda0e8841 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 10 Aug 2024 19:26:53 +0200 Subject: [PATCH] Retrieve registry value properly --- scripts/Windows/OS/Install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index ee643b7b..d87c37d9 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -454,7 +454,7 @@ $null = New-Module { $timeZoneOption = "Start"; $timeZoneKey = "HKLM:\SYSTEM\CurrentControlSet\Services\tzautoupdate"; $service = Get-Service W32Time; - $autoUpdate = Get-ItemProperty $timeZoneKey -Name $timeZoneOption; + $autoUpdate = (Get-Item $timeZoneKey).GetValue($timeZoneOption); $stopped = ($service.Status -eq "Stopped"); $setUpdate = { param([int] $Value) Set-ItemProperty $timeZoneKey -Name $timeZoneOption $Value };