709 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
216
views
Not equal operator not working with WMIC command in for loop of batch file
I wrote this batch to get the number of active processes given a certain command line value, but the not equal operator I use in the query to exclude WMIC.exe itself doesn't work, and the batch ...
-1
votes
2
answers
317
views
How to export Windows Service Paths without double quotes with cmd? [closed]
I'm looking for an elegant way to search for windows service Paths not encapsulated in quotes (nessus 63155). The reasoning behind this is to inspect some server for vulnerability to Microsoft Windows ...
1
vote
1
answer
106
views
The CMD command to extract username, group name, and permissions from manually created users and not inbuilt is showing a FindSTR: cannot open error
I have installed Windows 2012 server Core only so I can only use command prompt. I created certain users in groups and given them permissions to write, read, delete etc. Now I wish to use the cmd to ...
0
votes
2
answers
987
views
Powershell to pull wmic diskdrive information
I'm trying to find a powershell command that will list volumes of internal hard disks only. I can run a wmic command for wmic diskdrive which gives me the MediaType, but not the volume. I ran the ...
1
vote
0
answers
36
views
CPU thread count query with wmic for registry key [duplicate]
I'm trying to write a little cmd script to query the cpu with wmic to get the thread count applied to a registry key.
I have this code so far.
for /f "tokens=2 delims=^=" %%t in ('wmic cpu ...
-1
votes
1
answer
131
views
Faster alternative to starting wmic as subprocess to collect data in Python?
I have written a program that pulls various data pieces from whatever machine it is running on, and I'm having some trouble with a particular query I built into it. This one line is [correctly] ...
0
votes
2
answers
156
views
Cannot get NET SHARE to work with spaced variables
I am trying to write a batch file that goes over existing network shares and deletes all the non-administrative ones.
Here's my code:
FOR /F "USEBACKQ SKIP=1 TOKENS=*" %%j IN (`wmic /node:...
0
votes
2
answers
284
views
How to find PID and taskkill it in one single line in command prompt
I want to close a program using command line. to do so I will use this line of code to find the PID of the service,
wmic process get ProcessID,ExecutablePath | findstr /c:"D:\Eightcap - MT5\...
0
votes
3
answers
240
views
How to Create Batch code to set each line of output into separate variables
I use this code to set first output line into variable but can't set second or other line into another variables.
wmic memorychip get capacity
Output:
Capacity
4294967296
4294967296
8589934592
...
1
vote
2
answers
878
views
A batch for finding the IP address of the connected interfaces
Long time reading. First time poster.
I have a Windows machine with many NICs, and rather than the normal ipconfig, I want a simple way of showing the IP address(es) of just the adapter(s) that is(are)...
2
votes
1
answer
430
views
WMIC LastBootUptime format problem, total number of days required
I am trying to calculate the last time the computer was restarted with CMD.
But I don't want it in Year/month/day format.
Send the total number of days, hours and minutes
Here's what I've been able to ...
0
votes
1
answer
2k
views
How to read "Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\Security Options" value?
I want to read security settings value programmatically using command prompt and wmic.exe tool.
Specifically value "Computer Configuration\Policies\Windows Settings\Security Settings\Local ...
1
vote
1
answer
695
views
How do I do get-itemproperty with an added SPECIFIC-WORD filter?
I found that WMIC doesn't get all installed software because it takes information from some specific/default registry as unique, and that registry alone doesn't contain the full list of software shown ...
0
votes
1
answer
454
views
List of WMI Method Attributes
I try to access all attributes of the given method from any classes into the WMI.
For example, I can list the methods inside "Win32_SystemDriver " class
Get-WmiObject -Class ...
0
votes
2
answers
231
views
WMIC Capturing Output
I'm trying to create batch file that will use wmic to find a process and terminate it. The command line looks like this:
"C:\Progress\OE117\bin\_progres" -ininame Pro2.ini -basekey "...