How to do it...

  1. Get the printer objects from WMI:
      $Printers = Get-CimInstance -ClassName 
Win32_Printer
  1. Display the number of printers defined:
      '{0} Printers defined on this system' `
-f $Printers.Count
  1. Get the Sales Group printer:
      $Printer = $Printers | 
Where-Object Name -eq "SGCP1"
  1. Display the printer's details:
      $Printer | Format-Table -AutoSize
  1. Print a test page:
      Invoke-CimMethod -InputObject $Printer `
                       -MethodName PrintTestPage