Merge pull request #722 from Romanitho/fix2

Fix default values if not existing.
v1
Romain 2024-09-30 22:08:46 +02:00 committed by GitHub
commit 32edac0cb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -30,8 +30,8 @@ function Update-WAU {
Write-ToLog "New registry key created." Write-ToLog "New registry key created."
} }
#Create missing default values #Create missing default values
Set-ItemProperty -Path $destinationPath -Name "WAU_DoNotRunOnMetered" -Value 1 -Type Dword Set-ItemProperty -Path $destinationPath -Name "WAU_DoNotRunOnMetered" -Value 0 -Type Dword
Write-ToLog "WAU_DoNotRunOnMetered created. Value: 1" Write-ToLog "WAU_DoNotRunOnMetered created. Value: 0"
Set-ItemProperty -Path $destinationPath -Name "WAU_UpdatesAtLogon" -Value 0 -Type Dword Set-ItemProperty -Path $destinationPath -Name "WAU_UpdatesAtLogon" -Value 0 -Type Dword
Write-ToLog "WAU_UpdatesAtLogon created. Value 0" Write-ToLog "WAU_UpdatesAtLogon created. Value 0"
#Retrieve the properties of the source key #Retrieve the properties of the source key