Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DanGough committed Aug 18, 2024
2 parents 801264f + b5130cb commit 4458ec4
Show file tree
Hide file tree
Showing 17 changed files with 117 additions and 32 deletions.
20 changes: 17 additions & 3 deletions Nevergreen/Apps/Get-8x8Work.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
$URL = Get-Link -Uri 'https://support.8x8.com/cloud-phone-service/voice/work-desktop/download-8x8-work-for-desktop' -MatchProperty href -Pattern '\.msi'
$Apps = @(
@{Name = '8x8 Work'; Architecture = 'x64'; Type = 'Exe'; Pattern = 'https://[^<]+\.exe' }
@{Name = '8x8 Work'; Architecture = 'x64'; Type = 'MSI'; Pattern = 'https://[^<]+\.msi' }
)

$Version = $URL | Get-Version -ReplaceWithDot
try {
# Download page https://support-portal.8x8.com/viewArticle.html?d=8bff4970-6fbf-4daf-842d-8ae9b533153d&hl=en references content below
$Content = (Invoke-RestMethod -Uri 'https://support-portal.8x8.com/helpcenter/docrenderservice/services/rest/documents/8bff4970-6fbf-4daf-842d-8ae9b533153d?mandatorKey=MANDATOR_USU&contentLanguage=en&additionalData=references=true&additionalData=referencedDocs=true&additionalData=withGraph=true&additionalData=includeReferencesUpToLevel=all' -DisableKeepAlive).Content

New-NevergreenApp -Name '8x8 Work' -Version $Version -Uri $URL -Architecture 'x64' -Type 'msi'
foreach ($App in $Apps) {
$Url = ($Content | Select-String -Pattern $App.Pattern).Matches.Value | Select-Object -First 1
$Version = $Url | Get-Version -ReplaceWithDot
New-NevergreenApp -Name $App.Name -Version $Version -Uri $Url -Architecture $App.Architecture -Type $App.Type
}

}
catch {
Write-Error "$($MyInvocation.MyCommand): $($_.Exception.Message)"
}
6 changes: 4 additions & 2 deletions Nevergreen/Apps/Get-AdobeAcrobat.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ $Platforms = @(
@{Architecture = 'x64'; Language = 'Neutral'; Pattern = 'AcrobatDCx64Upd\d{8,12}\.msp'}
)

$Headers = @{'accept' = '*/*'; 'accept-language' = 'en-GB,en;q=0.9,en-US;q=0.8'}

foreach ($Platform in $Platforms) {

$ReleaseURL = 'https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/index.html'
$SearchCount = 5

do {
$ReleaseURL = Get-Link -Uri $ReleaseURL -Headers @{"accept-language"="en-GB,en;q=0.9,en-US;q=0.8"} -MatchProperty outerHTML -Pattern '>Next' -PrefixParent
$ReleaseURL = Get-Link -Uri $ReleaseURL -Headers $Headers -MatchProperty outerHTML -Pattern '>Next' -PrefixParent

$URL = Get-Link -Uri $ReleaseURL -Headers @{"accept-language"="en-GB,en;q=0.9,en-US;q=0.8"} -MatchProperty href -Pattern $Platform.Pattern
$URL = Get-Link -Uri $ReleaseURL -Headers $Headers -MatchProperty href -Pattern $Platform.Pattern
if ($URL) {
$Version = ($URL | Get-Version -Pattern '(\d{8,12}).+msp') -replace '(\d{2})(\d{3})(\d+)','$1.$2.$3'
New-NevergreenApp -Name 'Adobe Acrobat' -Version $Version -Uri $URL -Architecture $Platform.Architecture -Language $Platform.Language -Type 'Msp'
Expand Down
6 changes: 4 additions & 2 deletions Nevergreen/Apps/Get-AdobeAcrobatReader.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ $Platforms = @(
@{Architecture = 'x64'; Language = 'Multi'; Pattern = 'AcroRdrDCx64Upd\d{8,12}_MUI\.msp'}
)

$Headers = @{'accept' = '*/*'; 'accept-language' = 'en-GB,en;q=0.9,en-US;q=0.8'}

foreach ($Platform in $Platforms) {

$ReleaseURL = 'https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/index.html'
$SearchCount = 5

do {
$ReleaseURL = Get-Link -Uri $ReleaseURL -Headers @{"accept-language"="en-GB,en;q=0.9,en-US;q=0.8"} -MatchProperty outerHTML -Pattern '>Next' -PrefixParent
$ReleaseURL = Get-Link -Uri $ReleaseURL -Headers $Headers -MatchProperty outerHTML -Pattern '>Next' -PrefixParent

$URL = Get-Link -Uri $ReleaseURL -Headers @{"accept-language"="en-GB,en;q=0.9,en-US;q=0.8"} -MatchProperty href -Pattern $Platform.Pattern
$URL = Get-Link -Uri $ReleaseURL -Headers $Headers -MatchProperty href -Pattern $Platform.Pattern
if ($URL) {
$Version = ($URL | Get-Version -Pattern '(\d{8,12}).+msp') -replace '(\d{2})(\d{3})(\d+)','$1.$2.$3'
New-NevergreenApp -Name 'Adobe Acrobat Reader' -Version $Version -Uri $URL -Architecture $Platform.Architecture -Language $Platform.Language -Type 'Msp'
Expand Down
3 changes: 2 additions & 1 deletion Nevergreen/Apps/Get-AdobeCreativeCloud.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$URL32,$URL64,$URLARM64 = Get-Link -Uri 'https://helpx.adobe.com/ca/download-install/kb/creative-cloud-desktop-app-download.html' -MatchProperty href -Pattern 'win32','win64','winarm64'
$URL32,$URL64,$URLARM64 = Get-Link -Uri 'https://helpx.adobe.com/uk/download-install/kb/creative-cloud-desktop-app-download.html' -MatchProperty href -Pattern 'win32','win64','winarm64' -Headers @{'accept' = '*/*'; 'accept-language' = 'en-GB,en;q=0.9,en-US;q=0.8'}

$Version32,$Version64,$VersionARM64 = $URL32,$URL64,$URLARM64 | Get-Version -Pattern '((?:\d+\.)+\d+)(?!.+(?:\d+\.)+\d+)' -ReplaceWithDot

New-NevergreenApp -Name 'Adobe Creative Cloud' -Version $Version32 -Uri $URL32 -Architecture 'x86' -Type 'Zip'
Expand Down
6 changes: 3 additions & 3 deletions Nevergreen/Apps/Get-AdobeDigitalEditions.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
try {

$Version = Get-Link -Uri 'https://www.adobe.com/uk/solutions/ebook/digital-editions/download.html' -Headers @{"accept-language"="en-GB,en;q=0.9,en-US;q=0.8"} -MatchProperty href -Pattern '\.exe$' -ReturnProperty outerHTML | Get-Version -Pattern '>((?:\d+\.)+\d+)'

$URL = Get-Link -Uri 'https://www.adobe.com/uk/solutions/ebook/digital-editions/download.html' -Headers @{"accept-language"="en-GB,en;q=0.9,en-US;q=0.8"} -MatchProperty href -Pattern '\.exe$'
$Headers = @{'accept' = '*/*'; 'accept-language' = 'en-GB,en;q=0.9,en-US;q=0.8'}
$Version = Get-Link -Uri 'https://www.adobe.com/uk/solutions/ebook/digital-editions/download.html' -Headers $Headers -MatchProperty href -Pattern '\.exe$' -ReturnProperty outerHTML | Get-Version -Pattern '>((?:\d+\.)+\d+)'
$URL = Get-Link -Uri 'https://www.adobe.com/uk/solutions/ebook/digital-editions/download.html' -Headers $Headers -MatchProperty href -Pattern '\.exe$'

New-NevergreenApp -Name 'Adobe Digital Editions' -Version $Version -Uri $URL -Architecture 'x86' -Type 'Exe'

Expand Down
4 changes: 2 additions & 2 deletions Nevergreen/Apps/Get-Anaconda.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$URL = Get-Link -Uri 'https://www.anaconda.com/products/individual' -MatchProperty href -Pattern '\.exe$'
$URL = Get-Link -Uri 'https://www.anaconda.com/download/success' -MatchProperty href -Pattern '\.exe$'
$Version = $URL | Get-Version
New-NevergreenApp -Name 'Anaconda' -Version $Version -Uri $URL -Architecture 'x64' -Type 'exe'
New-NevergreenApp -Name 'Anaconda' -Version $Version -Uri $URL -Architecture 'x64' -Type 'exe'
12 changes: 8 additions & 4 deletions Nevergreen/Apps/Get-CiscoWebex.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
$Version = Get-Version -Uri 'https://help.webex.com/en-us/article/mqkve8/Webex-App-%7C-Release-notes' -Pattern 'Windows[^\d]+((?:\d+\.)+(?:\d+))'

$URL32 = Get-Link -Uri 'https://help.webex.com/en-us/article/nw5p67g/Webex-App-%7C-Installation-and-automatic-upgrade' -MatchProperty href -Pattern 'Webex_x86\.msi'
$URL64 = Get-Link -Uri 'https://help.webex.com/en-us/article/nw5p67g/Webex-App-%7C-Installation-and-automatic-upgrade' -MatchProperty href -Pattern 'Webex\.msi'
$URL = Get-Link -Uri 'https://help.webex.com/en-us/article/nw5p67g/Webex-App-%7C-Installation-and-automatic-upgrade' -MatchProperty href -Pattern 'Webex\.msi'
$URLEN = Get-Link -Uri 'https://help.webex.com/en-us/article/nw5p67g/Webex-App-%7C-Installation-and-automatic-upgrade' -MatchProperty href -Pattern 'Webex_en\.msi'
$URLBundle = Get-Link -Uri 'https://help.webex.com/en-us/article/nw5p67g/Webex-App-%7C-Installation-and-automatic-upgrade' -MatchProperty href -Pattern 'WebexBundle\.msi'
$URLBundleEN = Get-Link -Uri 'https://help.webex.com/en-us/article/nw5p67g/Webex-App-%7C-Installation-and-automatic-upgrade' -MatchProperty href -Pattern 'WebexBundle_en\.msi'

New-NevergreenApp -Name 'Cisco Webex' -Version $Version -Uri $URL32 -Architecture 'x86' -Type 'Msi'
New-NevergreenApp -Name 'Cisco Webex' -Version $Version -Uri $URL64 -Architecture 'x64' -Type 'Msi'
New-NevergreenApp -Name 'Cisco Webex' -Version $Version -Uri $URL -Architecture 'x64' -Type 'Msi' -Language 'Multi'
New-NevergreenApp -Name 'Cisco Webex' -Version $Version -Uri $URLEN -Architecture 'x64' -Type 'Msi' -Language 'en'
New-NevergreenApp -Name 'Cisco Webex Bundle' -Version $Version -Uri $URLBundle -Architecture 'x64' -Type 'Msi' -Language 'Multi'
New-NevergreenApp -Name 'Cisco Webex Bundle' -Version $Version -Uri $URLBundleEN -Architecture 'x64' -Type 'Msi' -Language 'en'
21 changes: 21 additions & 0 deletions Nevergreen/Apps/Get-MicrosoftOfficeDeploymentTool.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Get Office Deployment Tool details by using the JSON-Object of the
# Javascript to get the download details.
$DownloadPageUri = 'https://www.microsoft.com/en-us/download/details.aspx?id=49117'
# Pattern to get the JSON-Object by matching the
# script start block + variable declaration to the script end block.
$JSONBlobPattern = '(?<scriptStart><script>[\w.]+__DLCDetails__=).*?(?<JSObject-scriptStart></script>)'

$Data = Invoke-WebRequest -Uri $DownloadPageUri `
| Select-Object -Property 'Content' `
| Select-String -Pattern $JSONBlobPattern `
| Select-Object -ExpandProperty 'Matches' `
| ForEach-Object {$_.Groups['JSObject'].Value} `
| Select-Object -First 1 `
| ConvertFrom-JSON

New-NeverGreenApp `
-Name 'Microsoft Office Deployment Tool' `
-Uri $Data.dlcDetailsView.downloadFile.url `
-Version $Data.dlcDetailsView.downloadFile.Version `
-Architecture 'Multi' `
-Type 'Exe'
6 changes: 3 additions & 3 deletions Nevergreen/Apps/Get-MicrosoftPowerBIReportBuilder.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$Version = Get-Version -Uri 'https://www.microsoft.com/en-us/download/details.aspx?id=58158' -Pattern 'Version:<.+?>((?:\d+\.)+\d+)' #'Version:\s+</div><p>((?:\d+\.)+\d+)'
$URL32 = Get-Link -Uri 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=58158' -MatchProperty href -Pattern '\.msi$'
$Version = Get-Version -Uri 'https://www.microsoft.com/en-us/download/details.aspx?id=105942' -Pattern 'Version:<.+?>((?:\d+\.)+\d+)' #'Version:\s+</div><p>((?:\d+\.)+\d+)'
$URL32 = Get-Link -Uri 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=105942' -MatchProperty href -Pattern '\.msi$'

New-NevergreenApp -Name 'Microsoft Power BI Report Builder' -Version $Version -Uri $URL32 -Architecture 'x86' -Type 'Msi'
New-NevergreenApp -Name 'Microsoft Power BI Report Builder' -Version $Version -Uri $URL32 -Architecture 'x86' -Type 'Msi'
8 changes: 8 additions & 0 deletions Nevergreen/Apps/Get-MicrosoftPurviewInformationProtection.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$Response = Invoke-WebRequest -Uri 'https://www.microsoft.com/en-us/download/details.aspx?id=53018' -DisableKeepAlive -UseBasicParsing

$Version = $Response.Content | Get-Version -Pattern '"version":"((?:\d+\.)+\d+)'
$URLMsi = $Response.Content | Get-Version -Pattern '"(https://[^"]*\.msi)'
$URLExe = $Response.Content | Get-Version -Pattern '"(https://[^"]*\.exe)'

New-NevergreenApp -Name 'Microsoft Purview Information Protection' -Version $Version -Uri $URLMsi -Architecture 'x86' -Type 'MSI'
New-NevergreenApp -Name 'Microsoft Purview Information Protection' -Version $Version -Uri $URLExe -Architecture 'x86' -Type 'Exe'
4 changes: 2 additions & 2 deletions Nevergreen/Apps/Get-OpenVPNConnect.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
$Version = Get-Version -Uri 'https://openvpn.net/vpn-server-resources/openvpn-connect-for-windows-change-log/' -Pattern 'Release notes for ((?:\d+\.)+\d+)'
$Version = Get-Version -Uri 'https://openvpn.net/connect-docs/windows-release-notes.html' -Pattern '>((?:\d+\.)+\d+) \(\d+\)'

$Releases = @(
@{Architecture = 'x86'; Type = 'Msi'; Pattern = 'x86\.msi$'}
@{Architecture = 'x64'; Type = 'Msi'; Pattern = 'windows\.msi$'}
)

foreach ($Release in $Releases) {
$URL = Get-Link -Uri 'https://openvpn.net/client-connect-vpn-for-windows/' -MatchProperty href -Pattern $Release.Pattern
$URL = Get-Link -Uri 'https://openvpn.net/client/client-connect-vpn-for-windows/' -MatchProperty href -Pattern $Release.Pattern
New-NevergreenApp -Name 'OpenVPNConnect' -Version $Version -Uri $URL -Architecture $Release.Architecture -Type $Release.Type
}
6 changes: 3 additions & 3 deletions Nevergreen/Apps/Get-QGIS.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$Response = Invoke-WebRequest -Uri 'https://www.qgis.org/en/site/forusers/download.html' -DisableKeepAlive -UseBasicParsing
$Response = Invoke-WebRequest -Uri 'https://www.qgis.org/download/' -DisableKeepAlive -UseBasicParsing

$URL64 = $Response.Links | Where-Object href -Like '*.msi' | Select-Object -First 1 -ExpandProperty href
$URL64 = 'https://www.qgis.org' + ($Response.Links | Where-Object {$_.outerHTML -match 'Long Term' -and $_.href -Like '*.msi'} | Select-Object -First 1 -ExpandProperty href)
$Version64 = $URL64 | Get-Version

$URL64LTR = $Response.Links | Where-Object href -Like '*.msi' | Select-Object -First 1 -Skip 1 -ExpandProperty href
$URL64LTR = 'https://www.qgis.org' + ($Response.Links | Where-Object {$_.outerHTML -match 'Latest' -and $_.href -Like '*.msi'} | Select-Object -First 1 -ExpandProperty href)
$Version64LTR = $URL64LTR | Get-Version

New-NevergreenApp -Name 'QGIS' -Version $Version64 -Uri $URL64 -Architecture 'x64' -Channel 'Latest' -Type 'Msi'
Expand Down
37 changes: 35 additions & 2 deletions Nevergreen/Apps/Get-RedstorBackupProStoragePlatformConsole.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
$DownloadPageURL = Get-Link -Uri 'https://support.redstor.com/hc/en-gb/sections/200458081-Downloads' -MatchProperty href -Pattern 'Latest-downloads' -PrefixDomain
$UserAgents = @(
$Null
# User agent from [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome in PowerShell 7
'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.22631; en-GB) AppleWebKit/534.6 (KHTML, like Gecko) Chrome/7.0.500.0 Safari/534.6'
)
$DownloadPageURL = $Null

$URL32 = Get-Link -Uri $DownloadPageURL -MatchProperty href -Pattern 'RedstorBackupPro-SP-Console'
foreach ($UserAgent in $UserAgents) {
$GetLinkExtraParams = @{}
if ($UserAgent) {
$GetLinkExtraParams['UserAgent'] = $UserAgent
}
try {
$DownloadPageURL = Get-Link `
@GetLinkExtraParams `
-Uri 'https://support.redstor.com/hc/en-gb/sections/200458081-Downloads' `
-MatchProperty href `
-Pattern 'Latest-downloads' `
-PrefixDomain `
-ErrorAction Stop
} catch {
continue
}
break
}

if (-not $DownloadPageURL) {
Write-Error 'Could not connect to Redstor download page.'
return
}

$URL32 = Get-Link `
@GetLinkExtraParams `
-Uri $DownloadPageURL `
-MatchProperty href `
-Pattern 'RedstorBackupPro-SP-Console'

$Version = $URL32 | Get-Version -Pattern '((?:\d+\.)+\d+)\.exe$'

Expand Down
4 changes: 2 additions & 2 deletions Nevergreen/Nevergreen.psd1
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Module manifest for module 'Nevergreen'
# Generated by: Dan Gough
# Last updated: 27/11/2023
# Last updated: 18/08/2024

@{

# Script module or binary module file associated with this manifest.
RootModule = 'Nevergreen.psm1'

# Version number of this module.
ModuleVersion = '2402.1'
ModuleVersion = '2408.1'

# Supported PSEditions
CompatiblePSEditions = @('Desktop', 'Core')
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Evergreen relies on API queries to obtain its data, and HTML scraping is not wel
- Microsoft OpenJDK
- Microsoft Power BI Desktop
- Microsoft Power BI Report Builder
- Microsoft Purview Information Protection
- Microsoft Purview Information Protection Client
- Microsoft SSMS
- This is already in Evergreen but has a known issue against it where the feed is providing the build version rather than the release version most know it by.
- Microsoft Sysinternals tools (all suites and individual tools)
Expand Down
4 changes: 2 additions & 2 deletions Test/Test.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
. "$PSScriptRoot\ImportFunctions.ps1"

Start-Transcript -Path "$env:temp\Nevergreen.log" -Force
Remove-Item "$env:temp\Nevergreen.log" -ErrorAction Ignore
Start-Transcript -Path "$env:temp\Nevergreen.log" -Force -UseMinimalHeader
Clear-Host
Write-Host "PowerShell version: $($PSVersionTable.PSVersion)"
$Apps = Find-NevergreenApp
Expand Down

0 comments on commit 4458ec4

Please sign in to comment.