From a5e807b64372d67111f60c69c976550fcf536304 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 90aa283b..3e824e80 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -451,7 +451,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 };