cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

System information from command line

davehaigh
12-Amethyst

System information from command line

Here are some additional commands to gather system information.
I have some of this in a script, I need to get it all in there so I can capture a line of data on each machine.

=========
Get the CPU
=========
C:\Users\haigh1>wmic cpu get name
Name
Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz

FOR /F "tokens=2 delims==" %%A IN ('WMIC cpu GET Name /VALUE ^| FIND /I "Name=") DO SET machinecpu=%%A

This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

A few more:

C:\Users\haigh1>wmic desktopmonitor get screenheight, screenwidth
ScreenHeight ScreenWidth
1200 1600
1200 1600



C:\Users\haigh1>wmic diskdrive get Name, Manufacturer, Model
Manufacturer Model Name
(Standard disk drives) ST9250412AS \\.\PHYSICALDRIVE1
(Standard disk drives) ST9500422AS \\.\PHYSICALDRIVE0


C:\Users\haigh1>wmic OS get Version,FreePhysicalMemory, FreeVirtualMemory, LastBootUpTime, NumberofProcesses, status
FreePhysicalMemory FreeVirtualMemory LastBootUpTime NumberOfProcesses Status Version
4044576 12189100 20140722084012.610798-420 123 OK 6.1.7601


C:\Users\haigh1>wmic bios get name, version
Name Version
Default System BIOS DELL - 6222004

David Haigh

If you assume that your graphics card should be an Nvidia or AMD of some type, this works:

C:\Users\haigh1>wmic PATH Win32_videocontroller GET description | findstr "NVIDIA AMD"
NVIDIA Quadro 3000M

Without the the path to findstr, it outputs three lines on my laptop. (Not what I wanted)
C:\Users\haigh1>wmic PATH Win32_videocontroller GET description
Description
NVIDIA Quadro 3000M
LANDesk Remote Control Mirror Driver
Intel(R) HD Graphics Family


NVIDIA Quadro 3000M
David Haigh

This syntax works to set the value:

C:\Users\haigh1>for /F "tokens=*" %n in ('wmic PATH Win32_videocontroller GET description ^| findstr "NVIDIA AMD") do set GPU_NAME=%n

:\Users\haigh1>set GPU_NAME=NVIDIA Quadro 3000M

C:\Users\haigh1>echo %GPU_NAME%
NVIDIA Quadro 3000M

Obviously you have to add double %% to get this to work in a script.

David Haigh
Announcements


Top Tags