Files
setup-script/setupUpdate.ps1
Lightemerald 820953e206 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
2024-01-29 10:20:09 +01:00

13 lines
652 B
PowerShell

function UpdateWindows {
Write-Host "Updating Windows..."
# Check if optional feature internet-explorer-optional-amd64 is installed
$ieFeature = Get-WindowsOptionalFeature -Online -FeatureName internet-explorer-optional-amd64
if ($ieFeature.State -eq "Enabled") {
Write-Host "Removing Internet Explorer."
Disable-WindowsOptionalFeature -online -NoRestart -FeatureName internet-explorer-optional-amd64
}
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module -Name PSWindowsUpdate -Force
Get-WindowsUpdate -ForceInstall
Install-WindowsUpdate -AcceptAll -IgnoreReboot
}