Skip to content

Commit

Permalink
Fix Bug #462: Updated Fix, now checks winver 10+
Browse files Browse the repository at this point in the history
  • Loading branch information
qngngyn committed Jan 17, 2024
1 parent 1c51a24 commit a4fc30d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ATAPAuditor/AuditGroups/SBD - Application Control.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ $RootPath = Split-Path $RootPath -Parent
Id = "SBD-072"
Task = "Ensure Windows Defender Application Control (WDAC) is available."
Test = {
$os = Get-ComputerInfo OsName
# check newer than win10
$osVersion = (Get-CimInstance Win32_OperatingSystem).Version
# check whether system is home or not
$os = (Get-ComputerInfo OsName).OsName
$isHomeVersion = $os -match "Home"
# check whether system is server version 16 or newer
$windowsServerVersions = @(
"Windows Server 2016",
"Windows Server 2019",
"Windows Server 2022"
)
$isServer2016newer = $windowsServerVersions -contains $os
if(!($isHomeVersion -eq $true) -and !($isServer2016newer -eq $true)){
if( (!($isHomeVersion -eq $true) -and $osVersion -ge '10.0.0.0') -or $isServer2016newer -eq $true){
return @{
Message = "Compliant"
Status = "True"
Expand Down

0 comments on commit a4fc30d

Please sign in to comment.