Improving WDAC and Update exec
This commit is contained in:
@@ -3,7 +3,14 @@ Installation Script
|
||||
irm https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/setupScript.ps1 | iex
|
||||
```
|
||||
|
||||
Windows Update
|
||||
```ps
|
||||
irm https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/setupUpdate.ps1 | iex
|
||||
UpdateWindows
|
||||
```
|
||||
|
||||
WDAC Installation Script
|
||||
```ps
|
||||
irm https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/setupWDAC.ps1 | iex
|
||||
Show-WDACMenu
|
||||
```
|
||||
@@ -153,4 +153,11 @@ function Show-InstallationMenu {
|
||||
} while ($selection -ne "1" -and $selection -ne "2" -and $selection -ne "3")
|
||||
}
|
||||
|
||||
Show-InstallationMenu
|
||||
Show-InstallationMenu
|
||||
Show-WDACMenu
|
||||
|
||||
Write-Host "Would you like to restart now? (y/n)"
|
||||
$input = Read-Host
|
||||
if ($input -eq "y") {
|
||||
Restart-Computer
|
||||
}
|
||||
@@ -1,7 +1,16 @@
|
||||
function UpdateWindows {
|
||||
Disable-WindowsOptionalFeature -online -NoRestart -FeatureName internet-explorer-optional-amd64
|
||||
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
|
||||
} else {
|
||||
Write-Host "Internet Explorer is already disabled."
|
||||
}
|
||||
|
||||
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
|
||||
Install-Module -Name PSWindowsUpdate -Force
|
||||
Get-WindowsUpdate -ForceInstall
|
||||
Install-WindowsUpdate -AcceptAll -AutoReboot
|
||||
Install-WindowsUpdate -AcceptAll
|
||||
}
|
||||
@@ -33,6 +33,4 @@ 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")
|
||||
}
|
||||
|
||||
Show-WDACMenu
|
||||
}
|
||||
Reference in New Issue
Block a user