r/PowerShell • • 18d ago

Script Sharing ADSearch - User/Computer comparison tool

This Active Directory toolkit offers user/computer OU comparisons using fuzzy Levenshtein matching to determine if the computer is in an OU that matches the user's OU. Designed for large enterprise IT audits/asset management of complex (2+ OU levels) AD environments

ADSearch/README.md at main · Contoso-Administrator/ADSearch

Edit: Made some edits based on everyone's kind words :)

0 Upvotes

21 comments sorted by

View all comments

9

u/TrippTrappTrinn 18d ago

Why would anybody have users and computers in the same OU? 

2

u/UserProv_Minotaur 17d ago

Bad IT practices and/or inexperienced admins.

1

u/SoyBoy_64 17d ago

There are plenty of businesses that require you to have separate OUs for various reasons. You guys gotta be trolling 😂

1

u/UserProv_Minotaur 17d ago

Never underestimate the consequences of "good enough" engineering philosophies, an unskilled workforce, or plain old laziness.

Example: Your organization implemented autologon workstations in a way where there is a corresponding user object to each computer object so configured. One bad Move Object command, or not properly sanitizing inputs, and you could easily have a bit of a situation where Users and Computers are in the same container - which should and would be easy to fix, but if you're not validating things you'd not know of the issue until someone reported that something broke.

1

u/TrippTrappTrinn 16d ago

Entra does not have OUs, and it seems to work just fine. If you are in a hybrid environment, just use groups.

-8

u/SoyBoy_64 18d ago edited 17d ago

They’re not and that’s why this tool is useful.

1

u/TrippTrappTrinn 17d ago

Just move all workstations to one OU and be done with it.