Renaming function and improving outputs

This commit is contained in:
2024-01-29 11:05:49 +01:00
parent 5283577b60
commit 3d63bf6a68
2 changed files with 9 additions and 10 deletions

View File

@@ -50,13 +50,12 @@ function StandardSetup {
SetupUserReg -username "Eleve"
SetupRDP -enable 1
InstallChoco
ChocoInstallApps -Type $Type
InstallChocoApps -Type $Type
InstallApps -Type $Type
UpdateWindows
Show-WDACMenu
Write-Host "Installation complete!"
Write-Host "Would you like to restart now? (y/n)"
$input = Read-Host
$input = Read-Host "Would you like to restart now? (y/N)"
if ($input -eq "y") {
Clear-RecycleBin -Force
Restart-Computer -Force
@@ -150,13 +149,14 @@ function SetupCustom {
if ($RDP) { SetupRDP -enable 1 }
if ($Choco) {
InstallChoco
if ($ChocoApps) { ChocoInstallApps -Type "Custom" -Apps $ChocoApps }
if ($ChocoApps) { InstallChocoApps -Type "Custom" -Apps $ChocoApps }
}
if ($Update) { UpdateWindows }
if ($WDAC) { SetupWDAC -enable $WDAC }
Write-Host "Installation complete!"
$input = Read-Host "Would you like to restart now? (y/N)"
if ($input -eq "y") {
Clear-RecycleBin
Clear-RecycleBin -Force
Restart-Computer -Force
}
}
@@ -189,10 +189,9 @@ function Show-InstallationMenu {
}
if (Test-Path -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip") {
Write-Host "WDAC is enabled, should we disabled it? (y/n)"
Write-Host "Not disabling WDAC will prevent the script from running properly. You should enable it again after the script is done."
$input = Read-Host
if ($input -eq "y") {
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)"
if ($input -ne "n") {
Remove-Item -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip"
}
}