Perform initial configuration before anything else
This commit is contained in:
parent
2594791471
commit
dffb937078
2 changed files with 5 additions and 6 deletions
|
@ -7,14 +7,11 @@
|
||||||
|
|
||||||
function Invoke-WindowsInstallation([Context] $context)
|
function Invoke-WindowsInstallation([Context] $context)
|
||||||
{
|
{
|
||||||
Write-Host "Starting Installation and Restoration of Windows";
|
|
||||||
. "$PSScriptRoot/../Scripts/Prerequisites.ps1";
|
|
||||||
Update-WindowsInstallation $context;
|
|
||||||
|
|
||||||
if (-not $context.Get("InitialConfiguration")) {
|
if (-not $context.Get("InitialConfiguration")) {
|
||||||
$configPath = "$PSScriptRoot/../Config";
|
$configPath = "$PSScriptRoot/../Config";
|
||||||
|
|
||||||
Enable-WindowsOptionalFeature -Online -All -FeatureName "NetFx3";
|
Enable-WindowsOptionalFeature -Online -All -FeatureName "NetFx3";
|
||||||
|
powershell -c Install-PackageProvider -Name NuGet -Force;
|
||||||
|
|
||||||
. "$configPath/Windows/Install.ps1" $context;
|
. "$configPath/Windows/Install.ps1" $context;
|
||||||
. "$configPath/Explorer/Install.ps1" $context;
|
. "$configPath/Explorer/Install.ps1" $context;
|
||||||
|
@ -24,6 +21,10 @@ function Invoke-WindowsInstallation([Context] $context)
|
||||||
$context.Set("InitialConfiguration", 1, "DWord");
|
$context.Set("InitialConfiguration", 1, "DWord");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Host "Starting Installation and Restoration of Windows";
|
||||||
|
. "$PSScriptRoot/../Scripts/Prerequisites.ps1";
|
||||||
|
Update-WindowsInstallation $context;
|
||||||
|
|
||||||
if (-not $context.Get("SoftwarePrerequisitesInstalled")) {
|
if (-not $context.Get("SoftwarePrerequisitesInstalled")) {
|
||||||
Write-Host "Installing prerequisites for installing software";
|
Write-Host "Installing prerequisites for installing software";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#!/bin/pwsh
|
#!/bin/pwsh
|
||||||
powershell -c Install-PackageProvider -Name NuGet -Force;
|
|
||||||
|
|
||||||
foreach ($module in @("PSWindowsUpdate", "KnownFolders"))
|
foreach ($module in @("PSWindowsUpdate", "KnownFolders"))
|
||||||
{
|
{
|
||||||
if (-not (Get-Module -ListAvailable $module))
|
if (-not (Get-Module -ListAvailable $module))
|
||||||
|
|
Loading…
Reference in a new issue