The tag has no usage guidance.

learn more… | top users | synonyms

48
votes
6answers
208k views

How can I find out when Windows was last restarted?

How can I know when my computer running Windows 7 was last restarted? I prefer a solution that doesn't involve searching the event log, but something like wmic or maybe cmd commands.
6
votes
2answers
623 views

What are the differences between “Windows wmic” and “Windows registry”?

Is all the information that is available via Windows Management Instrumentation Command-line(wmic) also available via Windows registry(regedit)? What are the main differences between them?
4
votes
0answers
19 views

Check if important Windows Update is available [duplicate]

When depolying any application, it could be needed, that user has computer updated to latest OS version of Windows. Windows XP/Win7/Win8. in this example, one important update is available on a ...
4
votes
0answers
597 views

wmic - localized values

When using the wmic command, it is possible to specify a locale using /locale:ms_409 which means US English. I am using a German version of Windows XP, which displays some localized values when using ...
3
votes
2answers
26k views

Run WMIC command across network

Instead of typing this in a command prompt one at a time: wmic /node:ipaddress /user:administrator /password:mypassword bios get serialnumber How can I run that against one entire subnet and output ...
3
votes
1answer
74k views

How to get BIOS serialnumber with WMIC command

Whenever I use the command line below wmic bios get serialnumber It outputs the BIOS Serial number with my laptop. However, I've tried that command line to get BIOS serial number with my ...
3
votes
1answer
579 views

Windows Process/Tasks over wmic?

There is a way to get the list of all running process/taks on Windows using the wmic interface? Is there is another way other than the windows task manager?
3
votes
1answer
2k views

“No Instance(s) Available” error with the wmic command

I'm getting a "No Instance(s) Available" error with the wmic command. The command I'm running (from an elevated/administrator cmd.exe window) is: G:\>wmic datafile where name="file.txt" get ...
3
votes
1answer
203 views

Get wall-clock time of a windows process with command line

Is it possible to get an uptime from a windows process which is not based on the clock settings of the system? A linux-based solution is something like: ps -eo comm,etime With some researches, I ...
2
votes
1answer
2k views

WMIC is NOT on Windows XP?

I recently installed Windows XP on a computer because I wanted to confirm some stuff with WMIC. What I wanted to confirm is not relevant to my problem. WMIC is NOT THERE. On Windows 7 I can type "WMIC"...
2
votes
1answer
353 views

Is there an efficient way to query if product is installed on Windows and retrieve IdentifyingNumber

I'm trying to automate a test process to first uninstall a product if present. To find the product I've so far found that the information is available through wmi and wmic product get ...
2
votes
2answers
2k views

How do I get a fully qualified file list from a shared folder?

I'm attempting to get a list of files on a shared folder (with their complete path names)- for example, instead of File1.txt File2.txt on \\sharename\foldername, I'm trying to get: D:\something\...
2
votes
1answer
1k views

What do the different ping statuses returned by VBS scripts mean?

I have a VBS Script that executes this code strQuery = "SELECT * FROM Win32_PingStatus WHERE Address = '" & Cell & "'" Cell - is the Excel cell with the hostname Some of my results are ...
2
votes
1answer
893 views

WMIC - how to check if return empty value?

I'm making a batch file to make log of computer (I need save some informations before format PC's on my work...) So I found some commands to create this log, see: rem -- Windows Version wmic OS get ...
2
votes
2answers
83 views

Understanding the wmic cpu/os output

I have 2 questions - I have several computers on my network. When I use "wmic cpu" some of them return single line data output and others two identical lines. Does it (necessarly) mean those ...
2
votes
1answer
301 views

Issues automating printer driver update (printer settings) and printer preferences in Win7, using a PS,cmd,vbs,etc script?

WMI can do it, but I have an issue, PCs are on, but logged off. If I try to run: wmic /node:%strIP% printer where DeviceID="lp1" set DriverName="Lexmark Universal v2" It fails with a message about ...
2
votes
1answer
435 views

Batch - Renaming network interfaces based on index with WMIC and netsh

I have two Intel NIC's that I need to rename based on their index numbers, WMIC is nice in that it seems to always return index numbers in numerical order so we can take the output directly without ...
1
vote
1answer
9k views

