Move Computers to a New OU

Moves all the computers listed in a text file to a new OU. The script also creates and/or updates a log file with the original distinguished name of each computer.

4.1 Star
Add to favorites
Active Directory
E-mail Twitter Digg Facebook
  • Line is empty
    1 Posts | Last post August 29, 2013
    • I am attempting to use this script to move a list of users.  It finds the users and adds the FQDN to the log file but never actually moves the account.  When it gets to the line below it says it is Empty.  Any ides?
       Set objMoveComputer = objNewOU.MoveHere(strPath, strName)
  • Error
    1 Posts | Last post October 29, 2012
    • Hi.
      I am new to scripting and keep getting the following error:
      Missing expression after ','.
      At C:\IVAN_SCRIPTS\moveoldcomp2.ps1:7 char:42
      + Set oTS = oFS.OpenTextFile("OLDCOMP.txt", <<<< ForReading)
          + CategoryInfo          : ParserError: (,:String) [], ParseException
          + FullyQualifiedErrorId : MissingExpressionAfterToken
      Any ideas?
  • Nice!
    1 Posts | Last post June 27, 2011
    • This is exactly what I needed. Thank you!