-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDetect_AdobeSecuritySettings.ps1
More file actions
39 lines (32 loc) · 1.38 KB
/
Detect_AdobeSecuritySettings.ps1
File metadata and controls
39 lines (32 loc) · 1.38 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
#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
write-host "Start remediation - $($reg.Path) - $($reg.Name)"
exit 1
}
}
exit 0
}
catch {
$errMsg = $_.Exception.Message
Write-Error $errMsg
exit 1
}