Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Return Active Directory User Accounts without a Manager

Posted on 2014-09-26
1
Medium Priority
?
247 Views
Last Modified: 2014-09-26
Hi there,

I was wondering if you could help, i'm looking to run a powershell script that returns all User accounts without a Manager using Get-ADUser. For some reason I can only return users with a manager.

Thanks so much!
0
Comment
Question by:Terellion
1 Comment
 

Accepted Solution

by:
Terellion earned 0 total points
ID: 40345887
Actually i've finally found out how to just after posting!

Get-ADUser -SearchBase "ou=users,dc=domain,dc=local" -Filter * -Properties * | where {$_.manager -eq $null} | Select-Object  Name | Sort-Object Name
0

Featured Post

Lessons on Wi-Fi & Recommendations on KRACK

Simplicity and security can be a difficult  balance for any business to tackle. Join us on December 6th for a look at your company's biggest security gap. We will also address the most recent attack, "KRACK" and provide recommendations on how to secure your Wi-Fi network today!

Question has a verified solution.

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

A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

783 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