Read this quick guide to learn the two steps to uninstall a device deriver from a Windows Server 2022 Core.
Step 1: Get the Driver’s INF Name
The first step to uninstalling a driver is to get the driver’s INF file name. In this example, I want to uninstall a USB Net adapter that I no longer require.
So, I will use the command below to list all network drivers installed on the server core.
pnputil /enum-devices /class "Net"
The driver I need to uninstall is the Realtek USB GbE Family Controller. Its INF name is oem11.inf.
Step 2: Uninstall the Driver
- To uninstall the driver, run the command below:
pnputil.exe /delete-driver oem11.inf /uninstall /force
The command runs and confirms that the driver has been uninstalled successfully.
- To confirm that the driver has been uninstalled, re-run the command in step 1.
pnputil /enum-devices /class "Net"
Oh, the driver is still there! Well, it is becasue you need to restart the server for the change to take effect.
- Restart the server by running the command below.
Restart-Computer -confirm:$false
After the server restarts, rerun the pnputil command with the “/enum-devices” parameter. This time, the driver is gone!
pnputil /enum-devices /class "Net"
Conclusion
Uninstalling a device driver from a Windows Server Core is as easy as 1,2, 3!
The fiest step is to get the driver’s .INF name. After that, use its name to uninstall it and you’re done.
Not so fast as there is one last step – restart the server and voilà, the driver disappears!
I hope you enjoyed reading this guide as much as I enjoyed writing it. I truly love helping my readers solve technology problems and I like to hear from you.
Let me know what you think about this quick guide by responding to our “Was this page helpful?” feedback request form below.