-
Notifications
You must be signed in to change notification settings - Fork 1
/
ListInstalledSecurityProducts.ps1
31 lines (29 loc) · 1.46 KB
/
ListInstalledSecurityProducts.ps1
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
function ListSecurityProducts {
Write-Host "AntiSpywareProduct:"
Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntiSpywareProduct | Select-Object -Property displayName, instanceGuid, pathToSignedProductExe, pathToSignedReportingExe, productState, @{Name='CustomProductState';Expression={
switch ($_.productState) {
397568 { "Windows Defender Enabled and Up to date" }
397584 { "Windows Defender Enabled and Out of date" }
393472 { "Windows Defender disabled" }
default { "Unknown" }
}
}}, timestamp
Write-Host "AntiVirusProduct:"
Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntiVirusProduct | Select-Object -Property displayName, instanceGuid, pathToSignedProductExe, pathToSignedReportingExe, productState, @{Name='CustomProductState';Expression={
switch ($_.productState) {
397568 { "Windows Defender Enabled and Up to date" }
397584 { "Windows Defender Enabled and Out of date" }
393472 { "Windows Defender disabled" }
default { "Unknown" }
}
}}, timestamp
Write-Host "FirewallProduct:"
Get-CimInstance -Namespace root/SecurityCenter2 -ClassName FirewallProduct | Select-Object -Property displayName, instanceGuid, pathToSignedProductExe, pathToSignedReportingExe, productState, @{Name='CustomProductState';Expression={
switch ($_.productState) {
266256 { "Firewall enabled" }
262160 { "Firewall disabled" }
default { "Unknown" }
}
}}, timestamp
}
ListSecurityProducts