1. Make sure that the printer name and the share name are identical on the print server.

2. Check the error code for the reason that the set default failed:
 Code:
If SetDefaultPrinter($NewSrv+$Ptr)
   "Could not set printer "+$Ptr+" on server "+$NewSrv+" as default"+@CRLF
   "Reason: ["+@ERROR+"] "+@SERROR+@CRLF
Else
   "Printer "+$Ptr+" on server "+$NewSrv+" set as default"+@CRLF
endif