Netsuper
(Getting the hang of it)
2002-09-27 08:19 PM
Moving a Computer within AD

Hey all,
Does ADSI have a function for moving a computer account from one OU to another? Or would I need to use LDAP? And if I use LDAP, does anyone have a syntax for an LDAP put (if there is such a thing?).


Chris S.
(MM club member)
2002-09-27 08:34 PM
Re: Moving a Computer within AD

Here's something from the MSDN Script Center (converted to KiX):

code:
$objNewOU = GetObject("LDAP://OU=Finance,DC=fabrikam,DC=com")
$objMoveComputer = $objNewOU.MoveHere ("LDAP://CN=atl-pro-03,CN=Computers,DC=fabrikam,DC=com", "CN=atl-pro-03")