Solved

Move list of pc s from one ou to another

Posted on 2013-10-23
1
280 Views
Last Modified: 2013-10-25
Please advise howto move a list of pc s from one ou to another in powershell.

J.
0
Comment
Question by:janhoedt
1 Comment
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39595165
If you have win 2008 R2 domain controllers, then you can try..
Import-Module Activedirectory
GC C:\PC.txt | %{get-adcomputer $_ | Move-ADObject -TargetPath 'ou=ComputerOU,dc=Domain,dc=Com'}

Open in new window

Input file format..
WINPC1
WINPC2
WINPC3

Open in new window

0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question