Consider the following WSH snippet:
var query = GetObject(\"winmgmts:\").ExecQuery(\"SELECT Name FROM Win32_Printer\", \"WQL\", 0); var e = new Enumerator(query); for
I think the problem is in your query you're only asking for the Name. Try asking for both Name and status:
var query = GetObject("winmgmts:").ExecQuery("SELECT Name, Status FROM Win32_Printer", "WQL", 0);
var e = new Enumerator(query);
for ( ; !e.atEnd(); e.moveNext ()) {
var p = e.item();
WScript.Echo(p.Name + " (" + p.Status + ")" );
}
I got some more properties from http://msdn.microsoft.com/en-us/library/aa394363(VS.85).aspx and several work. I queried for DriverName and Comment and both had text or at least a null.
var query = GetObject("winmgmts:").ExecQuery("SELECT Name, Status, DriverName, Comment FROM Win32_Printer", "WQL", 0);
var e = new Enumerator(query);
for ( ; !e.atEnd(); e.moveNext ()) {
var p = e.item();
WScript.Echo(p.Name + " (" + p.Status + ") " + p.DriverName + " " + p.Comment);
}