Note: For this question, when I refer to "Windows drivers" I mean .inf and associated files which can otherwise be installed by right-clicking the .inf and clicking "Install" in Windows Explorer. I do not mean any kind of setup.exe-style executable which might install a driver.
There exists the following:
Get-WindowsDriver -online
- a Powershell Cmdlet that outputs the currently-installed drivers of the running systemAdd-WindowsDriver
- a Powershell Cmdlet that adds a driver to an offline image. The correspondingRemove-WindowsDriver
can be used to remove a driver from an offline image.dpinst.exe
- a command line tool that can be used to install a driver to the running system.dpinst.exe /u
can be used with the to uninstall drivers.
I have not, however, found a corresponding Powershell Cmdlet that supports installing and uninstalling drivers on the running system. I'm sure I could wrap dpinst.exe
in some powershell, but I'd like to avoid mapping command line parameters and parsing output if a more Powershell-native method exists.
Do Powershell Cmdlets exist that install and uninstall Windows drivers on the running system? Is there some other way to install and uninstall Windows drivers using Powershell that does not involve dpinst.exe
?