Link to home
Start Free TrialLog in
Avatar of Leadtheway
LeadthewayFlag for United States of America

asked on

Powershell query for OU membership

I have a list of computers in a text file and I want to query AD to pull the OU they belong to.  Is this possible, i know to query ad to pull the computer from the OU, but i want to take a preexisting list and query to get OU membership
Avatar of Emmanuel Adebayo
Emmanuel Adebayo
Flag of United Kingdom of Great Britain and Northern Ireland image

Dsquery command will do this for you perfectly
Avatar of Leadtheway

ASKER

but I'd have to do one at a time right?
SOLUTION
Avatar of Emmanuel Adebayo
Emmanuel Adebayo
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you help with the syntax, I'm not familiar with dsquery, mostly use PS
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial