Text improvement

This commit is contained in:
2024-01-29 10:59:46 +01:00
parent 5e8053c566
commit 5283577b60

View File

@@ -75,20 +75,20 @@ function CustomSetup {
$Update = 0 $Update = 0
$WDAC = 0 $WDAC = 0
$input = Read-Host "Do you need to install Office? (y/n)" $input = Read-Host "Do you need to install Office? (y/N)"
if ($input -eq "y") { $Office = 1 } if ($input -eq "y") { $Office = 1 }
$input = Read-Host "Do you need to activate Windows and Office? (y/n)" $input = Read-Host "Do you need to activate Windows and Office? (y/N)"
if ($input -eq "y") { $Activate = 1 } if ($input -eq "y") { $Activate = 1 }
$input = Read-Host "Do you need to setup users? (y/n)" $input = Read-Host "Do you need to setup users? (y/N)"
if ($input -eq "y") { if ($input -eq "y") {
$Users = @() $Users = @()
do { do {
$input = Read-Host "Enter the name of the user you want to setup (leave empty to stop)" $input = Read-Host "Enter the name of the user you want to setup (leave empty to stop)"
if ($input -ne "") { $Users += $input } if ($input -ne "") { $Users += $input }
} while ($input -ne "") } while ($input -ne "")
$input = Read-Host "Do you need to setup a restricted user registry? (y/n)" $input = Read-Host "Do you need to setup a restricted user registry? (y/N)"
if ($input -eq "y") { if ($input -eq "y") {
$UserReg = 1 $UserReg = 1
$UserRegUsers = @() $UserRegUsers = @()
@@ -99,13 +99,13 @@ function CustomSetup {
} }
} }
$input = Read-Host "Do you need to enable RDP? (y/n)" $input = Read-Host "Do you need to enable RDP? (y/N)"
if ($input -eq "y") { $RDP = 1 } if ($input -eq "y") { $RDP = 1 }
$input = Read-Host "Do you need to install chocolatey? (y/n)" $input = Read-Host "Do you need to install chocolatey? (y/N)"
if ($input -eq "y") { if ($input -eq "y") {
$Choco = 1 $Choco = 1
$input = Read-Host "Do you need to install chocolatey apps? (y/n)" $input = Read-Host "Do you need to install chocolatey apps? (y/N)"
if ($input -eq "y") { if ($input -eq "y") {
$ChocoApps = @() $ChocoApps = @()
do { do {
@@ -115,10 +115,10 @@ function CustomSetup {
} }
} }
$input = Read-Host "Do you need to update windows? (y/n)" $input = Read-Host "Do you need to update windows? (y/N)"
if ($input -eq "y") { $Update = 1 } if ($input -eq "y") { $Update = 1 }
$input = Read-Host "Do you need to setup WDAC? (y/n)" $input = Read-Host "Do you need to setup WDAC? (y/N)"
if ($input -eq "y") { $WDAC = 1 } 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 SetupCustom -Office $Office -Activate $Activate -Users $Users -UserReg $UserReg -UserRegUsers $UserRegUsers -RDP $RDP -Choco $Choco -ChocoApps $ChocoApps -Update $Update -WDAC $WDAC
} }
@@ -154,8 +154,7 @@ function SetupCustom {
} }
if ($Update) { UpdateWindows } if ($Update) { UpdateWindows }
if ($WDAC) { SetupWDAC -enable $WDAC } if ($WDAC) { SetupWDAC -enable $WDAC }
Write-Host "Would you like to restart now? (y/n)" $input = Read-Host "Would you like to restart now? (y/N)"
$input = Read-Host
if ($input -eq "y") { if ($input -eq "y") {
Clear-RecycleBin Clear-RecycleBin
Restart-Computer -Force Restart-Computer -Force