Answers for "how to uninstall all powershell modules"

0

how to uninstall all powershell modules

workflow Uninstall-AzureModules
{
    $Modules = @()
    $Modules += (Get-Module -ListAvailable Azure*).Name
    $Modules += (Get-Module -ListAvailable Az.*).Name
    Foreach -parallel ($Module in ($Modules | Get-Unique))
    { 
        Write-Output ("Uninstalling: $Module")
        Uninstall-Module $Module -Force
    }
}
Uninstall-AzureModules
Uninstall-AzureModules   #second invocation to truly remove everything
Posted by: Guest on May-05-2021

Code answers related to "how to uninstall all powershell modules"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language