Scripting. Powershell, VMware, Windows, Active Directory & Exchange. All that kind of stuff…..
RSS icon Email icon Home icon
  • PowerShell 2.0: One Cmdlet at a Time #75 Remove-Module

    Posted on March 12th, 2010 Jonathan Medd No comments

    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

    Remove-Module

    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!

    Leave a reply