Jump to content
Sign in to follow this  

Moving objects in Active Directriy AD

Recommended Posts

Well, let's see:

Here is the VBScript version.

Set objNewOU = GetObject("LDAP://OU=Finance,DC=fabrikam,DC=com")

Set objMoveComputer = objNewOU.MoveHere _
    ("LDAP://CN=atl-pro-03,CN=Computers,DC=fabrikam,DC=com", "CN=atl-pro-03")

So, looking at the syntax from here, the Autoit syntax probably looks something like this:

$objNewOU = ObjGet("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")

Unfortunately, I don't have an AD to test on right now. This appears to move a computer from the Computer OU to the Finance OU.

BlueBearrOddly enough, this is what I do for fun.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...