How do I script a device driver change in Powershell?

Adithya K 1 Reputation point
2020-11-12T07:53:29.003+00:00

I have two device drivers to choose from for a NVMe SSD under :

Device Manager -> Device -> Update Drivers -> Browse my computer for driver software -> Let me pick from a list of available drivers on my computer -> Select one of two available drivers.

While changing from the UI works fine, I have not found much on scripting this in my searches so far. Using PnPUtils and DevCon to disable the driver results in a BSOD. If anyone could point me to the documentation for something like this it would be much appreciated. Thanks.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,537 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue 37,276 Reputation points Microsoft Vendor
    2020-11-13T06:27:41.067+00:00

    Hi,

    There's no such powershell cmdlet. You still have to call pnputil in a powershell script. Have you checked the dump files for the cause of the BSOD?

    To update the driver you can refer to this link
    https://learn.microsoft.com/en-us/windows-hardware/drivers/install/installing-the-updated-version-of-the-driver-package

    Best Regards,
    Ian

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.