From cf065edc4f337d7f6ac2cae562350d60c892c8e1 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 1 Aug 2023 13:19:27 +0200 Subject: [PATCH] Clean up all prerequisites --- scripts/Windows/Scripts/Context.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index 042aec88..2a07d8a1 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -412,5 +412,11 @@ class Context { Write-Information "Reset power plan to original state"; powercfg /S $originalScheme; } + + Write-Information "Removing PowerShell Modules"; + Uninstall-Module -Force "PSWindowsUpdate"; + Uninstall-Module -Force "KnownFolders"; + powershell -c "Uninstall-Module -Force 'PinnedItem'"; + Remove-Item -Force ((Get-PackageProvider NuGet).ProviderPath); } }