Solved

Active Directory OU

Posted on 2010-08-12
4
425 Views
Last Modified: 2012-05-10
Greetings, I inherited a network that already has AD set up. OUs are set up with what I call subordinate OUs. In other words,
                                                           OU-1
                                                                OU-1a
I cannot get my scripts to find OU-1a. I tried this, strOU = "OU=OU-1/OU-1a ," and it did not find the OU. Is there a way to get my script to find OU-1a and make changes to user accounts?
0
Comment
Question by:wayneray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 30

Accepted Solution

by:
Rich Weissler earned 125 total points
ID: 33422836
Taking a stab:  Did you try "OU=ou-1a,ou=ou-1" ?
0
 
LVL 15

Assisted Solution

by:JBond2010
JBond2010 earned 125 total points
ID: 33422945
If you run from the command prompt dsquery /? eg: dsquery ou dc=mydom,dc=com and then look for the OU in question and reference this to your script and see what happens.
0
 

Author Closing Comment

by:wayneray
ID: 33423236
Razmus your solution was totally correct. I was a bit cautious so I followed JBond2010's dsquery first. Thanks to both of you I am scripting happily.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
In-place Upgrading Dirsync to Azure AD Connect
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…
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 to another domain controller. Log onto the new domain controller with a user account t…

740 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