DanGough / Nevergreen

This module is an alternative to Evergreen, and allows you to find the latest version and download URL for various Windows apps. Evergreen uses API queries to obtain its data whereas this module is more focussed on web scraping. This is more prone to breaking when websites are changed, hence the name.
The Unlicense
71 stars 16 forks source link

MicrosoftAzureInformationProtection does not work anymore #66

Open j81blog opened 3 weeks ago

j81blog commented 3 weeks ago

`Get-Nevergreenapp -Name MicrosoftAzureInformationProtection get-nevergreenapp : Error retriving results for 'MicrosoftAzureInformationProtection': Cannot validate argument on parameter 'Uri'. The argument "" does not match the "^(http|https)://" pattern. Supply an argument that matches "^(http|https)://" and try the command again. At line:1 char:1

AScott-WWF commented 3 weeks ago

I believe this is probably because Microsoft are in the process of rebranding this product as Microsoft Purview Information Protection, so the old URL has now changed.

The old url 'https://docs.microsoft.com/en-us/azure/information-protection/rms-client/unifiedlabelingclient-version-release-history' (which the version number was previously gathered), now redirects to the new Microsoft Purview Information Protection release notes url: 'https://learn.microsoft.com/en-us/purview/information-protection-client-relnotes'

So to correct the Nevergreen script ('Get-MicrosoftAzureInformationProtection.ps1'), I'd suggest renaming to 'Get-MicrosoftPurviewInformationProtection.ps1', As the download is now combined as a single .exe, the script should be changed as follows:

This (IMO) will result in a script as below:

# Get-MicrosoftPurviewInformationProtection
$Version = Get-Version -Uri 'https://learn.microsoft.com/en-us/purview/information-protection-client-relnotes' -Pattern '>Version\s(\d+\.\d+\.\d+\.\d+)'
$URLExe = Get-Link -Uri 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=53018' -MatchProperty href -Pattern '\.exe'
New-NevergreenApp -Name 'Microsoft Purview Information Protection' -Version $Version -Uri $URLExe -Architecture 'x86' -Type 'Exe'
j81blog commented 2 weeks ago

When are you publishing the new version? Thank you for your work and effort!

AScott-WWF commented 12 hours ago

@DanGough The above should fix / replace the earlier script due to Microsoft rebranding the product