83 lines
2.1 KiB
PowerShell
83 lines
2.1 KiB
PowerShell
function Import-ScriptsFromUrls {
|
|
param (
|
|
[string[]] $ScriptUrls
|
|
)
|
|
|
|
foreach ($url in $ScriptUrls) {
|
|
$scriptContent = Invoke-WebRequest -Uri $url
|
|
Invoke-Expression -Command $scriptContent.Content
|
|
}
|
|
}
|
|
$baseUrl = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/"
|
|
$scriptUrls = @(
|
|
($baseUrl + "setupTmp.ps1"),
|
|
($baseUrl + "setupOffice.ps1"),
|
|
($baseUrl + "setupUsers.ps1"),
|
|
($baseUrl + "setupReg.ps1"),
|
|
($baseUrl + "setupChoco.ps1"),
|
|
($baseUrl + "setupApps.ps1"),
|
|
($baseUrl + "setupUpdate.ps1")
|
|
)
|
|
|
|
Import-ScriptsFromUrls -ScriptUrls $scriptUrls
|
|
|
|
function SetupLabo {
|
|
Write-Host "Performing Labo Installation..."
|
|
DownloadFiles -Type "Labo"
|
|
CheckOfficeInstall
|
|
SetupUsers
|
|
SetupEleveReg -username "Eleve"
|
|
EnableRDP
|
|
InstallChoco
|
|
ChocoInstallApps -Type "Labo"
|
|
InstallApps -Type "Labo"
|
|
UpdateWindows
|
|
}
|
|
|
|
function SetupInfo {
|
|
Write-Host "Performing Info Installation..."
|
|
DownloadFiles -Type "Info"
|
|
CheckOfficeInstall
|
|
SetupUsers
|
|
SetupEleveReg -username "Eleve"
|
|
EnableRDP
|
|
InstallChoco
|
|
ChocoInstallApps -Type "Info"
|
|
InstallApps -Type "Info"
|
|
UpdateWindows
|
|
}
|
|
|
|
function SetupLaptop {
|
|
Write-Host "Performing Laptop Installation..."
|
|
DownloadFiles -Type "Laptop"
|
|
CheckOfficeInstall
|
|
SetupUsers
|
|
SetupEleveReg -username "Eleve"
|
|
EnableRDP
|
|
InstallChoco
|
|
ChocoInstallApps -Type "Laptop"
|
|
InstallApps -Type "Laptop"
|
|
UpdateWindows
|
|
}
|
|
|
|
function Show-InstallationMenu {
|
|
$selection = $null
|
|
|
|
do {
|
|
Write-Host "Which type of installation would you like to perform?"
|
|
Write-Host "1. Labo"
|
|
Write-Host "2. Info"
|
|
Write-Host "3. Laptop"
|
|
|
|
$selection = Read-Host "Enter the number of your choice"
|
|
|
|
switch ($selection) {
|
|
"1" { SetupLabo }
|
|
"2" { SetupInfo }
|
|
"3" { SetupLaptop }
|
|
default { Write-Host "Invalid selection. Please choose 1, 2, or 3." }
|
|
}
|
|
} while ($selection -ne "1" -and $selection -ne "2" -and $selection -ne "3")
|
|
}
|
|
|
|
Show-InstallationMenu |