Apps/Get-CiscoWebexSupportManager.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
$RetryCount = 3

for ($i = 0; $i -lt $RetryCount; $i++) {
    try {
        $Version = ((Invoke-WebRequest 'https://welcome.webex.com/sc3300/supportcenter/site/siteabout.do?siteurl=welcome' -DisableKeepAlive -UseBasicParsing -ErrorAction Stop).Content | Select-String -Pattern '(?:\d+\.)+(?:\d+)' -AllMatches).Matches.Groups.Value | Select-Object -Skip 1 -First 1
        $URL32 = Get-Link -Uri 'https://welcome.webex.com/sc3300/supportcenter/site/downloads.do?siteurl=welcome' -MatchProperty href -Pattern 'webexsc\.msi$'
        New-NevergreenApp -Name 'Cisco Webex Support Manager' -Version $Version -Uri $URL32 -Architecture 'x86'
        break
    }
    catch {
        Write-Warning "Attempt $($i+1) failed, retrying..."
    }
}