Solved

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

Posted on 2016-09-26
6
110 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 24

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 24

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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

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

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
3 monitor video card in small form factor 9 28
Please help me Blue screen window 10 7 61
Batch Files - Error Handling 4 28
VMWARE heartbeat 2 50
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

831 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