Remove modules before uninstalling

This commit is contained in:
Manuel Thalmann 2023-08-01 14:48:32 +02:00
parent bfd9b8c0b2
commit 113389beca

View file

@ -414,6 +414,9 @@ class Context {
}
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'";