Sign in with
Sign up | Sign in
Your question

Creating local user and adding it to power user group on s..

Tags:
  • Microsoft
  • Power
  • Windows
Last response: in Windows 2000/NT
Share
May 16, 2005 1:01:27 PM

Archived from groups: microsoft.public.win2000.general (More info?)

I need to create a local user with a password and add them to the local power
users group, does anyone have a script to do that? Thanks again for your
help...

More about : creating local user adding power user group

Anonymous
May 17, 2005 6:09:56 AM

Archived from groups: microsoft.public.win2000.general (More info?)

"KJ" <KJ@discussions.microsoft.com> wrote in message
news:5FFD796C-7F40-43CF-A591-8F67A3893A97@microsoft.com...
> I need to create a local user with a password and add them to the local
power
> users group, does anyone have a script to do that? Thanks again for your
> help...

From the help text in generated by typing net user /?:
The syntax of this command is:
NET USER
[username [password | *] [options]] [/DOMAIN]
username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]

From the help text generated by typing net localgroup /?:
The syntax of this command is:
NET LOCALGROUP
[groupname [/COMMENT:"text"]] [/DOMAIN]
groupname {/ADD [/COMMENT:"text"] | /DELETE} [/DOMAIN]
groupname name [...] {/ADD | /DELETE} [/DOMAIN]

Hence:
net user JSmith SomePassword /add
net localgroup "Power Users" JSmith /add
May 17, 2005 6:09:57 AM

Archived from groups: microsoft.public.win2000.general (More info?)

Thanks for the response...
I have about 100 servers and I want to create a new local user and add them
to the power users group with a script. So, I would have a text file with
the name of all the servers that I want to have a user created and add them
to the power users group. I am really looking for a script to do this...
Thanks
Kee

"Pegasus (MVP)" wrote:

>
> "KJ" <KJ@discussions.microsoft.com> wrote in message
> news:5FFD796C-7F40-43CF-A591-8F67A3893A97@microsoft.com...
> > I need to create a local user with a password and add them to the local
> power
> > users group, does anyone have a script to do that? Thanks again for your
> > help...
>
> From the help text in generated by typing net user /?:
> The syntax of this command is:
> NET USER
> [username [password | *] [options]] [/DOMAIN]
> username {password | *} /ADD [options] [/DOMAIN]
> username [/DELETE] [/DOMAIN]
>
> From the help text generated by typing net localgroup /?:
> The syntax of this command is:
> NET LOCALGROUP
> [groupname [/COMMENT:"text"]] [/DOMAIN]
> groupname {/ADD [/COMMENT:"text"] | /DELETE} [/DOMAIN]
> groupname name [...] {/ADD | /DELETE} [/DOMAIN]
>
> Hence:
> net user JSmith SomePassword /add
> net localgroup "Power Users" JSmith /add
>
>
>
Related resources
Anonymous
May 17, 2005 12:22:56 PM

Archived from groups: microsoft.public.win2000.general (More info?)

You could do this:

@echo off
for /F %%a in (c:\Servers.txt) do psexec.exe \\%%a
\\YourServer\SomeShare\AddUser.bat

AddUser.bat is the two-line batch file I suggested in my first reply.
psexec.exe is freely downloadable from www.sysinternals.com.


"KJ" <KJ@discussions.microsoft.com> wrote in message
news:EDBA2411-3D5D-42EB-953C-7103B2E69D8B@microsoft.com...
> Thanks for the response...
> I have about 100 servers and I want to create a new local user and add
them
> to the power users group with a script. So, I would have a text file with
> the name of all the servers that I want to have a user created and add
them
> to the power users group. I am really looking for a script to do this...
> Thanks
> Kee
>
> "Pegasus (MVP)" wrote:
>
> >
> > "KJ" <KJ@discussions.microsoft.com> wrote in message
> > news:5FFD796C-7F40-43CF-A591-8F67A3893A97@microsoft.com...
> > > I need to create a local user with a password and add them to the
local
> > power
> > > users group, does anyone have a script to do that? Thanks again for
your
> > > help...
> >
> > From the help text in generated by typing net user /?:
> > The syntax of this command is:
> > NET USER
> > [username [password | *] [options]] [/DOMAIN]
> > username {password | *} /ADD [options] [/DOMAIN]
> > username [/DELETE] [/DOMAIN]
> >
> > From the help text generated by typing net localgroup /?:
> > The syntax of this command is:
> > NET LOCALGROUP
> > [groupname [/COMMENT:"text"]] [/DOMAIN]
> > groupname {/ADD [/COMMENT:"text"] | /DELETE} [/DOMAIN]
> > groupname name [...] {/ADD | /DELETE} [/DOMAIN]
> >
> > Hence:
> > net user JSmith SomePassword /add
> > net localgroup "Power Users" JSmith /add
> >
> >
> >
May 17, 2005 12:22:57 PM

Archived from groups: microsoft.public.win2000.general (More info?)

Pegasus
I was running it this way, without the network share...
psexec @c:\temp\computerslist.txt -u rspa\leek -p Pa33word -c
c:\temp\adduser.bat -d

and it seems to run fine for several workstations in HQ but remote
workstations I am having a hard time, I'll keep you posted...
But I really do appreciate your posts, now I know you can use variables
instead of @path:\textfileofservers...This should work as well, correct?
thanks again


