Reorganisation of the setup

- Autounattend files moved to Autounattend folder
- WDAC files moved to WDAC folder
- Added WDAC check to setupScript
- Moved RDP to setupRDP
- Moved Activate to setupActivate
- Added online setup of Office with offline fallback
- Changed setupUsers to be more standard and allow customisation
- Added rastop setup
This commit is contained in:
2024-01-29 10:20:09 +01:00
parent 216de49e8b
commit 820953e206
15 changed files with 280 additions and 174 deletions

View File

@@ -1,5 +1,5 @@
function EnableWDAC {
$DownloadFile = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip"
$DownloadFile = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/WDAC/{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip"
$LocalFile = Join-Path -Path $env:LOCALAPPDATA -ChildPath "Temp\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip"
Write-Host "Downloading file from $DownloadFile to $LocalFile"
Invoke-WebRequest -Uri $DownloadFile -OutFile $LocalFile -UseBasicParsing
@@ -35,4 +35,23 @@ function Show-WDACMenu {
default { Write-Host "Invalid selection. Please choose 1, 2, or 3." }
}
} while ($selection -ne "1" -and $selection -ne "2" -and $selection -ne "3")
}
function SetupWDAC {
param (
[bool] enable
)
if ($enable) {
if (Test-Path -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip") {
Write-Host "WDAC is already enabled!"
} else {
EnableWDAC
}
} else {
if (Test-Path -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip") {
DisableWDAC
} else {
Write-Host "WDAC is already disabled!"
}
}
}