WMIC Path <what>? WMIC Class <what>?

There are all sorts of commands that WMIC accepts, such as WMIC Path Win32_Battery WMIC Path Win32_Processor WMIC Class Win32_Battery WMIC Class ComputerSystem et cetera. Is there any way to list ...
1
vote
2answers
240 views

Is it possible to get ONLY the Drive Label using WMIC?

Using WMIC, I want to get only the drive label based on the drive letter: for /f "skip=1" %a in ('wmic volume where "Driveletter like '%C%'" get label') do echo %a Now, those of you who understand ...
1
vote
2answers
851 views

What is the unit of size we get from using wmic command on windows

I use a couple of wmic commands and I was wondering how can a user come to know the the unit of any size related command output? For Instance I use the below 2 commands wmic /node:Abhishek-PC cpu ...
1
vote
1answer
42 views

Disable/enable lan-device by batchfile: If comparisons not working

I have created this .bat-file which is invoked by clicking on the proper shortcut, which is configured properly. But the last two comparisons seem not to evaluate properly. Here we go. @ECHO off ...
1
vote
1answer
69 views

How can I collect `pslist` elapsed time information by using wmic?

The MS technet utility pslist can produce result like this: How can I use wmic to obtain the 'Elapsed Time' result? If it is not possible, I am happy to try Powershell.
1
vote
1answer
89 views

How to find out the architecture of OS installed and get only the value 32 or 64 in Windows?

How to find out the architecture of OS installed and get only the value 32 or 64 in Windows? With wmic os get osarchitecture I get : OSArchitecture 64-bit I only want 32 or 64 without ...
1
vote
1answer
466 views

WMIC |more has extra rows when .csv opened in Excel

I am trying to output the name and version of each program installed on my system to a .csv file. I could do something more complicated with VBScript, but would prefer to keep this very simple to ...
1
vote
1answer
690 views

How to find out how long a process has been running for?

Is it possible to use wmic or powershell to find out how long a process has been running for? If not, is there any other mean to obtain this information from Windows OS?
1
vote
2answers
107 views

Batch File - Know if disk is partitioned or not

I am working on Winpe environment, how to get informations if the disk 0 is partitioned or not to launch specific commands on each case i have tried this, but how to get this works properly in a batch ...
1
vote
1answer
5k views

Find partition letters on physical drives using wmic

I am looking for a way to list drives and the partitions on them. Specifically I am looking to prompt a user for a drive to format and I want to show them the exists partitions so they can confirm ...
1
vote
1answer
52 views

WMIC in for-loop

I'm trying to get WMIC output into a variable so I can process it further. I have made a test batch file to illustrate the problem: wmic PROCESS where "commandline like '%%teststr%%'" get ...
1
vote
1answer
59 views

get process name from it's own description?

How can I get the process name from computer memory by using loop depending on the process description ? Example: My program name is "dev.exe" in memory and its description is "a tool for helping ...
1
vote
1answer
64 views

WMI Call to retrieve Physical Serial Number on HDD's

I'm trying to write a script that incorporates a retrieved Drive Serial Number for a report. So far I've just been trying to get a WMI call or really anything to even retrieve it in the first place ...
1
vote
1answer
98 views

WMIC Process information doesn't get the status

Executing wmic PROCESS get name,status in an elevated command prompt in Windows 7 will get all running processes, but the status is empty (see screen shot). How can I get the status of currently ...
1
vote
0answers
29 views

how to detect/identify m2 ssd

As you know you can get a list of drives connected via sata using wmic: wmic diskdrive list This however doesn't seem to work with m2 ssds. Is there any equivalent for M2s that is not vendor ...
1
vote
0answers
17 views

WMIC Fails When Connecting to Computer with Multiple IP Addresses

I am trying to run a restart script against a list of computers, where it uses WMIC to see if users are logged in: WMIC /NODE: "workstation_name" COMPUTERSYSTEM GET USERNAME and then use psshutdown if ...
1
vote
2answers
88 views

Send a file to all network users automatically via WMIC command

I have a script with which I can scan the network for live ips and the result is being sent to a file called "ip_list.txt". After that, I would like to send a file "file.txt" on every ip address from ...
1
vote
1answer
1k views

