Announcement

Collapse
No announcement yet.

InOU Script/Tool ??

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • InOU Script/Tool ??

    Anyone,

    I'm hoping you can help me with an issue I have with InOU.exe. I"m running a Logon Script (*.CMD on Win2K3) and running the following four InOU statements. When the script runs, it actaully executes all four batch files and makes the user seem its under all four OUs. The user I'm logging on to test is in Site\OU3 and it executes all four statements.

    REM %LOGONPATH%\InOU.exe /o Site/OU1/Users /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU1.cmd
    REM %LOGONPATH%\InOU.exe /o Site/OU2/Users /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU2.cmd
    REM %LOGONPATH%\InOU.exe /o Site/OU3/Users /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU3.cmd
    REM %LOGONPATH%\InOU.exe /o Site/OU4/Users /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU4.cmd

    Am I missing something simple here?

    Thanks, for your assistance.
    AMG

  • #2
    Re: InOU Script/Tool ??

    I'm not an expert on the InOU.exe tool but It seems makes sense as to why all 4 scripts are run.

    All the users are in OU's calls Users !!

    I think InOU just takes the name of the relative OU the user is in, and not the full path.

    Try renaming your OU's like the following
    Site/OU1/Users > Site/OU1/Users1
    Site/OU2/Users > Site/OU2/Users2
    Site/OU3/Users > Site/OU3/Users3
    Site/OU4/Users > Site/OU4/Users4

    Then use the script

    Code:
    REM %LOGONPATH%\InOU.exe /o Users1 /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU1.cmd
    REM %LOGONPATH%\InOU.exe /o Users2 /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU2.cmd
    REM %LOGONPATH%\InOU.exe /o Users3 /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU3.cmd
    REM %LOGONPATH%\InOU.exe /o Users4 /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU4.cmd
    And see if that works.

    topper
    Last edited by topper; 26th January 2006, 15:07.
    * Shamelessly mentioning "Don't forget to add reputation!"

    Comment


    • #3
      Re: InOU Script/Tool ??

      AMG,
      You should use the following syntax:


      REM %LOGONPATH%\InOU.exe /o OU1 /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU1.cmd
      REM %LOGONPATH%\InOU.exe /o OU2 /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU2.cmd
      REM %LOGONPATH%\InOU.exe /o OU3 /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU3.cmd
      REM %LOGONPATH%\InOU.exe /o OU4 /u %USERDOMAIN%\%USERNAME% /b %LOGONPATH%\OU4.cmd

      Thanks.

      Comment


      • #4
        Re: InOU Script/Tool ??

        Thanks everyone for your replies..!
        I tested further yesterday after I posted this issue and figured it out, as GanotGanot points it out (I'm just ready this post again after I fixed the problem today).
        I replaced the "/o Site/OU1/Users" with "OU1" and it worked. If you have OU's under the "OU1" it works as well under AD's hierarchy structures. InOU is very useful and definitely recommend it. I do suggest one thing though…Please add an error message indicating that the OU was not found. This would have saved me hours of troubleshooting.

        Thanks for your help.
        AMG

        Comment

        Working...
        X