2023-07-12 20:37:31 +00:00
|
|
|
#!/bin/pwsh
|
2023-07-14 07:24:13 +00:00
|
|
|
. "$PSScriptRoot/Drivers.ps1";
|
2024-08-07 19:05:32 +00:00
|
|
|
. "$PSScriptRoot/../../../scripts/Common/Scripts/Context.ps1";
|
2023-09-27 10:32:27 +00:00
|
|
|
. "$PSScriptRoot/../../../scripts/Windows/Collections/Personal.ps1"
|
2024-03-23 14:09:58 +00:00
|
|
|
. "$PSScriptRoot/../../../scripts/Windows/OS/Install.ps1";
|
2023-06-16 20:49:47 +00:00
|
|
|
|
2023-08-13 23:32:57 +00:00
|
|
|
function Initialize-Configuration {
|
2024-03-23 15:00:41 +00:00
|
|
|
# Fix synchronization between Linux and Windows clock
|
2023-08-13 23:32:57 +00:00
|
|
|
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Value 1 -Type "DWord";
|
2024-03-24 16:09:28 +00:00
|
|
|
|
|
|
|
# Force time resynchronization
|
|
|
|
$service = Get-Service W32Time;
|
|
|
|
$stopped = ($service.Status -eq "Stopped");
|
|
|
|
Start-Service $service;
|
|
|
|
w32tm /resync /force;
|
|
|
|
|
|
|
|
if ($stopped) {
|
|
|
|
Stop-Service $service;
|
|
|
|
}
|
2023-08-13 23:32:57 +00:00
|
|
|
}
|
|
|
|
|
2023-09-27 10:32:27 +00:00
|
|
|
function Restore-Apps {
|
|
|
|
param([Context] $context)
|
|
|
|
Restore-PersonalApps $context;
|
|
|
|
}
|
|
|
|
|
2023-06-22 15:59:10 +00:00
|
|
|
Write-Host "Starting Restoration of Windows";
|
|
|
|
[Context]$context = [Context]::new();
|
2024-07-31 12:47:42 +00:00
|
|
|
Start-WindowsInstallation;
|