OSD Add Domain Group to local Admin Group
Hello,
I’m building a bare metal (NEW) XP OS machine and I’m using SCCM 2007 OSD and the MDT 2010 DB to accomplish this.
I have most things working, but I have a question.
I need to add some Domain groups to the local Admins group on the machine that I’m building.
I added the groups to the Administrators Tab for the computer Role in the MDT database.
After the machine is built the Domain groups are not in the local Admins group.
Could someone please tell me how to accomplish this or what I'm missing?
Thank you!
Sam
March 10th, 2011 9:53pm
That should work. I just use a GPO to do it though.
John Marcum | http://myitforum.com/cs2/blogs/jmarcum/|
Free Windows Admin Tool Kit Click here and download it now
March 10th, 2011 10:00pm
Hi John,
Thanks for replying. Actually, I don't have it working in OSD. I was hoping to not use a GPO. I was hoping there was a script native to MDT that would work.
I looked at the ZTIGroups.WSF script, but that only works in the refresh or replace OS builds where the groups are already in the local Admins group.
Sam
Sam Ballone
March 10th, 2011 10:10pm
Sam,
I had to do this through a command line task sequence using a script. See if this helps you any :)
Dim DomainName
Dim UserAccount
Set net = WScript.CreateObject("WScript.Network")
local = net.ComputerName
DomainName = "DomainName"
UserAccount = "userAccount"
set group = GetObject("WinNT://"& local &"/Administrators")
on error resume next
group.Add "WinNT://"& DomainName &"/"& UserAccount &""
CheckError
sub CheckError
if not err.number=0 then
set ole = CreateObject("ole.err")
MsgBox ole.oleError(err.Number), vbCritical
err.clear
else
MsgBox "Done."
end if
end subKind Regards, Tom Ziegler http://www.sccmguy.com | Twitter @Tom_Ziegler
Free Windows Admin Tool Kit Click here and download it now
March 10th, 2011 10:13pm
Hi Tom,
Does the above script need a domain account and PW to add the domain group to the local Admins group?
SamSam Ballone
March 10th, 2011 10:55pm
It your doing this as a task sequence as part of your OSD, then it should use the same account used with your OSD task sequences.Kind Regards, Tom Ziegler http://www.sccmguy.com | Twitter @Tom_Ziegler
Free Windows Admin Tool Kit Click here and download it now
March 10th, 2011 11:11pm
Thank you!
I'll give it a try and let you know how works for me.
SamSam Ballone
March 10th, 2011 11:18pm
That script is bad ass, thanks!
Free Windows Admin Tool Kit Click here and download it now
April 4th, 2012 12:08pm