Public/DriverPack/Get-DellDriverPack.ps1
function Get-DellDriverPack { [CmdletBinding()] param ( [string]$DownloadPath ) #======================================================================= # Get-CatalogDellDriverPack #======================================================================= $Results = Get-CatalogDellDriverPack $Results = $Results | Where-Object {$_.SupportedSystemId -ne $null} $Results = $Results | Where-Object {$_.SupportedOperatingSystems -contains 'Windows 10 x64'} $Results = $Results | Sort-Object OSVersion -Descending | Group-Object Name | ForEach-Object {$_.Group | Select-Object -First 1} #======================================================================= # Download #======================================================================= if ($DownloadPath) { $Results = $Results | Out-GridView -Title 'Select one or more DriverPacks to Download' -PassThru -ErrorAction Stop foreach ($Item in $Results) { Write-Verbose "Saving $($Item.FileName)" Save-MyDriverPack -Manufacturer Dell -Product $Item.SupportedSystemId[0] -DownloadPath $DownloadPath } } #======================================================================= # Results #======================================================================= $Results | Sort-Object ReleaseDate -Descending | Select-Object CatalogVersion,ReleaseDate,Name,` @{Name='Product';Expression={($_.SupportedSystemId)}},` @{Name='DriverPackUrl';Expression={($_.Url)}},FileName #======================================================================= } |