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); } }