Hi dark-art-of-scripting people.
I need a script that'll give me the OU of the user currently logged on to a machine.
I've currently got:
Which echos everything from the username name up, but what I really want echoed is just the first "OU=???" above the CN=%username% part.Code:
Set objSysInfo = Createobject("ADSystemInfo")
Wscript.Echo "DN of current user: " & objSysInfo.UserName
Anyone able to sort me? Thanks in advance for reading and thinking about it! :)