Wow what a helpful bunch of Moderators you guys are.... That fixed the error in the script but then when i tested the changes were not made by the script. Printers still showing mapped to old server.....

Anymore helpful ideas.....