Set Default printer according to computers OU
I am so lost with this, never done vbs scripts before but i'm looking to create a script that looks at the computers OU (in this case "upper" or "lower") and then sets the defaulkt printer.
I have a batch file that actually adds the printer connections all i was hoping to do was add in a .vbs to the end of the batch script that ran after the printers had been added to then set the default printer based on location HELP!!!
This is what i have so far and isn't working but hopefully you guys should be able to tell me if i'm a n idiot and completely missing something
edit: the batch file that sets printers also sets mapped network drives etc. and is a USER logon script and i want ot set default printer by COMPUER
Set objADInfo = CreateObject("ADSystemInfo")
strUserOU = objADInfo.UserName
strComputerOU = objADInfo.ComputerName
If InStr(1, strComputerOU,"OU=upper OU") > 0 Then
edit2: i'm not sure if it even has to be a vbs file can you determine the computers OU and set default printer using just the batch file?