Renaming function and improving outputs
This commit is contained in:
@@ -2,7 +2,7 @@ function InstallChoco {
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||
}
|
||||
|
||||
function ChocoInstallApps {
|
||||
function InstallChocoApps {
|
||||
param (
|
||||
[string] $Type,
|
||||
[array] $Apps
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user