From 282c21f6ab4278884a3a4b633ec1668372a295d4 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 22 Jun 2023 17:59:10 +0200 Subject: [PATCH] Remove unnecessary module --- profiles/DerGeret/Windows/Restore.ps1 | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/profiles/DerGeret/Windows/Restore.ps1 b/profiles/DerGeret/Windows/Restore.ps1 index bbe95d64..580636d8 100644 --- a/profiles/DerGeret/Windows/Restore.ps1 +++ b/profiles/DerGeret/Windows/Restore.ps1 @@ -1,13 +1,8 @@ . "$PSScriptRoot/../../../scripts/Windows/Scripts/Prerequisites.ps1"; . "$PSScriptRoot/../../../scripts/Windows/Scripts/Context.ps1"; -$entryPoint = "$($MyInvocation.MyCommand.Path)"; - -$null = New-Module { - Write-Host "Starting Restoration of Windows"; - . "$PSScriptRoot/../../../scripts/Windows/OS/Install.ps1"; - [Context]$context = [Context]::new(); - Write-Host "Setting entry point to $entryPoint"; - $context.EntryPoint = "$entryPoint"; - Invoke-WindowsInstallation $context; -} +Write-Host "Starting Restoration of Windows"; +. "$PSScriptRoot/../../../scripts/Windows/OS/Install.ps1"; +[Context]$context = [Context]::new(); +$context.EntryPoint = "$($MyInvocation.MyCommand.Path)"; +Invoke-WindowsInstallation $context; \ No newline at end of file