Solved

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

Posted on 2016-09-26
6
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

730 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