Questions tagged [wmic]
The wmic tag has no usage guidance.
152
questions
0
votes
0
answers
18
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
45
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
245
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
40
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
285
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....
0
votes
0
answers
104
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
56
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
46
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
0
answers
124
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
32
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
223
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
340
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
42
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
176
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
75
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
149
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
162
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
386
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 ...
3
votes
3
answers
2k
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
5k
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
592
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
1k
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
599
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
842
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
2k
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
87
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
6k
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
404
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
504
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
74
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
70
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
187
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
538
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
176
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
343
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
63
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
672
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
467
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
229
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 ...
4
votes
1
answer
2k
views
Difference between "delete" and "call terminate" for WMIC
To kill a running process on Windows using its executable path, I could use either of:
wmic process where ExecutablePath='C:\\path\\to\\my.exe' delete
Or:
wmic process where ExecutablePath='C:\\...
0
votes
1
answer
500
views
How to repair wmic
I'm getting Invalid XML content error when I call any wmic os operation. e.g.
> wmic os get Caption
Invalid XML content.
I've tried
winmgmt /resetrepository
But it had no effect.
0
votes
0
answers
862
views
Using wmic in cmd from booted USB in troubleshoot mode
I am having a Windows installation which fails to boot (BSOD). Safe mode is not working, too. So I created a Windows bootable USB stick and am now in the command prompt from the troubleshoot mode.
...
1
vote
0
answers
48
views
Setting UserAccount/Properties/Environment and UserAccount/Properties/Sessions with Batch file
I just wrote a batch file to create windows users with some default properties.
Mostly using net user and net localgroup.
@echo off
for /f "tokens=1,2,3,4 delims=," %%a in (usuarios.csv) do (
...
1
vote
1
answer
76
views
Why isn't this for loop working? Batch
I have a for loop in this script: https://github.com/ITCMD/Explorer--/blob/master/Explorer--.bat
That looks like this: (:ModificationID line 477, called from lines 308 and 329 in :OtherVersions)
set ...
0
votes
0
answers
788
views
Change AD Computer Description via CSV and Powershell
I'm fairly new to scripting in PowerShell, therefore, please pardon my skill...
I have this mini project to update AD computers descriptions based on the following format from a CSV file I have:
...
2
votes
0
answers
1k
views
Terminating a Process from CMD: Softest to Hardest
I was wondering if anyone had experience using command line to terminate processes using taskkill and WIMC.
I was wondering if anyone knew the order of how "hard" of a close/terminate these commands ...
1
vote
1
answer
1k
views
How to create a service with WMIC?
I wrote a service program with WinAPI functions with c++ And I want to create that by wmic.exe in service manager with bellow command :
service create name="test" where path = "C:\Users\msi\Desktop\...
2
votes
2
answers
9k
views
List all user accounts in a Windows Domain group via Command Line?
I would like to find\create a command to list all user accounts with all details on a Windows Domain Controller (Server 2012 R2) from a specified group.
Using "net users" would be perfect, but I have ...
0
votes
2
answers
1k
views
WMIC batch file to loop through CSV and get drive status
I am using this code to check the drive health status of remote PC's in my company
for /f "tokens=1 delims= " %%a in (C:\temp\HOSTNAMES.csv) do (
WMIC /Node:%%a DiskDrive GET Caption, Status
)
...
1
vote
1
answer
498
views
What is the significance of video card DeviceID from WMIC?
I'm using a batch script on Windows 10 to gather client hardware information. Some of my clients are laptops with dual video adapters, an embedded Intel graphics adapter and a discrete Nvidia adapter....