Just ran across the need to determine what kind of machine I am running a script on. I needed to detect whether or not the machine was a laptop or desktop. Just so happens that WMI provides a nifty class for this.
As you check out the function below, notice some of the really odd chassis types available. How many of you have a "pizza box" or "lunchbox" chassis?
Enjoy the code and as always, let me know if this script helps you out!