Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



The task completed with an exit code of (1)

Active Directory


Reply
 
Thread Tools Search this Thread
  #1  
Old 01-09-2009
Ikram
 
Posts: n/a
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.

Reply With Quote
  #2  
Old 02-09-2009
Marcin
 
Posts: n/a
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.



Reply With Quote
  #3  
Old 02-09-2009
Ikram
 
Posts: n/a
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.

>
>
>

Reply With Quote
  #4  
Old 03-09-2009
Marcin
 
Posts: n/a
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.

>>
>>
>>



Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "The task completed with an exit code of (1)"
Thread Thread Starter Forum Replies Last Post
The Underlying Task Reported Failure On Exit Tarjan Operating Systems 3 11-11-2009 10:40 PM
Exit code from a batch file? Bhairav Operating Systems 3 17-02-2009 05:38 PM
Scheduled Task Exit Code Rich Young Windows Server Help 6 07-01-2008 11:41 AM
Task Scheduler Exit Code GMC Windows Server Help 4 21-04-2007 08:51 AM
Scheduled Task error code:The task completed with an exit code of Teo Chee Yang Windows Server Help 7 26-02-2007 06:01 PM


All times are GMT +5.5. The time now is 09:09 AM.