Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Update Drivers Using CMD on Windows

Keeping your drivers up to date is crucial for maintaining optimal performance and security on your Windows system. While there are various graphical tools available for updating drivers, some users prefer or require command-line solutions. This article explores how to update drivers using Command Prompt (CMD) on Windows, providing a step-by-step guide and practical examples.


Updating drivers via CMD is not a straightforward process as Windows does not provide a direct command for this task. However, it is possible to leverage Windows Management Instrumentation Command-line (WMIC) and PowerShell commands to manage drivers. This guide will focus on using these tools to check and update drivers where applicable.


Examples:


1. Checking Driver Information Using WMIC:
To list all drivers installed on your system, you can use the following WMIC command:


   wmic driver get name,version,manufacturer

This command will display the name, version, and manufacturer of each driver installed on your system.


2. Updating Drivers Using PowerShell:
While CMD itself does not offer a direct method to update drivers, PowerShell provides a more robust set of commands for managing drivers. Here is an example of how to update drivers using PowerShell:


   # Open PowerShell as Administrator
Start-Process powershell -Verb runAs

# Import the PnPDevice module
Import-Module PnPDevice

# Get a list of all drivers that can be updated
Get-PnpDevice -PresentOnly | Where-Object { $_.Status -eq "Error" -or $_.Status -eq "Degraded" }

# Update a specific driver (replace <DeviceID> with the actual device ID)
Update-PnpDevice -InstanceId "<DeviceID>"

Note: To use the Update-PnpDevice command, you need to have the PnPDevice module installed. You can install it using the following command:


   Install-Module -Name PnPDevice -Scope CurrentUser

3. Using DISM to Add or Remove Drivers:
The Deployment Imaging Service and Management Tool (DISM) can also be used to add or remove drivers. Here’s how you can use DISM to add a driver:


   dism /online /add-driver /driver:<path_to_driver_inf_file> /recurse

And to remove a driver:


   dism /online /remove-driver /driver:<driver_inf_file_name>

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.