From 7549d99514043e24139c4aeb7a9f907ad0d9241b Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 1 Aug 2023 15:31:14 +0200 Subject: [PATCH] Disable removal of PowerShell modules --- scripts/Windows/Scripts/Context.ps1 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index cf36d53a..3ac8785f 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -411,14 +411,5 @@ class Context { Write-Information "Reset power plan to original state"; powercfg /S $originalScheme; } - - Write-Information "Removing PowerShell Modules"; - Remove-Module "PSWindowsUpdate"; - Remove-Module "KnownFolders"; - Remove-Module "PinnedItem"; - Uninstall-Module -Force "PSWindowsUpdate"; - Uninstall-Module -Force "KnownFolders"; - powershell -c "Uninstall-Module -Force 'PinnedItem'"; - Remove-Item -Force ((Get-PackageProvider NuGet).ProviderPath); } }