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
0
votes
2 answers

Selecting OU from if statement in function

I am trying to change the OU path of the new user being made in the function of creating the user. I am running into the issue of the OU path coming back as NULL with this if statement and am unsure why. Any help would be great! $dropdown_FirstOU =…
Harry
  • 33
  • 4
0
votes
0 answers

Removing printer from Devices and Printers with Powershell

I am trying to make a Powershell script that will run in the OU so when the user shuts down their laptop it will remove the local printer and when they turn on their laptop it will re-add and rename the locally attached printer (this will allow the…
0
votes
1 answer

If no OU path entered set default instead

New to PS and need some help with $null values, I want to ask the user to set a OU path but if the user enters nothing then it will revert to the default which is in the if statement. $OU = Read-Host -Prompt "Enter the new users OU path" if($null…
Harry
  • 33
  • 4
0
votes
1 answer

Get-ADUser - want to write only one part of the OU into a variable

I have this: Get-ADUser myuser | Select @{n='OU';e={$_.DistinguishedName -replace '^.*?,(?=[A-Z]{2}=)'}} But I need to get only on part of the OU of a specific user which I have to define as a variable in the beginning. I get…
0
votes
1 answer

Powershell - Only show count of users if OU has users to count

I've tried this a few ways and have come very, very close but no cigar. What I need help with is creating a report that shows the number of users in each OU. I know there are several ways to do this, but each method I've tried has given me varying…
0
votes
1 answer

Search for Users/People Across Multiple specific OU GUIDs

Basically, I'm developing an app for managing Active Directory, I've added a big layer of 'security' that is the ability to assign to specific users what OU GUIDs they're allowed to access/search through. The problem I'm facing now is there doesn't…
API
  • 125
  • 2
  • 12
0
votes
2 answers

disable enumeration other user accounts in active directory

Huhu, is it possible to disable the search for other Users in an AD? In this picture i am logged in as "normal" User. Get-ADuser search Here is a Picture of our AD structure. AD Structure So i don't want that a User can find another User in the…
0
votes
0 answers

How to create security groups across all OUs in AD

In my task it is necessary to create groups according to the OU name, taking into account nesting. For example, there is such an OU OU=Credential,OU=DepIT,DC=Contoso,DC=loc then I need to create the following groups: In DepIT: Three groups…
Nikita
  • 1
  • 1
0
votes
2 answers

Powershell : Move-ADObject : The operation could not be performed because the object's parent is either uninstantiated or deleted

i've a problem with a script in Powershell... I want to transfer users from an OU (parent OU : "IT" for exemple) to a "child OU" => "Users". ("IT">"Users"). Problem : $name = "CN=Michael Allen,OU=IT,DC=Adatum,DC=com" Move-ADObject "CN=Michael…
0
votes
1 answer

LDAP Filter: Return entries within multiple OUs

Assume a tree looking like this ROOT OU=ABC OU=Users and Groups OU=Users CN=USER1 CN=USER2 CN=GRP1 OU=DFG OU=Users and Groups OU=Users …
crypt555
  • 3
  • 6
0
votes
2 answers

Ldap filter for multiple Ou's Powershell

Hello guys still pretty new to Powershell and never worked with Ldap -filter before so i have a question. Is it possible to get AD-User's out of mulitple Ou's with one Ldap…
TrixD
  • 7
  • 2
0
votes
2 answers

How to dynamically move computer accounts from Computers OU

Its pretty "simple" what i want to achieve. I have people creating Computer Objects on my AD and leaving there without moving them to the appropiate OU. I would like a powershell script to read the list of computers from the Computers OU, and…
Dioxido
  • 3
  • 3
0
votes
1 answer

Powershell script to retrieve PC Membership from one OU

First, I have no formal training in Powershell, so most of what I write is adapted code or is relatively simple. I'm having problems retrieving either extended properties for a machine, or reorganizing the list of columns that is returned. In my…
dramerus
  • 47
  • 5
0
votes
1 answer

Move computer to the correct OU from csv file using Powershell

Keep getting "Move-ADObject : Cannot validate argument on parameter 'TargetPath'. The argument is null or empty." when trying to move computers to their respective OU. Tried these set of codes to achieve it but it doesn't work: PS C:\temp> cat…
bad rabbit
  • 75
  • 6
0
votes
1 answer

Extract OU and Domain from DistinguishedName

I have a user named Lamda that I want to extract the OU and Domain sequence from the DistinguishedName. For example, for the DistinguishedName of CN=Lamda,OU=OU_Bloquage,DC=Adminstrateur,DC=6NLG-AD I want to extract the sequence…
MKH_Cerbebrus
  • 51
  • 2
  • 10