Retrieve registry value properly
This commit is contained in:
parent
f5d971922a
commit
b48821eeff
1 changed files with 1 additions and 1 deletions
|
@ -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 };
|
||||
|
|
Loading…
Reference in a new issue