Questions tagged [wmic]

WMIC stands for Windows Management Instrumentation Command-line

WMIC stands for Windows Management Instrumentation Command-line. It uses the power of Windows Management Instrumentation (WMI) to enable systems management from the command line. WMIC extends WMI for operation from several command-line interfaces and through batch scripts. WMIC gives you a powerful, user-friendly interface to the WMI namespace.

More information

734 questions
0
votes
2 answers

Using remote WMI to monitor win32_battery

My ultimate goal here is to remotely monitor the EstimatedChargeRemaining on a tablet PC. I have it mostly working, and it seems I can query almost anything BUT the battery! On the tablet I can invoke "wmic path win32_battery get…
John Seal
  • 1
  • 1
  • 2
0
votes
3 answers

How to Change Scheduler Task User Password

When I Create Scheduler Task with the Username and Password in Windows 7 using Task Scheduler GUI and trying to Change the Password of User using Following Command line, it give me error in CMD SCHTASKS /Change /RP test /TN "rtest1" Error: The…
John
  • 703
  • 7
  • 18
  • 37
0
votes
1 answer

wmic variables from txt file

I'm trying to get the output of the WMIC command to assign variables to each line. I'm trying to get the out put to look like this: 1 first program installed 2 second program installed 3 third program installed 4 fourth program installed 5…
George Gill
  • 43
  • 1
  • 6
0
votes
1 answer

WMIC - bat file menu program

I'm trying to write a batch file that will uninstall programs by selecting a number. I don't know how to count how many programs in the operating system and then to assign numbers to all of them in a MENU format. I don't want to have to type in all…
George Gill
  • 43
  • 1
  • 6
0
votes
1 answer

Can we write a SINGLE query for retrieving PROPERTIES from TWO CLASSES in WMIC?

I want to retrieve the data from multiple classes in single query in WMIC. I know that it wont be possible in WMI. But somewhere i feel it can be possible in wmic. also i am able to retrieve and push multiple classes data in single html file by…
0
votes
1 answer

Failure while accessing Bcd using wmic

I am getting an error when I try to access the EnumerateObjects method of the BcdStore class using wmic. I initially ran the GetSystemDisk method to see that I can access the BcdStore (see below). This worked fine. ______________ cmd window output…
-1
votes
1 answer

WMIC product get name in a FOR loop: NOT was unexpected at this time

"wmic product call uninstall" EXCEPT for specified criteria? Above is my original question. I think, at this point, I need to use a FOR loop. Here's what I've managed to come up with: FOR /F "delims=" %%G NOT IN "product-list.txt" DO wmic product…
R3TURN-0
  • 83
  • 1
  • 9
-1
votes
1 answer

Running wmic inside a wmic-run process

I have come across a certain problem, hopefully some of you can help me with it. Basically say I have computer 1, which executes via wmic a certain batch file (process) in computer 2, let's call it Script.bat. Depending on how the process ends, I…
-1
votes
1 answer

wmic works well in cmd but not work in batch file

i try write something to get the hdd index in a batch script, the command below in comand prompt works well wmic diskdrive where "model like '%st%' and size > 300000000000" get index,model it returns Index Model 1 ST1000DM010-2EP102 but when…
Jacky
  • 3
  • 3
-1
votes
1 answer

How can I capture the DNS servers for a client computer with .cmd or powershell?

I need to capture the DNS servers used by a Windows 10 client into a text file in the simplest way possible. Possibilities that came to mind include querying wmi via a batch command or command line, or using Powershell. Powershell with the following…
scaiferw
  • 41
  • 7
-1
votes
2 answers

how can I convert wmic memorychip get SMBIOSMemoryType numerical value to name (DDR) and output to a txt file

I am currently in the process of writing a script to output information gathered from wmic etc to txt file or html file. I know you can get the memory type ie DDR3, DDR4 etc with the command `wmic memorychip get SMBIOSMemoryType which shows the type…
markus625
  • 23
  • 7
-1
votes
1 answer

Executing commands from windows batch file using Python, without creating batch file

I need to execute below command (and couple of other similar) to collect Windows OS event logs: ' wmic nteventlog where filename="appevent" call BackupEventLog C:\appevent.evt ' The command executes successfully through cmd prompt. and collects…
Rakesh
  • 271
  • 1
  • 2
  • 11
-1
votes
1 answer

How to retrieve hardware info in c#?

I want to export the result of command 'wmic bios get' to a xml file. How can I read these data and add each data as a xml node?
cj__
  • 53
  • 7
-1
votes
1 answer

Serial Number of Bootable device

I have to get the serialnumber of the disk on which my operating system is installed. I know in order to get serial number i need to run: >wmic diskdrive get serialnumber,capabilities Capabilities SerialNumber {3, 4} AI92NXXXXXXXX2G02 {3, 4,…
Dinesh Gowda
  • 1,044
  • 3
  • 13
  • 29
-1
votes
2 answers

Associate CDRom device with drive letter

I am writing a program that makes disk images of a CD-ROM drive. I need to create a full disk image, not just a volume image, but I need a volume name so I can name the resulting file accordingly. Basically I need this: I know that my CD-ROM drive…