PowerShell script to get Computers Chassis Types
Here is a PowerShell script to get Computers Chassis Types:
$erroractionpreference = "SilentlyContinue"
$a = get-content "C:\temp\PClist.txt"
foreach ($i in $a)
{$b = get-wmiobject win32_SystemEnclosure -computername $i
foreach ($j in $b)
{write-host "$i Chassistype is:" $j.chassistypes}
}