Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

Commit

Permalink
Update Get-UpdateDownloadArray.ps1
Browse files Browse the repository at this point in the history
Filter URL to ensure only .MSU updates are returned
  • Loading branch information
aaronparker committed Mar 10, 2019
1 parent 67f2c40 commit 39b003c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion LatestUpdate/Private/Get-UpdateDownloadArray.ps1
Expand Up @@ -45,6 +45,7 @@ Function Get-UpdateDownloadArray {
$newItem | Add-Member -type NoteProperty -Name 'Arch' `
-Value (Get-RxString -String $idItem.Note -RegEx $rxArch)

# Add custom version note based on description returned from page
If ($idItem.Note -match "Windows 10.*") {
$Version = Get-RxString -String $idItem.Note -RegEx $rx10
}
Expand Down Expand Up @@ -72,7 +73,11 @@ Function Get-UpdateDownloadArray {
$newItem | Add-Member -type NoteProperty -Name 'Version' -Value $Version

$newItem | Add-Member -type NoteProperty -Name 'Note' -Value $idItem.Note
$newItem | Add-Member -type NoteProperty -Name 'URL' -Value $url

# Filter URL to ensure only .MSU updates are returned
$download = $url | Where-Object { (Split-Path -Path $_ -Extension) -match ".msu" }
$newItem | Add-Member -type NoteProperty -Name 'URL' -Value $download

$output += $newItem
}
}
Expand Down

0 comments on commit 39b003c

Please sign in to comment.