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
3
votes
2 answers

Find the extended "ver" information for remote Windows computer

Windows 10.0.16299 has added a new "Update Build Revision" ("UBR") number to the ouput of the 'ver' command: As of 12/17/2017, a fully updated Windows 10 computer reports: C:\> ver Microsoft Windows [Version 10.0.16299.125] After spending many…
mmccarn
  • 69
  • 1
  • 6
3
votes
0 answers

CIMv2 - Win32_Printer shared

I'm using 'cimv2' and when I try to show my shared printers from a specific PC, I cannot. My printers are shared in a Print Server, but it shows just my Local Printers. My connection code is: $WbemLocator = new COM…
netovgs
  • 51
  • 1
  • 7
3
votes
0 answers

How can I obtain the driver key for a driver programmatically?

I am attempting to programmatically determine the driver key. I know how to do it manually, which in my case is Device Manager > Display Adapters > Name of display adapter > Details > Select Driver Key under Property. How can I do this…
user2533589
  • 45
  • 1
  • 5
3
votes
1 answer

wshShell and WMIC working together in batch?

I was trying to create a scrollable list for a batch file using the method found here: Scrollable Lists in .bat Files Credit to https://stackoverflow.com/users/778560/aacini One I tried adding back in my code for my regular batch a few lines at a…
Wajo357
  • 91
  • 1
  • 8
3
votes
2 answers

Get the installed date of a particular application on Windows

I have installed an application on my Windows system. I have a Perl script which will re-install the same software every day. I would like to know if the software is really getting installed or not. One way I thought of doing that is by checking for…
Vishal Khemani
  • 171
  • 2
  • 13
3
votes
3 answers

How to escape both comma and closing parenthesis in WHERE clause of WMIC?

I am trying to retrieve the modification date of a file in a locale-independent manner, using the following wmic command: wmic DataFile WHERE Name="D:\\Data\\sample.txt" GET LastModified This works perfectly as long as the given file path does not…
aschipfl
  • 33,626
  • 12
  • 54
  • 99
3
votes
2 answers

WMIC call in BATCH FOR command Returns unexplained Error

I am trying to create a Volume Shadow copy from a BATCH file but have encountered a issue I am unable to explain. When running the below command: FOR /F "tokens=3" %%A IN ('"WMIC shadowcopy call create ClientAccessible,"C:\""^| FIND /I…
MTHome2010
  • 31
  • 1
3
votes
1 answer

how to get the information of system log of taskscheduler under the command line with WMIC?

I need to know whether the taskscheduler has run successfully. I found difficult to get a return value by the wmic command, because they aren't included in the system, security, application hardwareevents and so on logfile. Following is my…
digger
  • 55
  • 2
  • 5
3
votes
1 answer

Windows Active memory dump

Windows 10 has a new feature - active memory dump. I would like to get / set currently set dump type in windows 10. To get dump type I use the following command in command prompt: wmic RECOVEROS get DebugInfoType which returns integer value…
Zwierzak
  • 666
  • 1
  • 11
  • 31
3
votes
2 answers

WMIC.bat file will not export/output properly

I am attempting to run a batch file in CMD that includes the following, wmic csproduct wmic cpu get name wmic diskdrive get model,size ipconfig /all When I copy and paste this into CMD, I am able to watch the commands run. I am…
3
votes
1 answer

Identify the drive of a program on Windows

I have a Windows program coded in C++. To get the drive's serial number of the computer's drive, I run "wmic path win32_physicalmedia get SerialNumber" in the program with _popen(). However, the computers that run the program may have many drives,…
NaBUru38
  • 99
  • 1
  • 7
3
votes
1 answer

Get product name from WMIC for a variable in batch

I've been struggling to get a specific output using WMIC in batch in order to build an automatic uninstall script. The issue I'm running across is that the uninstaller for the application I'm trying to remove is created under an auto-generated SSID…
pyr0ball
  • 33
  • 1
  • 1
  • 5
3
votes
2 answers

Batch if statement issue

I am trying to figure out why my batch script doesn't work properly. It is calling wmic to see what server model it is and then deploy a set of drivers to that specific model number. The 'wmic csproduct get name' outputs: C:\>wmic csproduct get…
kahoots
  • 191
  • 2
  • 10
3
votes
3 answers

Get rid of spaces and tabs in wmic output

Using batch, trying to get output of the following command: wmic logicaldisk get caption,description,volumename Thus, I'm simply doing the following: wmic logicaldisk get caption,description,volumename >>"C:\out.log" Unfortunately, this is the…
zach
  • 71
  • 1
  • 7
3
votes
1 answer

Pass netconnectionid to a netsh interface command in batch

I'm trying to write a batch script that will fetch the netconnectionid from wmin nic and then pass each of the returned values into a netsh command that will tell the interface to get it's IP from DHCP. Here's what I have so far…
Zachariah
  • 31
  • 4