File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1111 display, etc. drivers.
1212. PARAMETER Manufacturer
1313 The Manufacturer of the device. Must be one of 'Lenovo', 'Dell', 'HP'.
14+ . PARAMETER DownloadOnly
15+ [OPTIONAL] Don't install drivers via pnputil. Just download the drivers to
16+ $env:TEMP and exit.
1417. PARAMETER Model
1518 The literal regex string that matches a URL on the Manufacturer's website
1619 pointing to the exact download URL of the driver.
@@ -36,7 +39,9 @@ param (
3639 [Parameter (Mandatory )]
3740 [string ]$Manufacturer ,
3841 [Parameter (Mandatory )]
39- [string ]$Model
42+ [string ]$Model ,
43+ [Parameter ()]
44+ [switch ]$DownloadOnly
4045)
4146
4247function Get-RegexMatch {
@@ -191,10 +196,14 @@ try {
191196
192197 Expand-Installer - Manufacturer $Manufacturer - InstallerName $installer - Destination $TEMP_PATH
193198
194- Install-Drivers - Destination $TEMP_PATH
199+ if (-not $DownloadOnly ) {
200+ Install-Drivers - Destination $TEMP_PATH
201+ }
195202} catch {
196203 throw $_
197204} finally {
198- Remove-Item $TEMP_PATH - Force - Recurse - ErrorAction Continue
205+ if (-not $DownloadOnly ) {
206+ Remove-Item $TEMP_PATH - Force - Recurse - ErrorAction Continue
207+ }
199208 $ProgressPreference = $OldProgressPreference
200209}
You can’t perform that action at this time.
0 commit comments