Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET
Administrative Tools and Scripts



This utility is designed to run in the login script and execute batch files (or any other executable file) if the user is a member of the specified OU.

Requirements: Windows 2000/2003 domain.

If using a Windows 9X or Windows NT4 client computers, make sure the client has Active Directory Client Extension installed. Read Active Directory Client (dsclient) for Win98/NT for more info.

Current version: 1.1

Sponsored Content

Say Goodbye to Traditional PC Lifecycle Management

Traditional IT tools, including Microsoft SCCM, Ghost Solution Suite, and KACE, often require considerable custom configurations by T3 technicians (an expensive and often elusive IT resource) to enable management of a hybrid onsite + remote workforce. In many cases, even with the best resources, organizations are finding that these on-premise tools simply cannot support remote endpoints consistently and reliably due to infrastructure limitations.

Version highlights: This new version also supports computer names. You can include a computer name in the /u parameter instead of a user name. See the below samples.


Download (7kb)

You need to extract the tool/script found in the downloaded file by using WinZip or similar.


​InOU /o  [/b ] [/u ]

Note: When specifying a computer account name with the /u switch, add a $ sign to the computer name.


​InOU /o users /u'asafg /b ''filesrv'batchfiles'test1.bat

This sample will execute ”filesrv’batchfiles’test1.bat if asafg is a member of the users OU.

​InOU /o domain controllers /u'computer1$ /b ''filesrv'batchfiles'c.bat

This sample will executer ”filesrv’batchfiles’c.bat if the computer account computer1 resides in the domain controllers OU.

Detailed Instructions

  1. Place InOU.exe in your system path folders.
  2. Create a batch file for each of the desired OU’s. Name each file exactly as the name of the OU.
  3. Copy the InOU.exe file to the NETLOGON share.
  4. Enter the following line for each of the desired OU’s in the logon script: ”<your domain name>’NETLOGON’InOU.exe /o <OU Name>


No support of any sort will be given for this script/tool or for any other script/tool found on the website for that matter. If you need to contact us with any support issues, feedback or suggestions regarding the tool(s) and script(s) found on this page please write an e-mail to THIS address.


The software available from GanoTools is FREEWARE. It is not in the Public Domain. Asaf Ganot retains the copyright for this work. You can use it freely but do not claim it for your own or charge others money for it.

Use these tools at your own risk. They are provided for your own personal use and enjoyment and Asaf Ganot nor Daniel Petri nor do not provide any warranty for them, nor they will be held responsible for any result allegedly caused by use or misuse of any of the tools found on this page.

Back to the Tools and Scripts page.


Don't have a login but want to join the conversation? Sign up for a Petri Account

Comments (0)

Leave a Reply

Live Webinar: Active Directory Security: What Needs Immediate Priority!Live on Tuesday, October 12th at 1 PM ET

Attacks on Active Directory are at an all-time high. Companies that are not taking heed are being punished, both monetarily and with loss of production.

In this webinar, you will learn:

  • How to prioritize vulnerability management
  • What attackers are leveraging to breach organizations
  • Where Active Directory security needs immediate attention
  • Overall strategy to secure your environment and keep it secured

Sponsored by: