How To Remove, And Uninstall, A Module In PowerShell

preview_player
Показать описание

When you're developing a PowerShell module and needing to rapidly test changes, it can be a pain to have to restart your PowerShell session all the time. Rather than doing that, you can unload the module right from within your console. But what if you need to completely remove a module? Surely you're going to have to hunt it down in the file system and delete it that way, right? Was it in your documents folder, one of the Program Files directories, or even under Windows? Don't waste time playing hide and go seek with your modules, and uninstall them from the console too! In this video, we'll learn to unload a module from your current session using Remove-Module. Then, we'll uninstall a module completely using Uninstall-Module, including what to do if the module happens to need administrative rights to be removed.

Prerequisites include:
An elevated PowerShell session if uninstalling a module that's been installed for all users.

Рекомендации по теме
Комментарии
Автор

How do you remove modules if they have other modules as dependencies to that specific module? For example, I'm trying to remove PackageManagement and it fails even though I have Admin because there are other dependency modules, but it doesn't list what they are.

zstrme
Автор

Uhm Im not sure how I got powershell in the first place but how do remove powershell?

asmodeus