-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRemidate_AdobeSecuritySettings.ps1
More file actions
43 lines (34 loc) · 1.58 KB
/
Remidate_AdobeSecuritySettings.ps1
File metadata and controls
43 lines (34 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#Disable Java
#HKLM\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown\bDisableJavaScript
#REG_DWORD value: 1
#Disable Flash
#HKLM\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown\bEnableFlash
#REG_DWORD value: 0
#Disable Java on DC
#HKLM\SOFTWARE\Policies\Adobe\Adobe Acrobat\DC\FeatureLockDown\bDisableJavaScript
#To the following REG_DWORD value:
#REG_DWORD value: 1
$regs = @(
@{Path = "HKLM:\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown"; Type = "Dword"; Name = "bDisableJavaScript"; Value = "1" },
@{Path = "HKLM:\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown"; Type = "Dword"; Name = "bEnableFlash"; Value = "0" },
@{Path = "HKLM:\SOFTWARE\Policies\Adobe\Adobe Acrobat\DC\FeatureLockDown"; Type = "Dword"; Name = "bDisableJavaScript"; Value = "1" }) | % { New-Object object | Add-Member -NotePropertyMembers $_ -PassThru }
try {
foreach ($reg in $regs) {
#Skip if the Path does not exist
if (-not(Test-Path $reg.Path)) { continue }
$testreg = (Get-ItemProperty -Path $reg.Path).$reg.Name
if ($testreg -ne $reg.Value) {
#Below necessary for Intune as of 10/2019 will only remediate Exit Code 1
Remove-ItemProperty -Path $reg.Path -Name $reg.Name -Force -ErrorAction SilentlyContinue
New-ItemProperty -Path $reg.Path -Name $reg.Name -Value $reg.Value -PropertyType $reg.Type
}
}
#No matching certificates, do not remediate
Write-Host "No_Match"
exit 0
}
catch {
$errMsg = $_.Exception.Message
Write-Error $errMsg
exit 1
}