cooper Posted June 5, 2018 Posted June 5, 2018 Hi I need to get a printer working from another domain but I cant work out how to add another domain user credentials to a script. Does anyone have an example they could post Thanks
cooper Posted June 5, 2018 Author Posted June 5, 2018 Worked it out.... Option Explicit Dim objNetwork Dim strUser, strPassword, strUNCPrinter strUNCPrinter = "\\server\printer" strUser = "domain\user" strPassword = "password" Set objNetwork = WScript.CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection strUNCPrinter, strUser, strPassword WScript.Quit
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now