Switched back to old import method and improved custom setup
This commit is contained in:
@@ -70,7 +70,7 @@ function CustomSetup {
|
|||||||
$Activate
|
$Activate
|
||||||
$Users = 0
|
$Users = 0
|
||||||
$UserReg = 0
|
$UserReg = 0
|
||||||
$UserRegUsername = ""
|
$UserRegUsers = ""
|
||||||
$RDP = 0
|
$RDP = 0
|
||||||
$Choco = 0
|
$Choco = 0
|
||||||
$ChocoApps = 0
|
$ChocoApps = 0
|
||||||
@@ -85,12 +85,19 @@ function CustomSetup {
|
|||||||
|
|
||||||
$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 = 1
|
$Users = @()
|
||||||
|
do {
|
||||||
|
$input = Read-Host "Enter the name of the user you want to setup (leave empty to stop)"
|
||||||
|
if ($input -ne "") { $Users += $input }
|
||||||
|
} 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
|
||||||
$input = Read-Host "Enter the username of the user you want to setup"
|
$UserRegUsers = @()
|
||||||
$UserRegUsername = $input
|
do {
|
||||||
|
$input = Read-Host "Enter the name of the user you want to setup registry for (leave empty to stop)"
|
||||||
|
if ($input -ne "") { $UserRegUsers += $input }
|
||||||
|
} while ($input -ne "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,16 +122,16 @@ function CustomSetup {
|
|||||||
|
|
||||||
$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 -UserRegUsername $UserRegUsername -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
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetupCustom {
|
function SetupCustom {
|
||||||
param (
|
param (
|
||||||
[bool] $Office,
|
[bool] $Office,
|
||||||
[bool] $Activate,
|
[bool] $Activate,
|
||||||
[bool] $Users,
|
[array] $Users,
|
||||||
[bool] $UserReg,
|
[bool] $UserReg,
|
||||||
[string] $UserRegUsername,
|
[array] $UserRegUsers,
|
||||||
[bool] $RDP,
|
[bool] $RDP,
|
||||||
[bool] $Choco,
|
[bool] $Choco,
|
||||||
[array] $ChocoApps,
|
[array] $ChocoApps,
|
||||||
@@ -136,7 +143,11 @@ function SetupCustom {
|
|||||||
if ($Activate) { SetupActivaton }
|
if ($Activate) { SetupActivaton }
|
||||||
if ($Users) {
|
if ($Users) {
|
||||||
SetupUsers
|
SetupUsers
|
||||||
if ($UserReg) { SetupUserReg -username $UserRegUsername }
|
if ($UserReg) {
|
||||||
|
foreach ($User in $UserRegUsers) {
|
||||||
|
SetupUserReg -username $User
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($RDP) { EnableRDP }
|
if ($RDP) { EnableRDP }
|
||||||
if ($Choco) {
|
if ($Choco) {
|
||||||
@@ -188,5 +199,5 @@ if (Test-Path -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b2
|
|||||||
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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImportModules
|
OldImportModules
|
||||||
Show-InstallationMenu
|
Show-InstallationMenu
|
||||||
Reference in New Issue
Block a user