Questions tagged [wmic]
The wmic tag has no usage guidance.
163
questions
0
votes
1
answer
24
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%"
...
1
vote
1
answer
25
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 ...
1
vote
1
answer
41
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 ...
1
vote
1
answer
388
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?
1
vote
1
answer
42
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 ...
0
votes
1
answer
256
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 ...
2
votes
1
answer
352
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 ...
1
vote
2
answers
128
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 ...
0
votes
2
answers
331
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 ...
1
vote
1
answer
461
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.
1
vote
0
answers
245
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 ...
0
votes
0
answers
444
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 ...
1
vote
1
answer
271
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 ...
0
votes
1
answer
2k
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 ...
0
votes
1
answer
152
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 ...
0
votes
1
answer
870
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....
1
vote
0
answers
527
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/...
0
votes
1
answer
216
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....
1
vote
1
answer
149
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 ...
1
vote
1
answer
525
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 ...
0
votes
1
answer
73
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 ...
0
votes
1
answer
301
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 ...
0
votes
1
answer
2k
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 ...
-1
votes
1
answer
45
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 ...
1
vote
1
answer
785
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]....
0
votes
1
answer
165
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?
3
votes
1
answer
653
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 ...
1
vote
0
answers
540
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 ...
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 ...
4
votes
3
answers
8k
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 ...
1
vote
2
answers
9k
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 ...
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 ...
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 ...
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 ...
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 ...
5
votes
3
answers
3k
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 "...
0
votes
1
answer
160
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 ...
5
votes
2
answers
7k
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 ...
2
votes
2
answers
794
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 ...
0
votes
2
answers
938
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 ...
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 ...
1
vote
0
answers
109
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 ...
1
vote
0
answers
370
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 '\\...
0
votes
1
answer
719
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* ...
0
votes
1
answer
302
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 ...
1
vote
1
answer
643
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 ...
1
vote
0
answers
152
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?
...
1
vote
1
answer
872
views
Which is correct for displaying installed updates: WMIC or Systeminfo?
Am applying a "critical" Microsoft patch (KB4499164) to a number of remote Windows 7 (32-bit) PCs. My ONLY option to access these PCs is via SSH and SFTP.
I used a batch script to apply this patch ...
2
votes
1
answer
793
views
How to list just hard drive partitions on windows (except dvd-drives)?
I have a .bat file in which there's the following command and can list available drives on my computer :
for /f "skip=1 delims=" %%x in ('wmic logicaldisk get caption') do @echo.%%x
And give the the ...
0
votes
1
answer
411
views
Is there a way to get files modified after and/or before a certain time without using PowerShell?
Without using PowerShell or other scripts, and only using built-in Windows command-line programs, I'm trying to find files modified after a certain date and time, but I'm having trouble. This is the ...