Questions tagged [wmic]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
1answer
35 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 ...
0
votes
0answers
15 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
1answer
26 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
1answer
58 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
0answers
39 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
0answers
40 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 ...
0
votes
0answers
80 views

RAM Part number not showing

I want to know the manufacturer of my ram in CMD but when I type the command wmic memorychip list full It shows the all info but the manufacturer = 0000, serial number = 00000000 and the part number ...
2
votes
2answers
238 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
2answers
2k 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
4answers
398 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 ...
0
votes
0answers
96 views

How to Set WMIC in for loop Flashdrive get model, file system and size in gigabyte?

Below mentioned batch file displays Flashdrive model, filesystem and size of PC @echo off setlocal for /f "usebackq skip=1" %%X in (` wmic logicaldisk where "drivetype='2'" 2^&...
0
votes
1answer
491 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
2answers
283 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
1answer
290 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 ...
4
votes
3answers
736 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
1answer
43 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 ...
1
vote
1answer
3k 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
228 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
300 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
38 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
0answers
49 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
117 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
349 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
1answer
133 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
1answer
188 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
40 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
481 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
205 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
114 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 ...
3
votes
1answer
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
1answer
410 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
521 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
30 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
65 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
575 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
736 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
806 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
7k 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
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
1answer
336 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
3k 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
13k 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
72 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
1k 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
451 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 ...
1
vote
1answer
2k 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
11k 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 ...
0
votes
0answers
177 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"