Solved

Batch script / command to check if remote computer is a laptop or desktop

Posted on 2016-09-26
6
79 Views
Last Modified: 2016-11-22
From our mgmt. console, I need to issue a command to check if the remote managed
stations are desktop/laptop before we decide to install an agent & the closest I cud get:

wmic computersystem get model,systemtype

Using PowerShell or VB scripts are probably not supported by this Management console
(I think so).

We have IBM & Dell Desktops & laptops only

For Dell, I can issue :
wmic computersystem get model,systemtype | find "Latitude"
if errorlevel 0  then install agent

wmic computersystem get model,systemtype | find "?? for IBM"
0
Comment
Question by:sunhux
  • 3
  • 3
6 Comments
 
LVL 23

Expert Comment

by:NVIT
ID: 41817099
Does this return IBM for you?
wmic computersystem get manufacturer

Open in new window

0
 

Author Comment

by:sunhux
ID: 41817103
It returns LENOVO
0
 
LVL 23

Assisted Solution

by:NVIT
NVIT earned 500 total points
ID: 41817109
If I recall correctly, Lenovo bought IBM's PC business some years ago. So, you can assume the Lenovo stations are the IBMs.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:sunhux
ID: 41817115
So all that returns as Lenovo are laptops?  Any chance that a Lenovo is a Desktop?
0
 
LVL 23

Accepted Solution

by:
NVIT earned 500 total points
ID: 41817117
There are Lenovo desktops. Use the Model field to determine:
wmic computersystem get manufacturer,model

Open in new window

0
 

Author Comment

by:sunhux
ID: 41817570
Something closer:
wmic computersystem get model,systemtype |find "Latitude" & wmic csproduct get vendor, version |find/i "Thinkpad"
If %Errorlevel% equ 0 (echo is Laptop so do the upgrade/installation) else (echo this is Desktop so skip)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
The viewer will learn how to dynamically set the form action using jQuery.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now