#!/bin/pwsh . "$PSScriptRoot/BrowserAutomation.ps1"; function Install-AmdSoftwarePackage() { param( [string]$url ) $tempDir = $context.GetTempDirectory(); $selector = 'summary:first div.driver:first a:contains("Download")'; $file = Start-AutomatedDownload $context $url $selector $tempDir; Start-Process -Wait -FilePath $file -ArgumentList "/S"; Remove-Item -Recurse $tempDir; }