Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Managing device drivers is a crucial aspect of maintaining a healthy and efficient Windows operating system. Drivers are essential for hardware components to communicate with the OS. This article will guide you through various methods to manage drivers using Command Prompt (CMD) and PowerShell.
To list all installed drivers, you can use the driverquery
command:
driverquery
For more detailed information, including driver file paths, use:
driverquery /v
You can export the list of installed drivers to a text file:
driverquery /fo csv > C:\DriversList.csv
To install a driver, use the pnputil
command. First, place the driver file in a known directory, then execute:
pnputil /add-driver C:\Path\To\Driver.inf /install
To remove a driver, you need to know the published name of the driver package. List all driver packages with:
pnputil /enum-drivers
Then, uninstall the desired driver:
pnputil /delete-driver oemXX.inf /uninstall
Replace oemXX.inf
with the actual published name.
To list all installed drivers, use the Get-WmiObject
cmdlet:
Get-WmiObject Win32_PnPSignedDriver | Select-Object DeviceName, Manufacturer, DriverVersion
Export the list of installed drivers to a CSV file:
Get-WmiObject Win32_PnPSignedDriver | Select-Object DeviceName, Manufacturer, DriverVersion | Export-Csv -Path C:\DriversList.csv -NoTypeInformation
To install a driver using PowerShell, you can use the pnputil
command within a script:
Start-Process pnputil -ArgumentList "/add-driver C:\Path\To\Driver.inf /install" -NoNewWindow -Wait
First, get the list of drivers:
pnputil /enum-drivers
Then, remove the specific driver:
Start-Process pnputil -ArgumentList "/delete-driver oemXX.inf /uninstall" -NoNewWindow -Wait
Replace oemXX.inf
with the actual published name.
Managing drivers via CMD and PowerShell in Windows provides a powerful way to automate and streamline driver management tasks. Whether you are installing, uninstalling, or exporting driver lists, these tools offer flexibility and control over your system's drivers.