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