kmurphy
(Fresh Scripter)
2004-11-09 10:15 PM
@function to determine OU of user and/or workstati

I believe it would be useful to be able to query the fully qualified OU of the current user and/or workstation.

Especially the workstation because I could them put certain computer names into a special OU and if that matches what this proposed @function returns, then the script could diverge appropriately.


Howard Bullock
(KiX Supporter)
2004-11-10 04:13 AM
Re: @function to determine OU of user and/or workstati

TranslateName() UDF does this for you.

Howard Bullock
(KiX Supporter)
2005-01-13 03:49 AM
Re: @function to determine OU of user and/or workstati

Combine with InContainer() UDF to make branching decisions based on OU.

Les
(KiX Master)
2005-01-13 04:04 AM
Re: @function to determine OU of user and/or workstati

InContainer() does not differentiate at what level of OU nesting the object resides. Granted, one can take the TranslateName() UDF and parse through the DN to determine where on the tree the object resides.

If there were a macro to do this, it should probably work like the @IPAddressX macro whereby the X denotes the position.