Public/Get-Modules.ps1

Function Get-Modules {
    [cmdletbinding()]
    [alias('gem')]
    param (
        [switch]$count
    )

    if ($count) {
        Write-Host " "
        $WebResponse = Invoke-WebRequest "https://www.powershellgallery.com/profiles/TaylorLee"
        $GetTag = $WebResponse.AllElements | Where-Object { $_.TagName -eq "h2" }
        $FindText = $GetTag | Where-Object { $_.outertext -like "*total*" }
        $Write = $FindText.outertext -replace ("Total downloads of packages", '')   
        Write-Host " Total downloads of packages: $Write" -ForegroundColor Yellow                                   
    }

    else {
        Start-Process https://www.powershellgallery.com/profiles/TaylorLee
    }

}