I found the error:

FAILED to set default printer to Tribeca PCL (error code: 2, The system cannot find the file specified.)

I am using the \\server\PRINTERNAME and it works most of the time so I am not sure why this command is not working. Especially beacsue it is setting the default printer to a locally attached printer in this case so there aren't any network issues.