Hey,

I neeed help with the syntax for filtering out the machines before adding the printers.

We are deploying printers to users via Windows AD (GPO). I want to filter out 3 terminal servers that should not apply to the script (the rest of the machines are fine). I don' have the luxury to move my computer/user around in the OU (also we are deploying via User Object in that GPO).

For example,
 Code:
If manchine name <> terminal1, terminal2, terminal3, then do the following

  If @UserID = bob
     AddPrinterConnection("\\lnx1\Brother_8860")
     delPrinterConnection("\\lnx1\hp4000")
     SetDefaultPrinter("\\lnx1\Brother_8860")
  EndIf

  If @UserID = jdole
     delPrinterConnection("\\ps1\Brother_8860")
     AddPrinterConnection("\\lnx1\hp4000") 
     AddPrinterConnection("\\lnx1\Brother_8860")
     SetDefaultPrinter("\\lnx1\hp4000")
  EndIf

End if

TIA,
-tt


Edited by NTDOC (2008-05-02 09:42 PM)
Edit Reason: Added code tags and formatting