Questions tagged [ou]

OU stands for Organizational Unit. It's used in directories in general and in LDAP (Lightweight Directory Access Protocol), particularly to point out the main attribute of the organizationalUnit class.

Organizational Unit is described in ITU-T X521 (Telecommunication Standardization sector of International Telecommunication Union) as a class used to define entries representing subdivisions of organizations. As far as LDAP is concerned, organizationalUnit is defined in RFC2256.

Organizational Units are generaly the immediate superior of entries of object class user, inetOrgPerson, group or groupOfNames.

103 questions
37
votes
6 answers

LDAP root query syntax to search more than one specific OU

I need to run a single LDAP query that will search through two specific organization units (OU) in the root query however I'm having a tough go of it. I've tried the following queries below and neither were…
James
  • 12,636
  • 12
  • 67
  • 104
8
votes
1 answer

Deleting OUs in Active Directory Users and Computers

I need to delete few Organizational units in Active Directory users and computers that were created for testing purposes. When I try to delete them, following error occurred: “You don’t have sufficient privileges to delete TestDevs, or this object…
William Johnson
  • 190
  • 1
  • 1
  • 6
8
votes
3 answers

How can I find what Organizational Units a computer is part of? ( Active Directory C# )

I want to find the most specific OU my computer belongs to in C#. I have code that will get the information I need, but it doesn't feel robust and it would require complicated parsing. Are there better alternatives? Thoughts? Any help is…
user1507986
  • 83
  • 1
  • 1
  • 4
6
votes
1 answer

Get-ADUser not recognized

I'm trying to write a script for Powershell that will display the date/time of last login and date/time of last password change for every user and separate the data according to their Organizational Unit within Active Directory. I'm getting a number…
ITKev
  • 59
  • 1
  • 1
  • 5
6
votes
2 answers

Powershell - Filtering OUs while using get-adcomputer

I am trying to create a script that generates a list of computers based on specific properties which a computer may have. For example, I am trying to make a list of Windows XP computers and Windows 7 computers, throw their names in a .csv file and…
smierdziel
  • 133
  • 2
  • 3
  • 9
5
votes
1 answer

What is the difference between an AWS IAM Group and an Organizational Unit?

I'm investigating users and groups in AWS and have some confusion regarding an AWS IAM Group and an Organizational Unit. They both seem to implement the same functionality such as organizing like accounts with similar tasks and assigning policies…
glez
  • 1,170
  • 3
  • 16
  • 42
5
votes
1 answer

How to find computer object OU from server itself using CMD

How can I find what OU the computer belongs to using CMD or powershell cmdlet . I have found some long scripts but there has to be a one liner command for it. The computers dont have AD role installed on them so DSQUERY is out of equation. CMD or…
Fenomatik
  • 457
  • 2
  • 8
  • 22
5
votes
2 answers

Filter out sub OU in search

I am trying to write a PowerShell script that will find all of the users in AD that have not logged in for six months, and to not include anyone in the Terminated Users OU or the Terminated Users\vendors and others OU. I can't seem to get it to…
OneGuy
  • 53
  • 1
  • 1
  • 3
4
votes
3 answers

Get OU (Organizational Unit) name that a local computer belongs to using C++

I need to find out the name of the OU that the local computer (that is connected to the Active Directory) belongs to using WinAPI/C++. Any ideas?
ahmd0
  • 16,633
  • 33
  • 137
  • 233
4
votes
1 answer

get sub OUs description within a given OU

Is there any simple way of getting a list of all the OUs located one level under a given OU? i.e. I have an OU called "Clients" and one level under this OU there are multiple OUs , one for each client. i.e. CAS, ADI, PMA I would like to get a list…
miticoluis
  • 511
  • 2
  • 15
  • 32
4
votes
2 answers

Get Local Admin Accounts on every computer in OU

I am trying to get a list of all user accounts in the administrators group on their respected machines, of our entire OU. I have found a script that shows this on a single computer, but I would like to call out to a CSV file for the computer names,…
Zach Garrow
  • 43
  • 1
  • 1
  • 3
4
votes
4 answers

Writing to Socket outputStream w/o closing it

I'd like to write some messages to the server. Each time, for the tramsmitting only, I'm closing the outputStream and reopen it when I have to send the next message. os.write(msgBytes); os.write("\r\n".getBytes()); os.flush(); os.close(); How Can I…
eyal
  • 2,379
  • 7
  • 40
  • 54
4
votes
2 answers

Search Users in Specific OU Active Directory

I have different OU in my Active Directory for different users, I want to get all users of a specific OU using C#. Currently I have this filter, but it returns all users from all OU (&(objectClass=User)(objectCategory=Person)) Kindly help me in…
Muhammad Taqi
  • 53
  • 1
  • 1
  • 4
4
votes
1 answer

Active Directory: Move users to different OUs

I'm develop an app that needs create and maintain users into the active directory. My problem is that the users have a hierarchy and the master can create them with different password expiration values. I was reading about that and maybe it's…
geonunez
  • 1,309
  • 1
  • 9
  • 9
3
votes
2 answers

Get-ADUser filter out specific OU, custom column

trying to get an Audit report of active users. We have an OU that I do not want to report on. Give me all the active (enabled) AD accounts. EXCEPT in a specific OU. Get-ADUser -Filter{enabled -eq $true} | Select-object…
MNEsther
  • 111
  • 1
  • 2
  • 6
1
2 3 4 5 6 7