Forum Search:
Forum.Brain-Cluster.com: Brain Cluster Technical Forum
Ultimate forum for Technical Discussions

Home » Microsoft » Windows Server » Active Directory » The task completed with an exit code of (1)
The task completed with an exit code of (1) [message #160552] Tue, 01 September 2009 07:57 Go to next message
Ikram  is currently offline Ikram
Messages: 5
Registered: September 2009
Junior Member
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.
Re: The task completed with an exit code of (1) [message #160570 is a reply to message #160552] Tue, 01 September 2009 16:30 Go to previous messageGo to next message
Marcin  is currently offline Marcin  United States
Messages: 273
Registered: July 2009
Senior Member
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.
Re: The task completed with an exit code of (1) [message #160586 is a reply to message #160570] Wed, 02 September 2009 06:14 Go to previous messageGo to next message
Ikram  is currently offline Ikram
Messages: 5
Registered: September 2009
Junior Member
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.
>
>
>
Re: The task completed with an exit code of (1) [message #160623 is a reply to message #160586] Wed, 02 September 2009 18:15 Go to previous message
Marcin  is currently offline Marcin  United States
Messages: 273
Registered: July 2009
Senior Member
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.
>>
>>
>>
Previous Topic:use oldcmp to delete aged computer objects
Next Topic:Re: List all users with 'Password Never Expires'
Goto Forum:
  


Current Time: Fri Jan 19 00:41:03 MST 2018

Total time taken to generate the page: 0.03265 seconds
.:: Contact :: Home ::Sitemap::.

Powered by: FUDforum 3.0.0RC2.
Copyright ©2001-2009 FUDforum Bulletin Board Software