|
windows
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Adding an user to a remote localgroup by scriptingI am running a small network made up of XP Pro computers (no domain).
I can add an user to a localgroup on a remote machine via the "Computer management" console, but I could not find any way of accomplishing this task through the NET command or scripting. Any suggestion? Thanks in advance. In news:AE1D1272-9E44-4BE8-A3DA-13446D94E0C1@microsoft.com, pnunbe <pnu***@discussions.microsoft.com> typed:> I am running a small network made up of XP Pro computers (no domain). net localgroup ?> I can add an user to a localgroup on a remote machine via the > "Computer management" console, but I could not find any way of > accomplishing this task through the NET command or scripting. > Any suggestion? > Thanks in advance. http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_localgroup.mspx?mfr=true The URL you suggested does not explain how I can perform the operation on
another computer in the network when no domain controller is present. Thanks anyhow. Show quoteHide quote "Lanwench [MVP - Exchange]" wrote: > In news:AE1D1272-9E44-4BE8-A3DA-13446D94E0C1@microsoft.com, > pnunbe <pnu***@discussions.microsoft.com> typed: > > I am running a small network made up of XP Pro computers (no domain). > > I can add an user to a localgroup on a remote machine via the > > "Computer management" console, but I could not find any way of > > accomplishing this task through the NET command or scripting. > > Any suggestion? > > Thanks in advance. > > net localgroup ? > > http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_localgroup.mspx?mfr=true > > > In news:16CC9DF6-EDE5-4CF2-8C57-308BB8DE9E4F@microsoft.com, pnunbe <pnu***@discussions.microsoft.com> typed:> The URL you suggested does not explain how I can perform the You can use the command in a batch file - run it on each computer as a > operation on another computer in the network when no domain > controller is present. Thanks anyhow. startup script as you like. Without a domain, a lot of things are painful - you don't get many options for centralized admin. Show quoteHide quote > > "Lanwench [MVP - Exchange]" wrote: > >> In news:AE1D1272-9E44-4BE8-A3DA-13446D94E0C1@microsoft.com, >> pnunbe <pnu***@discussions.microsoft.com> typed: >>> I am running a small network made up of XP Pro computers (no >>> domain). I can add an user to a localgroup on a remote machine via >>> the "Computer management" console, but I could not find any way of >>> accomplishing this task through the NET command or scripting. >>> Any suggestion? >>> Thanks in advance. >> >> net localgroup ? >> >> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_localgroup.mspx?mfr=true That's OK, but how do you explain that I can perform this task via the
'Computer management' console? I also tried to use the NetLocalGroupAddMembers API in a VB6 program, but I get error 1387 (ERROR_NO_SUCH_MEMBER). Here is my code: Declare Function NetLocalGroupAddMembers Lib "netapi32" (lpServer As Byte, lpGroup As Byte, ByVal lLevel As Long, lpBuffer As Byte, ByVal totalentries As Long) As Long Private Sub Command1_Click() Dim result As Integer Dim group() As Byte Dim Server() As Byte Dim User() As Byte Server = "\\P866" & vbNullChar group = "P866\Prova" & vbNullChar User = "P866\Silvia" & vbNullChar result = NetLocalGroupAddMembers(Server(0), group(0), 3, User(0), 1) If result <> 0 Then MsgBox result End If End Sub Sorry for pestering you, but I really need this capability. Show quoteHide quote "Lanwench [MVP - Exchange]" wrote: > In news:16CC9DF6-EDE5-4CF2-8C57-308BB8DE9E4F@microsoft.com, > pnunbe <pnu***@discussions.microsoft.com> typed: > > The URL you suggested does not explain how I can perform the > > operation on another computer in the network when no domain > > controller is present. Thanks anyhow. > > You can use the command in a batch file - run it on each computer as a > startup script as you like. > Without a domain, a lot of things are painful - you don't get many options > for centralized admin. > > > > > > "Lanwench [MVP - Exchange]" wrote: > > > >> In news:AE1D1272-9E44-4BE8-A3DA-13446D94E0C1@microsoft.com, > >> pnunbe <pnu***@discussions.microsoft.com> typed: > >>> I am running a small network made up of XP Pro computers (no > >>> domain). I can add an user to a localgroup on a remote machine via > >>> the "Computer management" console, but I could not find any way of > >>> accomplishing this task through the NET command or scripting. > >>> Any suggestion? > >>> Thanks in advance. > >> > >> net localgroup ? > >> > >> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_localgroup.mspx?mfr=true > > > > In news:E525824D-D6B8-4AC3-B77C-300B4EAECFC5@microsoft.com, pnunbe <pnu***@discussions.microsoft.com> typed:> That's OK, but how do you explain that I can perform this task via the I have no idea. I read your question as meaning you wanted to know how to > 'Computer management' console? script the addition of a user to a local group, rather than using the computer management MMC. Show quoteHide quote > I also tried to use the NetLocalGroupAddMembers API in a VB6 program, Sorry I can't help further; I don't know how to do this in VB. This may not > but I get error 1387 (ERROR_NO_SUCH_MEMBER). > Here is my code: > > Declare Function NetLocalGroupAddMembers Lib "netapi32" (lpServer As > Byte, lpGroup As Byte, ByVal lLevel As Long, lpBuffer As Byte, ByVal > totalentries As Long) As Long > > Private Sub Command1_Click() > Dim result As Integer > Dim group() As Byte > Dim Server() As Byte > Dim User() As Byte > Server = "\\P866" & vbNullChar > group = "P866\Prova" & vbNullChar > User = "P866\Silvia" & vbNullChar > result = NetLocalGroupAddMembers(Server(0), group(0), 3, User(0), 1) > If result <> 0 Then > MsgBox result > End If > End Sub > > Sorry for pestering you, but I really need this capability. be the best group for your question - you may wish to post in a VB group. Good luck! Show quoteHide quote > > "Lanwench [MVP - Exchange]" wrote: > >> In news:16CC9DF6-EDE5-4CF2-8C57-308BB8DE9E4F@microsoft.com, >> pnunbe <pnu***@discussions.microsoft.com> typed: >>> The URL you suggested does not explain how I can perform the >>> operation on another computer in the network when no domain >>> controller is present. Thanks anyhow. >> >> You can use the command in a batch file - run it on each computer as >> a startup script as you like. >> Without a domain, a lot of things are painful - you don't get many >> options for centralized admin. >> >> >>> >>> "Lanwench [MVP - Exchange]" wrote: >>> >>>> In news:AE1D1272-9E44-4BE8-A3DA-13446D94E0C1@microsoft.com, >>>> pnunbe <pnu***@discussions.microsoft.com> typed: >>>>> I am running a small network made up of XP Pro computers (no >>>>> domain). I can add an user to a localgroup on a remote machine via >>>>> the "Computer management" console, but I could not find any way of >>>>> accomplishing this task through the NET command or scripting. >>>>> Any suggestion? >>>>> Thanks in advance. >>>> >>>> net localgroup ? >>>> >>>> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_localgroup.mspx?mfr=true
Different Folders visible for Laptop at Work
Internal error URGENT Folders on NTWK Drives ReadOnly -Can't Change Three network cards (eth, wifi, ieee1394) an nexthop troubles. Slow Gigabit network I have Outlook Express running on on PC and the laptop. Home Network/Work Group Computer browser service won't run. Problem with VPN and Virtual Machine Sharing dial up over home network |
|||||||||||||||||||||||