Update remediation script
This commit is contained in:
@@ -1,4 +1,19 @@
|
||||
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location") -ne $true) { New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -force -ea SilentlyContinue };
|
||||
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location' -Name 'Value' -Value 'Allow' -PropertyType String -Force -ea SilentlyContinue;
|
||||
if((Test-Path -LiteralPath "HKLM:\SYSTEM\CurrentControlSet\Services\tzautoupdate") -ne $true) { New-Item "HKLM:\SYSTEM\CurrentControlSet\Services\tzautoupdate" -force -ea SilentlyContinue };
|
||||
New-ItemProperty -LiteralPath 'HKLM:\SYSTEM\CurrentControlSet\Services\tzautoupdate' -Name 'Start' -Value 3 -PropertyType DWord -Force -ea SilentlyContinue;
|
||||
$RegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location"
|
||||
$RegistryProperty = "Value"
|
||||
$RegistryValue = "Allow"
|
||||
|
||||
if (!(Test-Path -LiteralPath $RegistryPath)) {
|
||||
New-Item -Path $RegistryPath -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
New-ItemProperty -Path $RegistryPath -Name $RegistryProperty -Value $RegistryValue -PropertyType String -Force -ErrorAction SilentlyContinue
|
||||
|
||||
$ServicePath = "HKLM:\SYSTEM\CurrentControlSet\Services\tzautoupdate"
|
||||
$ServiceProperty = "Start"
|
||||
$ServiceValue = 3
|
||||
|
||||
if (!(Test-Path -LiteralPath $ServicePath)) {
|
||||
New-Item -Path $ServicePath -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
New-ItemProperty -Path $ServicePath -Name $ServiceProperty -Value $ServiceValue -PropertyType DWord -Force -ErrorAction SilentlyContinue
|
||||
|
||||
Reference in New Issue
Block a user