[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 622
  • Last Modified:

VBScript to return system model

Hi,
I need a quick VBScript to take the systeminfo command from command prompt, and return the value of the "System Model: " field.

Thanks,
Jamie
0
jamorlando
Asked:
jamorlando
1 Solution
 
rogerardCommented:
Here you go..  throws in s/n also.  http://www.developerscloset.com/?p=247
0
 
jamorlandoAuthor Commented:
Perfect.  Trimmed down the script to this for my needs.  I'm going to be using this for my BGInfo desktop wallpaper utility.  Thanks!

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colSettings = objWMIService.ExecQuery _
    ("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings
    Wscript.Echo objComputer.Model
Next
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now