Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a computer's OU via script

Status
Not open for further replies.

TheGrandHooHa

Technical User
Feb 17, 2002
26
0
0
US
I am working on a new system of printer scripts to help simplify our Active Directory/Group Policy setup. I had an idea of assigning printers based on OU, but rather than making a printer script for each OU, I was hoping to make a script that ascertained a given computer's OU and then assigned the appropriate printer. However, for the life of me, I can't find a way to just get the name of a computer's OU through a script. I can see how to access OU information, but only after specifying the particular OU that I wish to work with.

Is there any way this can be done?

Thanks in advance.
 
<shouts>

MARK!!!!!!

Hope this Helps.

Neil J Cotton
njc Information Systems
Systems Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top