The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
10 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 ...
48
votes
7answers
219k 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.
0
votes
0answers
23 views

Is there something like WMI for Linux?

I like the whole WMI concept, and I need to get Linux information from another OS. Is there something like that for Linux systems?
0
votes
1answer
222 views

How to get WMI (Windows Management Instrumentation) information From Linux (Debian)

Step 1: I installed many packages such as wmi-client_1.3.14-3_amd64, libwmiclient1_1.3.14-3_amd64, ... to make my linux as wmi-client. Step 2: WMI with Linux. root@MRT:/home/mohammad/Desktop# wmic -...
0
votes
0answers
25 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 ...
-1
votes
1answer
50 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| ...
1
vote
1answer
76 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
77 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 ...
0
votes
0answers
46 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 ...
0
votes
0answers
29 views

How to get window title information from cmd in wmic?

I know that you can get window title with: tasklist /v or tasklist /v /fi "WINDOWTITLE eq Untitled - Notepad" Can I get something like that in wmic? I can't find any information about that.
3
votes
2answers
27k 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 ...
1
vote
2answers
699 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 ...
0
votes
1answer
7k views

CMD - Rename Local Computer, Join Domain, Join Specific OU

Alright so not sure if this is entirely possible all in one. Situation: Brand new computer not on the domain, just a local workgroup. Want to change that computers name, join a domain, and put the ...
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 ...
4
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 ...
1
vote
0answers
35 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
23 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
1answer
94 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 ...
0
votes
0answers
219 views

How to get laptop docking station serial number programmatically?

Is there are a way to get laptop docking station serial number programmatically? I assume it should be accessible via WMI, specifically via Win32_SystemEnclosure class but unable to come up with ...
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
2answers
90 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 ...
0
votes
0answers
18 views

Identifying device type remotely [duplicate]

I am writing an IP scanner in C#... I'm not looking for coding help, but rather the how do I determine the device type. Using WMI and remote registry I am able to get all information I want from ...
1
vote
1answer
45 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 ...
0
votes
0answers
75 views

Can the wmic command reliably be used in script batch files?

I believe that the following command: wmic product where "name like '%%winzip%%'" call Uninstall shuts down PC's when deployed with SCCM. Has anybody came across any issues with the command similar ...
0
votes
1answer
109 views

WMIC file copy from server to a client fails

I try to run from a server the following command but it doesn't finally works. What I try to do is to copy a file from the c$ of my server to a specific client. 10.10.10.10 (The server) 10.10.10....
1
vote
2answers
93 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 ...
0
votes
2answers
519 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
0answers
277 views

WMI “No Instances Available”

I am trying to query WMI to get the serial number of a remote PC, but I get an error: C:\WINDOWS\system32>winrs -r:253506a wmic csproduct list No Instance(s) Available. Other WMIC commands work. ...
2
votes
1answer
323 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 ...
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
0answers
903 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), ...
0
votes
2answers
332 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 ...
1
vote
1answer
71 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.
0
votes
1answer
1k views

how to completely disable pagefile use wmic

Hi I am trying to create a batch file to disable the page file on windows 7, is there any wmic command will do this? I know I should be able to use "wmic pagefileset delete" however this always ...
3
votes
1answer
209 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
398 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 ...
1
vote
2answers
357 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
1answer
103 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
46 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
1answer
93 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 ...
0
votes
2answers
199 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
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 ...
1
vote
1answer
481 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 ...
2
votes
1answer
453 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
0answers
38 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
779 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
259 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 ...
2
votes
1answer
944 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 ...
0
votes
2answers
2k views

disable network adapter with wmic - access denied (Windows 7 Prof)

I would like to disable the local network card (only one in the computer) by using this command: wmic path win32_networkadapter where index=7 call disable return value is 5 (access denied). I don't ...
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 ...