Questions tagged [wmic]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

Use wmic process to list only processes that have visible windows

I am trying to provide a secondary backup to Windows sometimes working, sometimes not, state restore post update restarts. Have got the commandLine value, which often contains the file open in a ...
user66001's user avatar
  • 1,247
0 votes
1 answer
132 views

(SOLVED) how to enable and disable device in one batch file [duplicate]

I want a shortcut that enable/disable a network card according to its status. I figured out how to enable or disable using either devcon, wmic and pnputil or found some Q&As here that suggest ...
user2048695's user avatar
1 vote
1 answer
285 views

WMIC SoftwareLicensingService setting ProductKey not working

When I run this command during a windows modification and reinstall test: wmic path SoftwareLicensingService set OA3xOriginalProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX Its giving me this result: ...
Sierra46's user avatar
0 votes
1 answer
405 views

How can I check the value of ReturnValue of a WMIC command?

When running WMIC commands sometimes the ReturnValue is not zero, indicating an error, such as : wmic.exe ComputerSystem where "Name='%computername%'" call Rename Name="%newname%" ...
calade's user avatar
  • 63
1 vote
1 answer
105 views

Cannot get variables from Windows activation through Wmic SoftwareLicensingProduct

I'm trying to get Windows 10 Licensing Informations through WMIC SoftwareLicensingProduct reading in a loop but it displays nothing... The command line itself produces the right information in a CMD ...
calade's user avatar
  • 63
0 votes
1 answer
218 views

Interpretation of wmic memphysical query output values

I ran this command in the command prompt and was wondering if I was interpreting the output of the command correctly. The command goes as follows: wmic memphysical get MaxCapacity, MemoryDevices The ...
EnlightenedFunky's user avatar
1 vote
1 answer
2k views

What does OA3x mean in WMIC Command oa3xoriginalproductkey

I am asking out of curiosity to know. What does OA3x mean in WMIC PATH SOFTWARELICENSINGSERVICE GET OA3xOriginalproductkey?
Siva Prasad's user avatar
1 vote
1 answer
56 views

How can I select only the basic Ethernet interface ipo Virtual Ethernet or other interfaces in a batch with WMIC NICCONFIG?

I have a small subroutine giving the description and index of the network interface called 'CARTE', so when called with %CARTE%=wireless, it returns the correct index of wireless interface (2), but ...
calade's user avatar
  • 63
0 votes
1 answer
885 views

how can we sort files according to their size using cmd batch files and print a wait timer till the loop is running?

