Solved

need assistance with a posh script

Posted on 2013-01-14
2
334 Views
Last Modified: 2013-01-14
looking for a powershell or Quest AD cmdlets script that will accomplish the following:

look at all accounts in a specific OU for value "Emp" in "custom attribute 7" and if it finds that, move the account to a different OU.

thx in advance!

S.
0
Comment
Question by:siber1
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 38775654
Try this..
Get-QADUser -SearchRoot "test.com/Admin" -SizeLimit 0 -IncludedProperties extensionAttribute7 | 
? {$_.extensionAttribute7 -eq "Emp"} |
Move-QADObject -NewParentContainer "test.com/Admin/Users"

Open in new window

0
 

Author Closing Comment

by:siber1
ID: 38775730
perfect. thx Subsun
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

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

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now