Skip to content

Instantly share code, notes, and snippets.

@Laim

Laim/MT.vbs

Created Apr 22, 2020
Embed
What would you like to do?
machinetype
strName = "." 'Computer name, if local just use a period.
Set objWMI = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strName & "\root\cimv2")
For Each obj in objWMI.ExecQuery ("Select * from Win32_SystemEnclosure")
For Each strChassisType in obj.ChassisTypes
Wscript.Echo strChassisType
Next
Next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment