Re: Create windows user account

From: Alon Bar-Lev (alon_at_xor-t.com)
Date: 03/24/05


Date: Thu, 24 Mar 2005 19:02:33 +0200

Yes, the second is closer, but it uses LDAP provider...
In order to handle local groups you should use WinNT provider.

Best Regards,
Alon Bar-Lev.

"Sam Hobbs" <samuel@social.rr.com_change_social_to_socal> wrote in message
news:u5IbuYBMFHA.508@TK2MSFTNGP12.phx.gbl...
> Is one of the following an example? There is a big difference between the
> two but the second one is a closer match to your sample.
>
> http://www.microsoft.com/technet/scriptcenter/scripts/ad/computer/cptrvb02.mspx
> http://www.microsoft.com/technet/scriptcenter/scripts/ad/users/manage/usmgvb05.mspx
>
>
> "Alon Bar-Lev" <alon@xor-t.com> wrote in message
> news:e4oUDFyLFHA.3988@tk2msftngp13.phx.gbl...
>> You can use ADSI,
>> Try something like:
>>
>> I am not stong in VB... :(
>>
>> Dim computer
>> Dim user
>> Dim group
>>
>> set computer = GetObject ("WinNT://.")
>>
>> Set user = computer.Create ("user", "user1")
>> user.SetInfo ()
>>
>> Set group = GetObject ("WinNT://./Administratr,group")
>> group.Add (user.AdsPath)
>> group.SetInfo ()
>>
>> Best Regards,
>> Alon Bar-Lev
>>
>
>



Relevant Pages

  • Re: nested group not getting mapped drive
    ... The script maps drivers and ... The WinNT provider is blind to the hierarchy of AD, ... It does recognize nested local groups. ... script that maps drives and printers according to group membership linked ...
    (microsoft.public.windows.server.scripting)
  • Re: [openib-general] Re: [PATCH 10/13] [RFC] ipath verbs, part 1
    ... >> First half of ipath verbs driver ... Basic question is "where is ... I'll take a closer look. ... Regards, ...
    (Linux-Kernel)
  • Re: Question; Macro lens
    ... > Majid Khosrow wrote: ... >> Regards. ... > How much closer do you need to get. ... Prev by Date: ...
    (rec.photo.digital)
  • Re: Fastcode MM B&V 1.1.0
    ... I better take a closer look next time;-) ... > Best regards ... version of his SystemInfoUnit and I'll post a test app that Daniel can ... Bruce McGee ...
    (borland.public.delphi.language.basm)
  • Re: top and ps fail on 6.0-BETA5
    ... > Best regards, ... > The mountain looks closer than it is. ...
    (freebsd-questions)

Quantcast