Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [wmic]

The tag has no usage guidance.

0
votes
0answers
27 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
62 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
60 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
380 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
68 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
56 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
249 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
441 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
50 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
273 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
236 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
333 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
464 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:...
0
votes
0answers
21 views

How Windows organize the name of the physical disks?

When I execute the following script: wmic diskdrive get deviceid, model it returns \\.\PHYSICALDRIVE0 ST3802110AS ATA Device \\.\PHYSICALDRIVE1 ST1000DM003-9YN162 ATA Device \\.\PHYSICALDRIVE2 ...
1
vote
1answer
477 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 ...
0
votes
2answers
3k 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
102 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
4k 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
78 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
823 views

Disabling Windows Management Instrumentation Command-line (WMIC)

What are the steps to disabling WMIC on a windows 2003 server? I have tried looking into the services and only see Windows Management Instrumentation (WMI) listed. Also if disabled, what are ...
0
votes
0answers
699 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 ...
0
votes
0answers
1k views

How to change disk drive manufacture's serial number?

I'm able to get disk drive manufacture's serial number by entering the following command in cmd of windows: wmic diskdrive get serialnumber Now my question is: How can i change or modify this serial ...
1
vote
2answers
284 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
226 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 ...
1
vote
1answer
3k 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
391 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
1k 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
789 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? ...
1
vote
0answers
1k 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
461 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
38 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?
1
vote
2answers
854 views

How to Create individual text files from a wmic output

I want to create individual text files from each entry in a wmic output. So far I have WMIC.exe /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:csv>...
2
votes
2answers
93 views

What does the following notation mean: \\?\c:\ mean?

I recall hearing someone mention something about de-referencing a path but de-referencing wasn't explained and I don't know what it is.
0
votes
0answers
501 views

Get pdf file metadata from command line

To get the Creation Date value from a file I would use wmic from the command line wmic datafile where name="C:\\something.pdf" get CreationDate However, I would like to get the Creation (date) value ...
1
vote
1answer
1k views

Using wmic to get workgroup in a batch file

I'm not really versed in batch file, but I am trying to get the workgroup using wmic. I've been trying different things with the for options. So far this is the best result I have gotten. for /f "...
1
vote
1answer
800 views

How to query the account which has created a Windows service

Good morning, I'm writing installation procedure for a product, which embeds a Windows service. In order to install that service, a wrapper is used, referring to a configuration (java -jar wrapper.jar ...
5
votes
3answers
8k views

WMIC output property value without property name

I'm entering something like that Desktop>wmic environment where(name="PATH" and systemVariable=FALSE) get variableValue VariableValue xxx But I don't want VariableValue to get into output. I want ...
3
votes
1answer
142 views

How to enable or disable services silently?

How to run this command in silent mode? wmic service where name='HomeGroupListener' call ChangeStartmode Disabled
2
votes
1answer
10k views

'wmic' is not recognized as an internal or external command, operable program or batch file

I need to run this script I made. This batch should copy compiled program on STM32 Nucleo. It uses wmic to find Nucleo's virtual drive's letter by it's label: @echo off for /f %%D in ('wmic volume ...
1
vote
1answer
62 views

How to filter shares in wmic

I founded that by command: wmic share where type=0 get name,path I can list shares that I'm interested in. I cannot change their share settings or security permission but I want to back up them. ...
0
votes
1answer
630 views

WMIC Query returning unexpected answer?

Apologies if this seems like a noob question...but I can't figure this out for the life of me. I'm using WQL to query WMI for the Dell BIOS version in a task sequence in SCCM. That WQL Query is below: ...
1
vote
2answers
3k views

On windows: how to get last modified date (UTC time) of a file with wmic

I wrote the following batch in order to get the last modified date. The problem is that it gives it in clock time and not in UTC time. I know I have the lag in minutes but it is not that simple to do ...
0
votes
0answers
114 views

Windows: how to check for every folder with modify (M) right for authenticated users?

I want to see which directories on my Windows 7 machine can be modified by Authenticated user (you see it when you run icacls c:\path\to\directory), I wanted to make a batch script but I'm sure there ...
2
votes
0answers
280 views

In windows 7, how to check from command-line if the wifi hardware switch is on or off?

In windows 7, how to check from command-line if the wifi hardware switch is on or off ? I will show you what happens when you toggle the hardware switch so that you may understand what exactly I am ...
3
votes
2answers
7k views

How to check, from cmd, if a profile status is local or temp or roaming or backup?

How to check, from cmd, if a profile status is local or temp or roaming or backup ? I there a way we can check the TYPE and STATUS of the profiles in the computer from the command line. Normally we ...
3
votes
1answer
496 views

batch file to get partial lastmodified string to variable

WMIC path Win32_Directory WHERE name="W:\\foldername" get lastmodified returns something like this LastModified 20140612095434.758265-240 I would like to put this in a batch file to assign the ...
1
vote
1answer
100 views

Why does hostname appear in wmic output of netuse?

When I use wmic as shown below, my hostname appears as the first field in the output. I did not do anything to ask for the hostname. Should I just expect that this behaviour will be consistent across ...
0
votes
0answers
123 views

Why OneDrive displays itself incorrectly in wmic?

Try following line in command prompt with OneDrive working: wmic process get Caption, ExecutablePath, ParentProcessId, ProcessId You will see that there is one space difference after ExecutablePath ...
2
votes
1answer
5k views

Using wmic to Find if Product Exists

I'm looking to write a batch file that checks to see if a program exists, and if it does exist I'd like to have it uninstalled. This is what I've got so far. @echo off (wmic product get name| ...
0
votes
0answers
1k views

Use WMIC to find open files of a process

Is there a way do get a list of open files for a process using WMIC? Yes, there are sysinternals like HANDLE.EXE that can do this, but you have to get a copy, but more importantly if you are ...