Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Move list of pc s from one ou to another

Posted on 2013-10-23
1
Medium Priority
?
284 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 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Screencast - Getting to Know the Pipeline

926 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