Disable removal of PowerShell modules

This commit is contained in:
Manuel Thalmann 2023-08-01 15:31:14 +02:00
parent f3421bde56
commit ea4fdf8228

View file

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