EMPTY OU LIST

  • 86 Views
  • Last Post 30 December 2015
abhay.ipg posted this 30 December 2015

Hello Eeveryone ,
Anyone having any script which give me the output of all the EMPTY OU in single domain.
Looking forward for your support.
Regards,
Abhay

Order By: Standard | Newest | Votes
ZJORZ posted this 30 December 2015

What’s the definition of an empty OU?

 

An OU with no objects at all or an OU with no other objects than one or more sub OUs.

 

You also need to exclude the default containers/OUs in the domain.

 

Also have a look at https://jorgequestforknowledge.wordpress.com/2014/08/12/interesting-attribute-measuring-number-of-subordinate-objects-msds-approx-immed-subordinates/

Met vriendelijke groet / Kind regards,


Jorge de Almeida Pinto



E-Mail: JorgeDeAlmeidaPinto@xxxxxxxxxxxxxxxx


Tel.: +31-(0)6-26.26.62.80



(+++Sent from my mobile device +++)


(Apologies for any typos)

 

show

dddugan posted this 30 December 2015

Definitely consider Jorge’s reply for a more complete analysis/answer. Here’s a quick search for just totally empty OUs in the current domain.

 

Get-ADOrganizationalUnit -Filter * | Where-Object { !$(([System.DirectoryServices.DirectoryEntry]('LDAP://' + $_.DistinguishedName)).Children) }

 

Cheers.

 

show

abhay.ipg posted this 30 December 2015

Will try and let you know,thanks for your support.
a
Regards,
Abhay Singh
Email:- Abhay.ipg@xxxxxxxxxxxxxxxx
Cell :- +91-8527676669
Skype:- abhayit1

show

Close