Questions tagged [wmic]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
40 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 ...
0
votes
1answer
81 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
2answers
186 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
2answers
106 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
0answers
35 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 ...
0
votes
0answers
76 views

WMIC in Windows 10 is reporting offline printers as online/ready

I'm using WMIC in a Node.JS app to retrieve a list of local printers. The problem I'm having is that WMIC is reporting all printers as "Online" (PrinterStatus 3) and "Ready" (PrinterState 0), even ...
1
vote
0answers
34 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
0answers
33 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
1answer
105 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
0answers
91 views

Is it possible to get a model number or serial number of a peripheral from cmd?

I want to know if its possible to get the model number or serial number of a device plugged into a com port via cmd Ive tried chgport, mode, wmic path Win32_SerialPort, reg query HKLM\HARDWARE\...
0
votes
1answer
81 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 ...
0
votes
0answers
76 views

How can i use “wmic shadowstorage set”?

I write in cmd: wmic shadowstorage set /? and get to write Maximum Space - uint64 - Read/Write. How do I use it properly? I want to change the maximum shadow copy size on windows 10 using a bat file, ...
1
vote
1answer
58 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
0answers
22 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
1answer
232 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
1answer
78 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
1answer
55 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 ...
2
votes
1answer
843 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
1answer
310 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
0answers
267 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
0answers
29 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
1answer
58 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
0answers
429 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
0answers
469 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
1answer
552 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
2answers
5k 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
2answers
756 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
1answer
162 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....
4
votes
3answers
2k views

How can I programmatically access the region of a Windows computer?

How can I programmatically access the region of a Windows computer? Specifically, I'm looking for this value in the Region & Language settings panel in Windows 10. Or (alternately), the "Home ...
0
votes
1answer
7k views

How to get SID of Windows domain using WMIC?

I’m looking for a WMIC solution to obtain a Windows domain's SID. I can only find solutions for PowerShell, however I prefer the WMIC approach. Lots of examples exist on Google for obtaining domain ...
0
votes
1answer
68 views

How to fix the directory of an extension's associated program

On my Windows-10 PC, there are some files with extension .dmupgrade. Those should be opened with the program C:\Program Files\<Company>\TaskbarUtility.exe. I also have another version of ...
1
vote
1answer
968 views

wmic output empty when run from batchfile, but contains info when run from cmd

I have this wmic command which finds out the PID of my process and works fine from cmd, but refuses to produce output when executed in a bat-file: wmic /output:process.pid process where (Name like '%...
0
votes
0answers
420 views

Get current privacy settings for Windows 10 1803 using WMIC

There is supposedly a WMI provider for the privacy options I tried wmic -namespace:\\root\cimv2\mdm\dmmap path MDM_Policy_Config01_Privacy2 but that doesn't seem to be the right namespace UPDATE: ...
2
votes
1answer
1k views

Batch File: Output of IF and ELSE Statements Are Reversed Within Menu Script

THE PROBLEM: When the If (goto) statement equals "Microsoft Windows 7 Professional", it's going to the else statement, not the if statement. When the first goto statement is chosen, the second goto ...
0
votes
1answer
1k views

wmic + powershell run a command to search and remove files

I want to clean a website before a deploy. In order to do that, I use WMIC to run remotely and Powershell to remove all the files except some specific ones: WMIC /node:server /user:user /password:...
1
vote
1answer
1k views

Batch file WMIC command output as variable issue

I am trying to get an output from a WMIC command to set as variable, For some reason it does not work. Can someone assist. This is what I am trying to do for /f "tokens=*" %q IN (' WMIC /Node^:Comp1 ...
1
vote
2answers
9k views

How to get the serial number of the hard drive on which I am working? [duplicate]

For get the serial number of all hard drives in my computer, I use: wmic diskdrive get serialnumber But, I want to get the serial number of the hard drive where I am working. I explain: I have 2 ...
1
vote
0answers
166 views

Java Process is not killing using wmic [duplicate]

I need to kill java process from a batch file I am using command Wmic Path win32_process Where "CommandLine Like '%MyApp.jar%'" Call Terminate I got the output at cmd "No Instance (s) Available"
0
votes
4answers
17k views

Determine RAM latency in Windows 10

How would I determine the RAM latency in Windows 10 using wmic memoryChip or related commands in command prompt or else a related, built-in tool. I'm not that trusting of third-party software that ...
2
votes
0answers
159 views

mount network share over wmic

hostnames: srv1, srv2, srv3 When opening a powershell on srv2, I can mount a remote network drive on srv3 successfully with this command: PS > hostname srv2 PS > net use Z: \\srv3\c /user:...
0
votes
0answers
1k views

Use WMIC to find process that is using a port

I have been able to view lots of information about a process with WMIC but not what port that is using; like the out put of netstat. Is there any way to do this? I have to use WMIC. Could I have WMIC ...
1
vote
2answers
500 views

Drive mappings not visible in “net use” or “subst”, what kind of drive mappings are they?

A customer is using ExpanDrive for creating network drives. As a result the commands net use and subst don't give any results. However the command wmic logicaldisk reveals the mentioned drive ...
0
votes
0answers
453 views

Wmic command not found while running cmd through runas command

I open a normal cmd and ranned wmic in two different ways Method 1: Open cmd Run the command : runas /noprofile /user:AAA cmd Note : aa as administrator privilege It opened another cmd with ...
2
votes
1answer
10k views

Why is my monitor showing up as “Generic Non-PnP Monitor”?

This is a follow-up question to this one. I'm running Windows 7 on a desktop PC with an 27" AOC monitor. When I run the following wmic command to determine the model of my monitor: wmic ...
1
vote
2answers
901 views

Get drive index using a batch file

I'm currently playing with VirtualBox and one of the things that annoy me with it is that you have to do such a workaround to get it to boot from USB. So I'm thinking of automating this with a batch ...
1
vote
0answers
2k views

WMI query local administrators including group members

I know how to fetch a list of local administrators on a remote machine via WMI: wmic /Node:"ComputerName" path win32_groupuser where (groupcomponent="win32_group.name=\"administrators\",domain=\"...
2
votes
1answer
2k views

WMIC Error: No Instances Available after first execution of my batch script

I run cmd.exe as administrator and run this script, the first time I run it I always get Instances Available, I have to execute it a second time (sometimes 3-4 times) to actually print the SID... why? ...
2
votes
0answers
3k views

How to get CPU, Memory and Network usage of a process(thread) in windows from command prompt(without GUI)?

I need to know how much a process like process.exe uses the CPU/Mem/Net of system from command prompt of windows. I tried several commands like "typeperf" and "wmic" but I can not do the desired. As ...
0
votes
1answer
962 views

Get WMIC Bytes Received/Sent to match count in Windows Network Status Interface

I'm using the following WMIC query in cmd to get the number of bytes sent/received over the network: wmic path Win32_PerfRawDataTcpip_NetworkInterface get BytesReceivedPersec, BytesSentPersec My ...
0
votes
0answers
149 views

How to check if an antivirus is enabled through cmd [duplicate]

Is there a WMIC command that will retrieve antivirus installed and its status on a remote server, or an alternate to WMIC?