How can we sorting the files with size in the decreasing order. What should i add ? for %%d in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do ( if exist %%d: ( echo Another process is ...
user avatar
2 votes
1 answer
954 views

How to get the current IO utilization in percentage from the command line on Windows 10?

I already know how to get the CPU usage percentage: wmic cpu get loadpercentage That returns: LoadPercentage 21 But what about the IO? Meaning the total disk utilization in percentage, or one per ...
Majd's user avatar
  • 21
1 vote
2 answers
312 views

WMIC ProcessID does not get parsed within the same command instance

I've got a batch script that I'd like to capture its Process ID but the PID is not being parsed from within the same command instance. For example, running the batch script with the following code ...
Joseph Karkar's user avatar
0 votes
2 answers
549 views

How to query a different registry path with wmic?

In cmd, the wmic command queries the registry path: HKEY_CLASSES_ROOT\Installer\Products But this list of programs is limited to those which were installed with MSI. I would like to create a batch ...
Sam's user avatar
  • 1
1 vote
1 answer
701 views

How can I change the order in which disks appear in the command "wmic diskdrive get"

How can I change the order in which disks appear in the command wmic diskdrive get? wmic diskdrive get output I want to move the Samsung SSD 980 PRO 2TB to the first position.
Leno Li's user avatar
  • 11
1 vote
0 answers
401 views

Using WMIC to find version then run respective actions

I want to run a batch to find out which version of Symantec End Point in order to perform update or upgrade actions. I got error when implementing below script - No Instance(s) available Please help ...
VB88's user avatar
  • 393
1 vote
0 answers
782 views

how to edit registry to let win10 password become never expired from auto expired

there is a way to let win10 password never expired by : wmic USERACCOUNT WHERE "Name='USERNAME'" set PasswordExpires=FALSE I want to achieve it by edit registry,But I can not find the ...
user avatar
1 vote
1 answer
443 views

possible to know, by command line, where (what socket, sata, pcie, etc...) my internal DVD drive is connected to?

using command line (powershell, wmic, ...), I would need to know all the info about my internal DVD drive, including what port/socket is connected to, on the motherboard. is it possible? I only found ...
Ale MaDaMa's user avatar
0 votes
1 answer
3k views

how to determine, by command line, whether my SATA sockets are connected or not to a device? [duplicate]

I'm far from office and I would need to buy a SATA Hard Disk for a PC. I can't ask anyone in office to open the case, then I thought to a command (wmic or powershel for example) to get if those SATA ...
Ale MaDaMa's user avatar
0 votes
1 answer
221 views

Why does wmic lie about its output for "BytesReceivedPersec" and "BytesSentPersec"?

Take this command: wmic path Win32_PerfRawData_Tcpip_NetworkInterface get BytesReceivedPersec,BytesSentPersec It currently outputs, for me, for a computer running over 11 hours: BytesReceivedPersec ...
Muscarello's user avatar
0 votes
1 answer
1k views

Difference between WUA IUpdateSearcher and wmic qfe

I am trying to figure out what are the differences between WUA (Windows Update Agent API) IupdateSearcher and wmic qfe list. I get different results when I use: (New-Object -ComObject Microsoft.Update....
Dor Fellus Cohen's user avatar
1 vote
0 answers
618 views

Why SSD serial number is different on Windows and Linux?

On Windows, I use wmic diskdrive get Name, Manufacturer, Model, InterfaceType, MediaType, SerialNumber and get 044A_5000_B130_099F. as the SerialNumber. However, on Linux, I use sudo smartctl -i /dev/...
Steven Yang's user avatar
0 votes
1 answer
258 views

WMIC to a different network

I am trying to run a command on that will execute on Server2 from Server1 using WMIC e.g: from Server1 run the following command to execute on server2 WMIC /node:Server2 process call create "cmd....
Snanga's user avatar
  • 11
1 vote
1 answer
188 views

Can't get ip address with wmic command for PPPoP interface

I have tried to get ipv4 address of one of adapters, precisely from "PPPoP WAN Adapter" when it is connected, using wmic nic and wmic nicconfig commands but it didn't work. In general, when ...
KrzysztofJ's user avatar
1 vote
1 answer
1k views

How to execute WMI call from command line?

I've been using the following instructions to successfully turn my fans to silent mode: Fan Overboost stuck on Balanced mode in Rog Gaming Center The relevant parts are: Download and extract WMI ...
George Tian's user avatar
0 votes
1 answer
103 views

Meaning of DNSEnabledForWINSResolution

I am trying to interpret the results of wmic nicconfig list full, and I do not understand the meaning of DNSEnabledForWINSResolution. If I consider the name, I would think that if I try to resolve a ...
z32a7ul's user avatar
  • 141
0 votes
1 answer
361 views

wmic has been deprecated with Windows 10, 21H1

The current Windows 10 upgrade 21H1 mentioned The WMIC tool is deprecated But to avoid manually fiddling with Task Manager I just call—actually via DOSKEY macros—in cmd.exe, like wmic process where ...
thoku's user avatar
  • 123
0 votes
1 answer
3k views

System Information shows incorrect System Model and Manufacturer

Three or four years ago I somehow changed my computer manufacturer and model information whilst dual booting multiple operating systems on my PC. Now whenever I run msinfo32 (System Information) it ...
edwinbradford's user avatar
-1 votes
1 answer
52 views

Is there any benefit of keeping the default boot drive of Windows 10 as C:?

I am using below query to find that the default drive in Windows 10 is C:, is there any benefit of keeping it as it is. Also how to change the default boot drive so that it is reflected in the result ...
Divik Shrivastava's user avatar
1 vote
1 answer
1k views

Windows wmic: list all available screen resolutions without using Powershell

I am well aware that I can get all available screen modes in Powershell using gwmi - for example, as follows: (gwmi -N "root\wmi" -Class WmiMonitorListedSupportedSourceModes)[0]....
Adrian S's user avatar
  • 111
0 votes
1 answer
208 views

How to undo the command “wmic path Win32_Share delete”?

I ran this command in elevated cmd (win 10): wmic path Win32_Share delete I was trying to do something else. Now I can't map network drives. How can I undo the change?
Zak D's user avatar
  • 1
3 votes
1 answer
1k views

Cannot get Battery Level

normally I used this command to get battery level wmic Win32_Battery Get EstimatedChargeRemaining but recently it started to give me: Win32_Battery - Alias not found. So I read I should be using ...
LaCalienta's user avatar
1 vote
0 answers
735 views

I am trying to make a WMIC batch file to get me a list of installed software

Disclaimer: i am not an expert at this. I put this script together based on combining multiple samples i saw from other scripts. My goal is to use WMIC to output a CSV file of the current logged in ...
zwin's user avatar
  • 11
0 votes
0 answers
1k views

How to create a user using WMIC interface

I am creating a user using command USERACCOUNT CREATE NAME="test" OUTPUT: Create instance of 'Win32_UserAccount' class (Y/N)?y ERROR: Description = Unsupported parameter This is the only ...
aneela's user avatar
  • 111
4 votes
3 answers
14k views

How can I run a single command to show all installed applications in Windows 10?

To follow-up and expand upon this question, I want to know how to get a list of applications as shown in appwiz.cpl which always shows all installed applications. From here, we know that other ...
bluesquare's user avatar
1 vote
2 answers
12k views

How to use WMI to query IP address from specific NIC?

I have a computer with two NICs. I'm trying to query the IP address of each NIC separately to use in BGInfo. This article describes how to query the IP address of only active network interfaces. It ...
Izzo's user avatar
  • 217
1 vote
4 answers
1k views

Cant Kill Task Windows

I can not kill firefox.exe which appears to be running having some kind of problem. I tried taskkill and the solution in a prevous answer, but as one of the comments says When I call terminate it ...
The Floating Brain's user avatar
1 vote
1 answer
3k views

WMIC error: No Instance(s) Available (wmic product get name, version)

I am trying to get the list of installed software in a brand new Windows 10 (Pro) machine. In my case it seems some wmic commands work while others don't. Find below two real examples: $ wmic cpu get ...
Atenea_v10's user avatar
1 vote
2 answers
1k views

I'm trying to use wmic to find a specific USB drive and then set an environment variable

I can find the drive with the following wmic command: wmic logicaldisk where VolumeName='USB-BACKUP' get deviceid |find /v "DeviceID" it returns Q: and that works a treat. However, I also ...
WithaKay's user avatar
0 votes
1 answer
2k views

How can I use the Command Prompt to find the following metadata of files: Authors, Last save by, Owner, Creator?

I am able to extract metadata using the following prompt: wmic datafile where name="Q:\\filename.docx" list full And I can see who owns the file or folder using this prompt: dir øa /q But I ...
Maplu's user avatar
  • 1
5 votes
3 answers
4k views

How to properly filter a wmic diskdrive list

I'm trying to filter results of a wmic list with where-object but unfortunately this does not seems to work. wmic diskdrive list brief | Where-Object -Property "Caption" -Contains "...
Soleil's user avatar
  • 374
0 votes
1 answer
213 views

Finding rogue process spawning short lived WMIC.exe commands

There is a rogue process on my system spawning very CPU intensive WMIC.exe processes. They are so short lived that I can't seem to interact with them before they finish, but I believe they are causing ...
yeerk's user avatar
  • 101
5 votes
2 answers
8k views

Has WMIC been un-deprecated?

For a long time, I've been putting off changing all my WMIC-based commands into "whatever modern junk Microsoft wants me to use now", having spent significant time trying (and failing) to find ...
Couper's user avatar
  • 51
2 votes
2 answers
1k views

What is the time format like 01d15614cbaee92c in Windows Hotfixes?

The timestamp (InstalledOn) format of Windows Hotfixes' is not regularity it is showing various types like MM-DD-YYYY, YYYY/MM/DD, YYYYMMDD and 01d15614cbaee92c. These values can be obtained from ...
Namhyeon Go's user avatar
0 votes
2 answers
1k views

Parsing Command Prompt Output

I am retrieving disk information via JavaScript with the wmic statement, wmic logicaldisk get freespace,name,size,volumename, which produces the following output, but in a single string. "FreeSpace ...
oldboy's user avatar
  • 383
1 vote
0 answers
77 views

Parsing wmic logicaldisk get Information [duplicate]

I am retrieving disk information via JavaScript with the wmic statement, wmic logicaldisk get freespace,name,size,volumename, which produces the following output, but in a single string. "FreeSpace ...
oldboy's user avatar
  • 383
1 vote
0 answers
155 views

wmic shows different persistent flag for net use remote drive than it was actually created with

I added some remote drives on my NAS to my laptops system by invoking: net use \\someserver\ /user:any "anyKey" /PERSITENT:YES To get access to these remote drives, as I didn't assign a letter for ...
aldr's user avatar
  • 133
1 vote
0 answers
456 views

wmic useraccount command returns failure

On my windows 2012 domain controller I have run the following command in cmd.exe wmic useraccount where "name='myusername'" set disabled=true Here are results: Updating property(s) of '\\...
Bryan Raynolds's user avatar
0 votes
1 answer
806 views

WMIC Output Result - Remove Blank Line?

This script does what I want it to do - producing the result in the txt file noted. (@for /F "delims=" %I in ('wmic path Win32_VideoController get DriverVersion /VALUE') do @for /F "tokens=1* ...
SammyJ's user avatar
  • 3
0 votes
1 answer
363 views

WMIC Output Result Without Property Name

I'm entering this line: wmic /OUTPUT:D:\DriverVersion.txt path win32_VideoController get driverversion The txt file has two lines in it: VariableValue XX.XXX.XXX.XX.X But I don't want ...
SammyJ's user avatar
  • 3
1 vote
1 answer
821 views

How do i retrieve the version of an executable file using Winexe and WMIC on a remote window's machine from a linux machine?

I am currently trying to retrieve the file version of an executable file on a remote host windows machine. I am doing this on a linux machine. The command I've tried is the following: winexe -U ...
Avenger's user avatar
  • 11
1 vote
0 answers
221 views

wmic to disable all network adapters

I know how to use wmic to disable specific network card using below commend, but I would like to disable all network card from the index, could you please tell me what should I change in my command? ...
Remyio's user avatar
  • 11