"Pegasus (MVP)" wrote:

> You could do this:
>
> @echo off
> for /F %%a in (c:\Servers.txt) do psexec.exe \\%%a
> \\YourServer\SomeShare\AddUser.bat
>
> AddUser.bat is the two-line batch file I suggested in my first reply.
> psexec.exe is freely downloadable from www.sysinternals.com.
>
>
> "KJ" <KJ@discussions.microsoft.com> wrote in message
> news:EDBA2411-3D5D-42EB-953C-7103B2E69D8B@microsoft.com...
> > Thanks for the response...
> > I have about 100 servers and I want to create a new local user and add
> them
> > to the power users group with a script. So, I would have a text file with
> > the name of all the servers that I want to have a user created and add
> them
> > to the power users group. I am really looking for a script to do this...
> > Thanks
> > Kee
> >
> > "Pegasus (MVP)" wrote:
> >
> > >
> > > "KJ" <KJ@discussions.microsoft.com> wrote in message
> > > news:5FFD796C-7F40-43CF-A591-8F67A3893A97@microsoft.com...
> > > > I need to create a local user with a password and add them to the
> local
> > > power
> > > > users group, does anyone have a script to do that? Thanks again for
> your
> > > > help...
> > >
> > > From the help text in generated by typing net user /?:
> > > The syntax of this command is:
> > > NET USER
> > > [username [password | *] [options]] [/DOMAIN]
> > > username {password | *} /ADD [options] [/DOMAIN]
> > > username [/DELETE] [/DOMAIN]
> > >
> > > From the help text generated by typing net localgroup /?:
> > > The syntax of this command is:
> > > NET LOCALGROUP
> > > [groupname [/COMMENT:"text"]] [/DOMAIN]
> > > groupname {/ADD [/COMMENT:"text"] | /DELETE} [/DOMAIN]
> > > groupname name [...] {/ADD | /DELETE} [/DOMAIN]
> > >
> > > Hence:
> > > net user JSmith SomePassword /add
> > > net localgroup "Power Users" JSmith /add
> > >
> > >
> > >
>
>
>
Anonymous
May 17, 2005 6:12:16 PM

Archived from groups: microsoft.public.win2000.general (More info?)

I am not aware of the @ option with psexec.exe. I run version 1.31.


"KJ" <KJ@discussions.microsoft.com> wrote in message
news:C39E29FE-3F5F-4F58-BCFF-CEC259D9C5A8@microsoft.com...
> Pegasus
> I was running it this way, without the network share...
> psexec @c:\temp\computerslist.txt -u rspa\leek -p Pa33word -c
> c:\temp\adduser.bat -d
>
> and it seems to run fine for several workstations in HQ but remote
> workstations I am having a hard time, I'll keep you posted...
> But I really do appreciate your posts, now I know you can use variables
> instead of @path:\textfileofservers...This should work as well, correct?
> thanks again
>
>
> "Pegasus (MVP)" wrote:
>
> > You could do this:
> >
> > @echo off
> > for /F %%a in (c:\Servers.txt) do psexec.exe \\%%a
> > \\YourServer\SomeShare\AddUser.bat
> >
> > AddUser.bat is the two-line batch file I suggested in my first reply.
> > psexec.exe is freely downloadable from www.sysinternals.com.
> >
> >
> > "KJ" <KJ@discussions.microsoft.com> wrote in message
> > news:EDBA2411-3D5D-42EB-953C-7103B2E69D8B@microsoft.com...
> > > Thanks for the response...
> > > I have about 100 servers and I want to create a new local user and add
> > them
> > > to the power users group with a script. So, I would have a text file
with
> > > the name of all the servers that I want to have a user created and add
> > them
> > > to the power users group. I am really looking for a script to do
this...
> > > Thanks
> > > Kee
> > >
> > > "Pegasus (MVP)" wrote:
> > >
> > > >
> > > > "KJ" <KJ@discussions.microsoft.com> wrote in message
> > > > news:5FFD796C-7F40-43CF-A591-8F67A3893A97@microsoft.com...
> > > > > I need to create a local user with a password and add them to the
> > local
> > > > power
> > > > > users group, does anyone have a script to do that? Thanks again
for
> > your
> > > > > help...
> > > >
> > > > From the help text in generated by typing net user /?:
> > > > The syntax of this command is:
> > > > NET USER
> > > > [username [password | *] [options]] [/DOMAIN]
> > > > username {password | *} /ADD [options] [/DOMAIN]
> > > > username [/DELETE] [/DOMAIN]
> > > >
> > > > From the help text generated by typing net localgroup /?:
> > > > The syntax of this command is:
> > > > NET LOCALGROUP
> > > > [groupname [/COMMENT:"text"]] [/DOMAIN]
> > > > groupname {/ADD [/COMMENT:"text"] | /DELETE}
[/DOMAIN]
> > > > groupname name [...] {/ADD | /DELETE} [/DOMAIN]
> > > >
> > > > Hence:
> > > > net user JSmith SomePassword /add
> > > > net localgroup "Power Users" JSmith /add
> > > >
> > > >
> > > >
> >
> >
> >
!