Set the user name by default

This commit is contained in:
Manuel Thalmann 2024-03-23 15:29:37 +01:00
parent 6fcb7fb4a8
commit f1310bafdf
3 changed files with 1 additions and 2 deletions

View file

@ -15,6 +15,5 @@ function Restore-Apps {
Write-Host "Starting Restoration of Windows"; Write-Host "Starting Restoration of Windows";
[Context]$context = [Context]::new(); [Context]$context = [Context]::new();
$context.UserName = "Manuel";
Invoke-WindowsInstallation $context; Invoke-WindowsInstallation $context;
Restart-Computer -Force; Restart-Computer -Force;

View file

@ -9,6 +9,5 @@ function Restore-Apps {
} }
[Context]$context = [Context]::new(); [Context]$context = [Context]::new();
$context.UserName = "Manuel";
Invoke-WindowsInstallation $context; Invoke-WindowsInstallation $context;
Restart-Computer -Force; Restart-Computer -Force;

View file

@ -9,6 +9,7 @@ function Invoke-WindowsInstallation([Context] $context)
{ {
$ErrorActionPreference = "Inquire"; $ErrorActionPreference = "Inquire";
. "$PSScriptRoot/../Scripts/Prerequisites.ps1"; . "$PSScriptRoot/../Scripts/Prerequisites.ps1";
$context.UserName ??= "Manuel";
Start-WindowsInstallation $context; Start-WindowsInstallation $context;
} }