Add a dummy variable in front of all the functions to catch the return code and prevent 1's and 0's from popping up on a console.

Change these...
 Code:
ADDPRINTERCONNECTION ("\\TWCPRT01\AfM")
To this...
 Code:
$nul = ADDPRINTERCONNECTION ("\\TWCPRT01\AfM")


Same goes for SetDefaultPrinter, and MessageBox


Edited by ShaneEP (2012-10-19 04:36 PM)