It's just a test. And I don't need to authenticate on any of the other servers/machines. I am logged in as domain admin on the server I'm trying to run it from (actualy I've logged in as domain admin from ALL the servers/machines I've tried running it from).

code:
$workstation = "10.47.2.1"
$x = 0
$name = "Something"
while len($name) > 0
$name = WMIQuery("Name","Win32_PerfRawData_Spooler_PrintQueue",$workstation)[$x]
? $name
if $name = "_Total"
$jobs = WMIQuery("TotalJobsPrinted","Win32_PerfRawData_Spooler_PrintQueue",$workstation)[$x]
goto ok
endif
$x = $x + 1
loop

:ok
? $jobs

exit



;SYNTAX WMIQuery($what,$from,optional $computer,optional $where, optional $x)
; http://download.microsoft.com/download/platformsdk/wmicore/1.5/W9XNT4/EN-US/wmicore.EXE

FUNCTION WMIQuery($sWhat, $sFrom, Optional $sComputer, Optional $sWhere, Optional $x)
Dim $sQuery, $objEnum, $sValue, $sItem, $lUbound
Dim $aTMP[0]
$sQuery = "Select " + $sWhat + " From "+ $sFrom
If Not $sComputer
$sComputer=@WKSTA
EndIf
If $sWhere AND $x
$sQuery = $sQuery + " Where " + $sWhere + " = '"+$x+"'"
EndIf
$SystemSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//"+$sComputer)
If @ERROR
Exit VAL("&"+Right(DecToHex(@ERROR),4))
Return
EndIf
$objEnum = $SystemSet.ExecQuery($sQuery)
If @ERROR
Exit VAL("&"+Right(DecToHex(@ERROR),4))
Return
EndIf
For Each $objInstance in $objEnum
If $objInstance
$=Execute("$$sValue = $$objInstance.$sWhat")
Select
Case VarType($sValue) & 8192
For Each $sItem in $sValue
$lUbound = Ubound($aTMP)
If $aTMP[$lUbound] >' '
$lUbound = $lUbound +1
Redim Preserve $aTMP[$lUbound]
EndIf
$aTMP[$lUbound] = Trim($sItem)
Next
Case 1
$lUbound = Ubound($aTMP)
If $aTMP[$lUbound] >' '
$lUbound = $lUbound +1
Redim Preserve $aTMP[$lUbound]
EndIf
$aTMP[$lUbound] = Trim($sValue)
EndSelect
EndIf
Next
$WMIQuery = $aTMP
Exit VAL("&"+Right(DecToHex(@ERROR),4))
ENDFUNCTION