Fixed issues and improved WDAC selection

This commit is contained in:
2024-06-21 16:03:10 +02:00
parent 57cb349113
commit bbb2e2276b
4 changed files with 5 additions and 36 deletions

View File

@@ -42,7 +42,8 @@ function StandardSetup {
InstallApps -Type $Type
Rename-Computer -NewName "PC-IPR-$Type"
UpdateWindows
Show-WDACMenu
$input = Read-Host "Would you like to enable WDAC? (y/N)"
if ($input -eq "y") { SetupRDP -enable 1 }
Write-Host "Installation complete!"
$input = Read-Host "Would you like to restart now? (y/N)"
if ($input -eq "y") {
@@ -106,7 +107,7 @@ function CustomSetup {
$input = Read-Host "Do you need to update windows? (y/N)"
if ($input -eq "y") { $Update = 1 }
$input = Read-Host "Do you need to setup WDAC? (y/N)"
$input = Read-Host "Do you need to enable WDAC? (y/N)"
if ($input -eq "y") { $WDAC = 1 }
SetupCustom -Office $Office -Activate $Activate -Users $Users -UserReg $UserReg -UserRegUsers $UserRegUsers -RDP $RDP -Choco $Choco -ChocoApps $ChocoApps -Update $Update -WDAC $WDAC
}
@@ -179,7 +180,7 @@ function Show-InstallationMenu {
if (Test-Path -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip") {
Write-Host "WDAC is enabled, not disabling WDAC will prevent the script from running properly. You should enable it again after the script is done."
$input = Read-Host "Should we disabled WDAC? (Y/n)"
$input = Read-Host "Should we disable WDAC? (Y/n)"
if ($input -ne "n") {
Remove-Item -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip"
Restart-Computer -Force