Well, think there are more than a few UDF's that will handle this, search our UDF library for more information, here's one here:

GetComputerOU() - Retrieve OU of computer account

This returns the OU the computer is in, plus all the DC= DC= blah blah crap, but one can modify this UDF to parse/return just what your after ...

By the way, this UDF doesn't even use an LDAP lookup, it looks-up information already on the machine after one logs-in, through ADSystemInfo. ..