Skip to content

Commit

Permalink
Removed unused PowerShell logic (#473)
Browse files Browse the repository at this point in the history
Removed unused PowerShell logic belonging to WDACConfig. No longer needed, implemented in C# in AppControl Manager
  • Loading branch information
HotCakeX authored Dec 22, 2024
1 parent c6c9212 commit e43d30c
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 542 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ Function Deploy-SignedWDACConfig {
Begin {
[WDACConfig.LoggerInitializer]::Initialize($VerbosePreference, $DebugPreference, $Host)

Update-WDACConfigPSModule -InvocationStatement $MyInvocation.Statement

if ([WDACConfig.GlobalVars]::ConfigCIBootstrap -eq $false) {
Invoke-MockConfigCIBootstrap
[WDACConfig.GlobalVars]::ConfigCIBootstrap = $true
}

[System.IO.DirectoryInfo]$StagingArea = [WDACConfig.StagingArea]::NewStagingArea('Deploy-SignedWDACConfig')

#Region User-Configurations-Processing-Validation
Expand Down
14 changes: 0 additions & 14 deletions WDACConfig/WDACConfig Module Files/Core/Edit-SignedWDACConfig.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,6 @@ Function Edit-SignedWDACConfig {
$ModulesToImport += ([WDACConfig.FileUtility]::GetFilesFast("$([WDACConfig.GlobalVars]::ModuleRootPath)\XMLOps", $null, '.psm1')).FullName
Import-Module -FullyQualifiedName $ModulesToImport -Force

Update-WDACConfigPSModule -InvocationStatement $MyInvocation.Statement

if ([WDACConfig.GlobalVars]::ConfigCIBootstrap -eq $false) {
Invoke-MockConfigCIBootstrap
[WDACConfig.GlobalVars]::ConfigCIBootstrap = $true
}

[System.IO.DirectoryInfo]$StagingArea = [WDACConfig.StagingArea]::NewStagingArea('Edit-SignedWDACConfig')

#Region User-Configurations-Processing-Validation
Expand Down Expand Up @@ -685,13 +678,6 @@ Function Edit-SignedWDACConfig {
[System.UInt16]$TotalSteps = 5
[System.UInt16]$CurrentStep = 0

$CurrentStep++
Write-Progress -Id 17 -Activity 'Getting the block rules' -Status "Step $CurrentStep/$TotalSteps" -PercentComplete ($CurrentStep / $TotalSteps * 100)

[WDACConfig.Logger]::Write('Getting the Use-Mode Block Rules')
# This shouldn't deploy the policy unsigned if it is already signed - requires build 24H2 features
New-WDACConfig -GetUserModeBlockRules -Deploy

$CurrentStep++
Write-Progress -Id 17 -Activity 'Determining the policy type' -Status "Step $CurrentStep/$TotalSteps" -PercentComplete ($CurrentStep / $TotalSteps * 100)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ Function New-DenyWDACConfig {
)
Begin {
[WDACConfig.LoggerInitializer]::Initialize($VerbosePreference, $DebugPreference, $Host)
Update-WDACConfigPSModule -InvocationStatement $MyInvocation.Statement

if ([WDACConfig.GlobalVars]::ConfigCIBootstrap -eq $false) {
Invoke-MockConfigCIBootstrap
[WDACConfig.GlobalVars]::ConfigCIBootstrap = $true
}

[System.IO.DirectoryInfo]$StagingArea = [WDACConfig.StagingArea]::NewStagingArea('New-DenyWDACConfig')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Function New-KernelModeWDACConfig {
[WDACConfig.Logger]::Write('Importing the required sub-modules')
Import-Module -Force -FullyQualifiedName @("$([WDACConfig.GlobalVars]::ModuleRootPath)\Shared\Get-KernelModeDriversAudit.psm1")

Update-WDACConfigPSModule -InvocationStatement $MyInvocation.Statement

[System.IO.DirectoryInfo]$StagingArea = [WDACConfig.StagingArea]::NewStagingArea('New-KernelModeWDACConfig')

# Create a directory to store the kernel mode drivers symbolic links for both modes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ Function New-SupplementalWDACConfig {
)
Begin {
[WDACConfig.LoggerInitializer]::Initialize($VerbosePreference, $DebugPreference, $Host)
Update-WDACConfigPSModule -InvocationStatement $MyInvocation.Statement

if ([WDACConfig.GlobalVars]::ConfigCIBootstrap -eq $false) {
Invoke-MockConfigCIBootstrap
[WDACConfig.GlobalVars]::ConfigCIBootstrap = $true
}

[System.IO.DirectoryInfo]$StagingArea = [WDACConfig.StagingArea]::NewStagingArea('New-SupplementalWDACConfig')

Expand Down
38 changes: 0 additions & 38 deletions WDACConfig/WDACConfig Module Files/Core/New-WDACConfig.psm1

This file was deleted.

Loading

0 comments on commit e43d30c

Please sign in to comment.