Search This Blog

Monday, April 22, 2024

pnputil: enable and disable device

The topic of today is how you can work with pnputil.exe to enable and disable devices on your computer.

This was some research and experiments I did to find alternative or complimentary ways to the GUI and PowerShell cmdlets.

By using pnputil.exe /? in PowerShell I found out what some of the uses are and the commands that I was interested in are the following.

To enumerate

This command basically lists all your current devices and their unique ID, in this case it is called Instance ID. Let's say you want to disable a speaker, then you need to find the Instance ID for that speaker.

pnputil /enum-devices

Should you need to enumerate classes for some reason, then this is the command.

pnputil /enum-classes

To disable device

Simply take the full Instance ID for the device, brackets and all.

pnputil /disable-device "SWD\PRINTENUM\{283C1D7C-527C-4D85-8FE7-BCFA6768EA32}"

This example disables Microsoft Print to PDF.

To enable device

It is very much like the previous example, you use the Instance ID to enable the device.

pnputil /enable-device "SWD\PRINTENUM\{283C1D7C-527C-4D85-8FE7-BCFA6768EA32}"

If you keep the device manager open at the same time, you will notice it flicker as the device is enabled/disabled.

Additional examples

You need to run this as an administrator, what you can do for example is to create a simple .ps1 file and then point a shortcut on that file. Then right click the shortcut and run as administrator.

Saturday, April 6, 2024

Windows: Microsoft PC Manager

Some time ago I heard about the latest program from Microsoft, called the Microsoft PC manager. A maintenance tool for computers, that combines already existing tools into a GUI.

Download is available from the Microsoft Store, but since I didn't want to log in, I found a so called offline installer, using Bing. The link for the offline installer (beta) is available here: https://aka.ms/PCManagerOFL30101

The functionality that the app contains are the following features:

Updating your system, including drivers that you can find in Windows Update.

Disk clean up, which includes the classic disk cleanup and removing temporary files for example. A function I found interesting was the scan for duplicate files.

Memory freeing activities, such as closing open processes.

You also can fix startup apps that slows up your booting.

Additionally you have a PC boosting button and a health check. You also have access to Microsoft Defender Antivirus scanning. 


Many of these functions are already available in your Windows 11 installation, but this program gathers these tools nicely under one app. A great addition to your home server management.