Please post the script that you are using. From what you have shared, it doesn't look like it will work as you need to cycle through the printers available. A direct call will fail. Try the following code from this blog https://devblogs.microsoft.com/scripting/how-can-i-print-a-test-page-to-a-printer/
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)
Set colPrinters = objWMIService.ExecQuery _
(“Select * from Win32_Printer Where DeviceID = ‘\\\\atl-ps-01\\color-printer'”)
For Each objPrinter in colPrinters
errReturn = objPrinter.PrintTestPage
If errReturn = 0 Then
Wscript.Echo “The test page was printed successfully.”
Else
Wscript.Echo “The test page could not be printed.”
End If
Next