You might have to VBS that yourself.

 

Here are some suggestion which should show you the path:

 

Set objDS = GetObject("LDAP:")

Set objAD = objDs.OpenDsObject(strDN,strUser,strPwd,1)

Set objSD = objAD.Get("ntSecurityDescriptor")

 

objSD.Owner = strNewOwner

 

objAD.Put "ntSecurityDescriptor", Array(objSD)
objAD.SetInfo

 

 

There might be some settings or commands missing (for example you can set how/what should be updated by using objAD.SetOption ), but it should work as a starting point for you.

Gruesse - Sincerely,

Ulf B. Simon-Weidner

  MVP-Book "Windows XP - Die Expertentipps": http://tinyurl.com/44zcz
  Weblog: http://msmvps.org/UlfBSimonWeidner
  Website: http://www.windowsserverfaq.org
  Profile:   
http://mvp.support.microsoft.com/profile="">   


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Crawford, Scott
Sent: Wednesday, February 01, 2006 11:46 PM
To: [email protected]
Subject: [ActiveDir] Script to change owner?

 

Is there anyway in script (preferred) or through the GUI to change the owner of an object?  I realize I can seize ownership in ADUC, but I’d like to be able to assign ownership to a 3rd party.  If need be, I can login as that 3rd party to seize ownership, but I’d like to be able to do it on a whole tree of objects, hence the desire to do it in script.

 

Thanks

Scotte

Reply via email to