How to set network connection priority order under windows with wmic or VB-script?

Under Windows via "Network Adapters>Advanced Settings...>Adapters and Bindings>Connections" I can define the network connection priority order (I dont mean the provider order!). But how can I do this ...
1
vote
2answers
595 views

Wmic output into variable

Am trying to write the output of this command into a variable, but can't quite get the syntax to work... My WMIC query is: wmic PATH SoftwareLicensingProduct WHERE "ProductKeyID like '%-%' AND ...
1
vote
0answers
803 views

Command “wmic memphysical get maxcapacity” gives wrong number

I have been using my laptop with 16G (8gx2) memory for a long time, I can use all of 16G memory without any problem, but ran wmic memphysical get maxcapacity today shows however 8388608 (8G), ...
1
vote
2answers
316 views

Checking UAC Elevation of Running Process from Command Prompt

How can I use the command prompt (cmd.exe) to check if a process is running with UAC elevation / elevated privileges? If I were to use the Task Manager (taskmgr.exe), I could check by adding the "UAC ...
1
vote
0answers
45 views

Get memory location and space associated to process using processId

I want to get the memory information(address and size) of a process in Ram using process id. I tried WMIC and task manager they provide only the memory used by the process at current time. Could ...
1
vote
0answers
37 views

Fetch shared storage usage info from windows server

I am trying to retrieve usage related info of shared storage attached to a server by using: WMIC logicaldisk get size,freespace,caption,drivetype /Format:csv The output is fine. But here the Drive ...
1
vote
1answer
492 views

WMIC Node Information [duplicate]

Is there a way that you can get WMIC to prompt you for a node name each time? I will be running a similar command for different machines on different occasions. I.e. to get a remote computer model. ...
1
vote
1answer
367 views

Set an IPMI IP in Windows 2012 Server

I have got an IPMI adapter card on a Windows 2012 server machine (Supermicro). What I want to do is to set an IP (Management network) to be able to access the server via IPMI. On a GRML live it is: ...
1
vote
1answer
575 views

How can I permanently add a new path to the 'PATH' environment variable of the current user on Win 7? [duplicate]

I'm working on Windows 7. How can I permanently add a new path to the 'PATH' environment variable of the current user? I tried to do so with wmic: wmic ENVIRONMENT where "name='Path' and username='&...
0
votes
2answers
3k views

Combine Batch/WMIC + ANSI/UNICODE Output formatting

In creating an auditing tool for my network, I'm finding that WMIC is outputting with spaces in between each character when accompanied by echoing regular text. For example, This: @echo off echo Foo ...
0
votes
2answers
193 views

My L3 cache size showing zero in wmic (cmd)

I purchased a desktop system which has 6 MB Cache. When I checked the L3 cache in the BIOS I didn't find a L3 cache. I the tried to use another method in from the command line to confirm the L3 cache ...
0
votes
2answers
2k views

Installing JDK on Windows 10 - MsiEnumProducts error 1610 due to broken WBEM library/WMI library

I failing on installing JDK 8 on an x64 Windows 10 installation or updating from any older version to the up-to-date version. After the usual Java Update failed with no error message whatsoever, I ...
0
votes
2answers
283 views

Remove all volumes from all connected disks - Diskpart

How can I remove all volumes from the hard drives in a WinPE environment using Diskpart through Powershell or WMIC calls? The WinPE image will be injected with the required packages using DISM ...
0
votes
1answer
1k views

My system is missing a “System Serial Number”

No, it is not about the Windows serial key and/or activation. After reading this question ( http://stackoverflow.com/q/21548747/1190388 ) about dmidecode and system serial numbers, I came across ...
0
votes
2answers
499 views

wmic OS list Full seems broken

I try that command on my Windows 7 x64 with updates. wmic os list FULL It fails with error. Node - [pc name] ERROR: Description = Invalid query
0
votes
1answer
1k views

Getting HDD serial number

I'm trying to get the serial number of the hard disks in my PC, i.e. the number printed on a label on the hard disk itself. I found that I can do that using wmic diskdrive get serialnumber, but I see ...