PowerShell 2.0: One Cmdlet at a Time 75 Remove-Module

Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Remove-Module cmdlet.

What can I do with it?

PowerShell 2.0 introduces the concept of modules; essentially they are the evolution of snapins from PowerShell 1.0.  Remove-Module enables you to remove a module previously imported with Import-Module.

Example:

Check currently available modules with Get-Module and remove the PSDiagnosticsModule.

Get-Module Remove-Module PSDiagnostics

How could I have done this in PowerShell 1.0?

If you had imported a PSSnapin with Add-PSSnapin you could remove it with Remove-PSSnapin.

1000 things 1% better!