Results 1 to 4 of 4

Thread: The task completed with an exit code of (1)

  1. #1
    Ikram Guest

    The task completed with an exit code of (1)

    I am running a batch file for creating new users in the Active Directory
    using dsadd command, as a schedule task and it gives an error in the log file
    as "The task completed with an exit code of (1), and the users are not
    created.

    I have a user created as NSUser and made it a member of Domain Users and
    Account Operators, and using this account to run the schedule task.

    But when I make the NSUser a member of Administrators group the task runs
    successfull without any errors and the user accounts are created using the
    batch file.

  2. #2
    Marcin Guest

    Re: The task completed with an exit code of (1)

    Ikram - if you are looking for help regarding a batch file that throws an
    error, then you might want to include it as part of your post...

    Marcin

    "Ikram" <Ikram@discussions.microsoft.com> wrote in message
    news:60E1E092-A8CE-4084-980F-CD52AC2BB976@microsoft.com...
    >I am running a batch file for creating new users in the Active Directory
    > using dsadd command, as a schedule task and it gives an error in the log
    > file
    > as "The task completed with an exit code of (1), and the users are not
    > created.
    >
    > I have a user created as NSUser and made it a member of Domain Users and
    > Account Operators, and using this account to run the schedule task.
    >
    > But when I make the NSUser a member of Administrators group the task runs
    > successfull without any errors and the user accounts are created using the
    > batch file.




  3. #3
    Ikram Guest

    Re: The task completed with an exit code of (1)

    Marcin:

    The batch file is running the dsadd command to create 1000's of users, let
    me show you one of the users command as shown below:

    dsadd user cn=abbat810001,ou=students,ou=bghs,ou=schools,dc=d214,dc=org -upn
    abbat810001@d214.org -fn "ALEXANDER" -mi P -ln "ABBATIELLO" -display
    "ALEXANDER P. ABBATIELLO" -pwd 035692 -desc "BGHS-Student" -canchpwd no
    -memberof cn=BGHS-Students,ou=groups,ou=bghs,ou=schools,dc=d214,dc=org
    -pwdneverexpires yes

    So it has 1000's of those lines.

    The batch file runs fine, normally and in the schedule task if and only the
    member is part of the Administrators group. For security reasons I thought I
    would only use the Account Operator group, and then tried to schedule the
    task but it fails with that exit code of (1). But if add the user into the
    Administrators group and schedule the task it runs successfully.



    "Marcin" wrote:

    > Ikram - if you are looking for help regarding a batch file that throws an
    > error, then you might want to include it as part of your post...
    >
    > Marcin
    >
    > "Ikram" <Ikram@discussions.microsoft.com> wrote in message
    > news:60E1E092-A8CE-4084-980F-CD52AC2BB976@microsoft.com...
    > >I am running a batch file for creating new users in the Active Directory
    > > using dsadd command, as a schedule task and it gives an error in the log
    > > file
    > > as "The task completed with an exit code of (1), and the users are not
    > > created.
    > >
    > > I have a user created as NSUser and made it a member of Domain Users and
    > > Account Operators, and using this account to run the schedule task.
    > >
    > > But when I make the NSUser a member of Administrators group the task runs
    > > successfull without any errors and the user accounts are created using the
    > > batch file.

    >
    >
    >


  4. #4
    Marcin Guest

    Re: The task completed with an exit code of (1)

    Enclose the distinguished name of the group name in double quotes...

    hth
    Marcin

    "Ikram" <Ikram@discussions.microsoft.com> wrote in message
    news:328E9A96-079E-446F-B27D-145E393B01C7@microsoft.com...
    > Marcin:
    >
    > The batch file is running the dsadd command to create 1000's of users, let
    > me show you one of the users command as shown below:
    >
    > dsadd user
    > cn=abbat810001,ou=students,ou=bghs,ou=schools,dc=d214,dc=org -upn
    > abbat810001@d214.org -fn "ALEXANDER" -mi P -ln "ABBATIELLO" -display
    > "ALEXANDER P. ABBATIELLO" -pwd 035692 -desc "BGHS-Student" -canchpwd no
    > -memberof cn=BGHS-Students,ou=groups,ou=bghs,ou=schools,dc=d214,dc=org
    > -pwdneverexpires yes
    >
    > So it has 1000's of those lines.
    >
    > The batch file runs fine, normally and in the schedule task if and only
    > the
    > member is part of the Administrators group. For security reasons I thought
    > I
    > would only use the Account Operator group, and then tried to schedule the
    > task but it fails with that exit code of (1). But if add the user into the
    > Administrators group and schedule the task it runs successfully.
    >
    >
    >
    > "Marcin" wrote:
    >
    >> Ikram - if you are looking for help regarding a batch file that throws an
    >> error, then you might want to include it as part of your post...
    >>
    >> Marcin
    >>
    >> "Ikram" <Ikram@discussions.microsoft.com> wrote in message
    >> news:60E1E092-A8CE-4084-980F-CD52AC2BB976@microsoft.com...
    >> >I am running a batch file for creating new users in the Active Directory
    >> > using dsadd command, as a schedule task and it gives an error in the
    >> > log
    >> > file
    >> > as "The task completed with an exit code of (1), and the users are not
    >> > created.
    >> >
    >> > I have a user created as NSUser and made it a member of Domain Users
    >> > and
    >> > Account Operators, and using this account to run the schedule task.
    >> >
    >> > But when I make the NSUser a member of Administrators group the task
    >> > runs
    >> > successfull without any errors and the user accounts are created using
    >> > the
    >> > batch file.

    >>
    >>
    >>




Similar Threads

  1. The Underlying Task Reported Failure On Exit
    By Tarjan in forum Operating Systems
    Replies: 3
    Last Post: 11-11-2009, 10:40 PM
  2. Exit code from a batch file?
    By Bhairav in forum Operating Systems
    Replies: 3
    Last Post: 17-02-2009, 05:38 PM
  3. Scheduled Task Exit Code
    By Rich Young in forum Windows Server Help
    Replies: 6
    Last Post: 07-01-2008, 11:41 AM
  4. Task Scheduler Exit Code
    By GMC in forum Windows Server Help
    Replies: 4
    Last Post: 21-04-2007, 07:51 AM
  5. Scheduled Task error code:The task completed with an exit code of
    By Teo Chee Yang in forum Windows Server Help
    Replies: 7
    Last Post: 26-02-2007, 06:01 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,710,838,598.14349 seconds with 16 queries