Created
April 22, 2020 12:39
-
-
Save Laim/2ce36493c8cb1e5acb374dd6800eecd0 to your computer and use it in GitHub Desktop.
machinetype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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