Some WMI Classes expose Methods that allow you to do something with that object. For example, the Win32_Printer class has 11 methods for interacting with a printer, one of which is the PrintTestPage method. The following code demonstrates how to select a specific printer and print a test page.
'Specify the name of the target computer
strComputer = "."
'Note: Backslash is a special character that must be escaped with a backslash
'This means the UNC \\Network\Path\PrinterName must be written like the following
strQuery = "SELECT * FROM Win32_Printer WHERE DeviceID='\\\\Network\\Path\\PrinterName'"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\ROOT\cimv2")
Set colItems = objWMIService.ExecQuery(strQuery)
'ExecQuery returns a collection object, even when there's only 1 item in the collection
For Each objItem In colItems
'The PrintTestPage method takes no parameters and returns a UINT32
intTestPageReturnCode = objItem.PrintTestPage
Next
'PrintTestPage will return 0 (Successs) or 5 (Failure)
Select Case intTestPageReturnCode
Case 0
WScript.StdOut.WriteLine "Test page successfully printed"
Case 5
WScript.StdOut.WriteLine "Test page printing failed"
Case Else
WScript.StdOut.WriteLine "An unknown error occurred while printing a test page"
End Select