Apps/Get-CiscoWebexAccessAnywhere.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/svc3300/svccomponents/support/siteAbout.do?serviceID=9&siteurl=welcome' -DisableKeepAlive -UseBasicParsing -ErrorAction Stop).Content | Select-String -Pattern '(?:\d+\.)+(?:\d+)' -AllMatches).Matches.Groups.Value | Select-Object -Skip 1 -First 1
        $URL32 = "https://welcome.webex.com/client/T33L/aainstall.msi"
        New-NevergreenApp -Name 'Cisco Webex Access Anyhwere' -Version $Version -Uri $URL32 -Architecture 'x86' -Type 'Msi'
        break
    }
    catch {
        Write-Warning "Attempt $($i+1) failed, retrying... $_"
    }
}