About
Pricing
Community
Teams
Start Free Trial
Log in
leadtheway
asked on
3/23/2017
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
Powershell
Active Directory
5
2
Last Comment
footech
8/22/2022 - Mon
Emmanuel Adebayo
3/23/2017
Dsquery
command will do this for you perfectly
leadtheway
3/23/2017
ASKER
but I'd have to do one at a time right?
SOLUTION
Emmanuel Adebayo
3/23/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
leadtheway
3/23/2017
ASKER
Can you help with the syntax, I'm not familiar with dsquery, mostly use PS
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
footech
3/23/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.