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
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.
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 mydom.com'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 mydom.com'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.
- Place InOU.exe in your system path folders.
- Create a batch file for each of the desired OU’s. Name each file exactly as the name of the OU.
- Copy the InOU.exe file to the NETLOGON share.
- 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 Petri.co.il 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 Petri.co.il 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.
More in Administrative Tools and Scripts
Delivering High Availability in the Hybrid Cloud
Mar 13, 2019 | Michael Otey
Introduction to the IT Roadmap Planning Tool for Microsoft 365
Feb 16, 2018 | Juan Carlos-Gonzalez Martin
Sponsored: Conquering Remote Desktop Challenges
Dec 21, 2017 | Michael Otey
Avoiding Accidental Changes with PowerShell's WhatIf and Confirm Parameters
Jun 12, 2017 | Missy Januszko
Migrate Content from Docs.com to OneDrive for Business
Jun 12, 2017 | Jussi Roine
Improving The User Provisioning Process
Nov 18, 2015 | Petri IT Knowledgebase
Most popular on petri