diff --git a/Nevergreen/Apps/Get-8x8Work.ps1 b/Nevergreen/Apps/Get-8x8Work.ps1 index 4672ed6..0d15345 100644 --- a/Nevergreen/Apps/Get-8x8Work.ps1 +++ b/Nevergreen/Apps/Get-8x8Work.ps1 @@ -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' \ No newline at end of file + 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)" +} \ No newline at end of file diff --git a/Nevergreen/Apps/Get-AdobeAcrobat.ps1 b/Nevergreen/Apps/Get-AdobeAcrobat.ps1 index 9879ea5..95eeea6 100644 --- a/Nevergreen/Apps/Get-AdobeAcrobat.ps1 +++ b/Nevergreen/Apps/Get-AdobeAcrobat.ps1 @@ -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' diff --git a/Nevergreen/Apps/Get-AdobeAcrobatReader.ps1 b/Nevergreen/Apps/Get-AdobeAcrobatReader.ps1 index 57d7dc0..551d3a2 100644 --- a/Nevergreen/Apps/Get-AdobeAcrobatReader.ps1 +++ b/Nevergreen/Apps/Get-AdobeAcrobatReader.ps1 @@ -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' diff --git a/Nevergreen/Apps/Get-AdobeCreativeCloud.ps1 b/Nevergreen/Apps/Get-AdobeCreativeCloud.ps1 index 352ae73..478bb63 100644 --- a/Nevergreen/Apps/Get-AdobeCreativeCloud.ps1 +++ b/Nevergreen/Apps/Get-AdobeCreativeCloud.ps1 @@ -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' diff --git a/Nevergreen/Apps/Get-AdobeDigitalEditions.ps1 b/Nevergreen/Apps/Get-AdobeDigitalEditions.ps1 index 92206f7..1933da0 100644 --- a/Nevergreen/Apps/Get-AdobeDigitalEditions.ps1 +++ b/Nevergreen/Apps/Get-AdobeDigitalEditions.ps1 @@ -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' diff --git a/Nevergreen/Apps/Get-Anaconda.ps1 b/Nevergreen/Apps/Get-Anaconda.ps1 index 9d1c346..0963c3c 100644 --- a/Nevergreen/Apps/Get-Anaconda.ps1 +++ b/Nevergreen/Apps/Get-Anaconda.ps1 @@ -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' \ No newline at end of file +New-NevergreenApp -Name 'Anaconda' -Version $Version -Uri $URL -Architecture 'x64' -Type 'exe' diff --git a/Nevergreen/Apps/Get-CiscoWebex.ps1 b/Nevergreen/Apps/Get-CiscoWebex.ps1 index e9a0303..f3bf230 100644 --- a/Nevergreen/Apps/Get-CiscoWebex.ps1 +++ b/Nevergreen/Apps/Get-CiscoWebex.ps1 @@ -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' \ No newline at end of file +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' \ No newline at end of file diff --git a/Nevergreen/Apps/Get-MicrosoftOfficeDeploymentTool.ps1 b/Nevergreen/Apps/Get-MicrosoftOfficeDeploymentTool.ps1 new file mode 100644 index 0000000..242b01d --- /dev/null +++ b/Nevergreen/Apps/Get-MicrosoftOfficeDeploymentTool.ps1 @@ -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 = '(?)' + +$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' diff --git a/Nevergreen/Apps/Get-MicrosoftPowerBIReportBuilder.ps1 b/Nevergreen/Apps/Get-MicrosoftPowerBIReportBuilder.ps1 index 7f3ee01..6239608 100644 --- a/Nevergreen/Apps/Get-MicrosoftPowerBIReportBuilder.ps1 +++ b/Nevergreen/Apps/Get-MicrosoftPowerBIReportBuilder.ps1 @@ -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+

((?:\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+

((?:\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' \ No newline at end of file +New-NevergreenApp -Name 'Microsoft Power BI Report Builder' -Version $Version -Uri $URL32 -Architecture 'x86' -Type 'Msi' diff --git a/Nevergreen/Apps/Get-MicrosoftPurviewInformationProtection.ps1 b/Nevergreen/Apps/Get-MicrosoftPurviewInformationProtection.ps1 new file mode 100644 index 0000000..81bb6ef --- /dev/null +++ b/Nevergreen/Apps/Get-MicrosoftPurviewInformationProtection.ps1 @@ -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' \ No newline at end of file diff --git a/Nevergreen/Apps/Get-OpenVPNConnect.ps1 b/Nevergreen/Apps/Get-OpenVPNConnect.ps1 index 5a469be..efbf9c0 100644 --- a/Nevergreen/Apps/Get-OpenVPNConnect.ps1 +++ b/Nevergreen/Apps/Get-OpenVPNConnect.ps1 @@ -1,4 +1,4 @@ -$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$'} @@ -6,6 +6,6 @@ $Releases = @( ) 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 } \ No newline at end of file diff --git a/Nevergreen/Apps/Get-QGIS.ps1 b/Nevergreen/Apps/Get-QGIS.ps1 index bc76d56..4f8cb6d 100644 --- a/Nevergreen/Apps/Get-QGIS.ps1 +++ b/Nevergreen/Apps/Get-QGIS.ps1 @@ -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' diff --git a/Nevergreen/Apps/Get-RedstorBackupProStoragePlatformConsole.ps1 b/Nevergreen/Apps/Get-RedstorBackupProStoragePlatformConsole.ps1 index 47169cf..0526fd5 100644 --- a/Nevergreen/Apps/Get-RedstorBackupProStoragePlatformConsole.ps1 +++ b/Nevergreen/Apps/Get-RedstorBackupProStoragePlatformConsole.ps1 @@ -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$' diff --git a/Nevergreen/Apps/Get-MicrosoftAzureInformationProtection.ps1 b/Nevergreen/Deprecated/Get-MicrosoftAzureInformationProtection.ps1 similarity index 100% rename from Nevergreen/Apps/Get-MicrosoftAzureInformationProtection.ps1 rename to Nevergreen/Deprecated/Get-MicrosoftAzureInformationProtection.ps1 diff --git a/Nevergreen/Nevergreen.psd1 b/Nevergreen/Nevergreen.psd1 index bf962c3..cf8d74d 100644 --- a/Nevergreen/Nevergreen.psd1 +++ b/Nevergreen/Nevergreen.psd1 @@ -1,6 +1,6 @@ # Module manifest for module 'Nevergreen' # Generated by: Dan Gough -# Last updated: 27/11/2023 +# Last updated: 18/08/2024 @{ @@ -8,7 +8,7 @@ RootModule = 'Nevergreen.psm1' # Version number of this module. -ModuleVersion = '2402.1' +ModuleVersion = '2408.1' # Supported PSEditions CompatiblePSEditions = @('Desktop', 'Core') diff --git a/README.md b/README.md index 4597a56..7ef57b7 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/Test/Test.ps1 b/Test/Test.ps1 index 52d58dc..3fffa4d 100644 --- a/Test/Test.ps1 +++ b/Test/Test.ps1 @@ -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