Hello all,

I am using the following script excert to add a domain user to
the machine local admin group. However, when I try it it states
it can not access the domain to get the user. My question is -
how can I add domain login credentials to the script so it can
log on as an admin to pull the name off the AD?

Many Thanks,
Jamie.

strNetBIOSDomain = "uk"
strComputer = objWshNet.ComputerName

MsgBox(strnetbiosdomain & " " & strcomputer)

Set objGroup = GetObject("WinNT://" & strComputer &
"/Administrators,group")
Set objUser = GetObject("WinNT://" & strNetBIOSDomain & "/" &
strUser & ",user")

' suppress errors in case the user is already a member
On Error Resume Next
objGroup.Add(objUser.ADsPath)
On Error Goto 0

----------------------------------------------
Posted with NewsLeecher v1.0 beta 32 (RC3)
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------