How To Remove, And Uninstall, A Module In PowerShell

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.