Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding .inf drivers using PowerShell, possible?

Are we able to install drivers via their .inf files etc. using a PowerShell cmdlet? When Googling I found, Add-WindowsDriver but I think this one is for an offline Windows image. Does that mean an image that is not currently used on an OS? If not, please teach me how to write the parameters. Thank you!

like image 478
DrixlRey Avatar asked Jul 17 '26 12:07

DrixlRey


1 Answers

This PowerShell script will do what you want:

Get-ChildItem "C:\Driver File Location" -Recurse -Filter "*inf" | ForEach-Object { PNPUtil.exe /add-driver $_.FullName /install } 
like image 198
Jeffery Allen Avatar answered Jul 20 '26 09:07

Jeffery Allen