Try this...

 Code:
if primapstate("\\server\HP LaserJet P4014 PCL6")
	$RC=delprinterconnection("\\server\HP LaserJet P4014/P4015 PCL6")
Endif