I am trying to pause all queues on a 2003 print server and the following which works on a 2008R2 and 2012R2 server does not work on the 2003 print server. Is there an equivalent WMI call that I can use on the 2003 server?
$strComputer = "test" Get-WmiObject win32printer -ComputerName $strComputer | % {$null = $.pause()}
This is the error I get:
Get-WmiObject : Generic failure At line:1 char:1 + Get-WmiObject win32printer -ComputerName $strComputer | % {$null = $.pause()} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +
CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException + FullyQualifiedErrorId :
GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand