Quote:

Richard H. : Can I use you script for this purpose ?




Yes. Have you tried it? You should see your user path displayed.

Now you can use something like "InStr()" to check is you are in an OU.

Here is an example which checks if I'm in the IT staff OU:
Code:
$oADInfo = CreateObject("ADSystemInfo")

$sITOU="OU=IT Users,OU=I.T. Teams,OU=Leatherhead Office,OU=Corporate,DC=ACME,DC=com"

If InStr($oADInfo.UserName,$sITOU)
"Yes, I'm in the IT OU"+@CRLF
Else
"No, I'm not IT staff"+@CRLF
EndIf