Re: Adding domain users to a site document library from command-li

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Salva

You asked for some sample code to add users to the group.

The following ldifde script will do the job much more simply than dot net

you'll need to change the dn of the group to reflect the location of the
group in your own AD, likewise for the users.
Create a file with the following in it (not the dash on the last line is
important). call the file addmembers.ldf.

There's tonnes of documentation on the web on ldifde.

dn: CN=Test Group 1,OU=myou, DC=DEV,DC=test,DC=COM

changetype: modify

replace: member

member: CN=user1,OU=myou,DC=DEV,DC=test,DC=COM

member: CN=user2,OU=myouDC=DEV,DC=test,DC=COM

-

use this command line to run it (not the location of the ldifde program may
vary - if it's not on your windopws server already, you can download it free
form microsoft)

LDIFDE.exe -b adminaccount DC=DEV,DC=test,DC=COM * -i -f "AddMembers.ldf" -j
"logs\ADGroupsImport_AddMembers"




"salva.gomez@xxxxxxxxx" wrote:

Hi Indigenous
can you send me this example to my mail address?

Thanks a lot

Salva.


Indigenous wrote:

You could just add an NT security group account to the library then you
problem is simply one adding users to an NT group (outside of sharepoint). I
suspect there are plenty of examples of how to script that on the web. The
only example i have is using .NET and the DirectoryServices assembly.

"salva.gomez@xxxxxxxxx" wrote:

Hi
i'm looking for an script or something to add users to document
libraries stored in sites.
Anyone know how to do it? I have one script made for SPS2001 to do
this, but for SPS2003 i dont know if it can be possible ( i hope it :D
)

I want to use it to add permissions in a batch process (quickly than
GUI...)

Thanks

Salva.




.



Relevant Pages

  • Re: How to export empty fields in LDIFDE or CSVDE?
    ... I can write a Perl script to process the LDFIDE output. ... LDIFDE prefixes each exported attribute with the name of the attribute ... I'll find another way to display the non-standard attributes to the ... the other attributes are missing for that object. ...
    (microsoft.public.windows.server.active_directory)
  • RE: Get E-mail address from VbScript
    ... we can use the LDIFDE and CSVDE.EXE to extract data from Active ... The following script is hecking for members of a Security Group "Bob Mail ... Copyright Microsoft Corporation 1996-2001. ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.win2000.active_directory)
  • Re: How to search a VERY large text file
    ... Took me awhile to find my file and script, ... The file is the output from ldifde and takes up ... specific users from an ldifde output file created before the accident ... I could point the user object back to their ...
    (microsoft.public.scripting.vbscript)
  • Re: import export of AD objects in different domain.
    ... seattel administrator sends us the .LDF file (using LDIFDE)which contains users & groups of there domain. ... format and then You have to make a script which will add to Your domain contatcs based on this file- Of course You can read it from LDIF files too but it requires more work on the scripting. ...
    (microsoft.public.win2000.active_directory)
  • Re: CopyHere
    ... You explained why the script would continue if it was unable to copy ... The question was asking for help on a CopyHere command which was not ... documentation seems to say it should. ... 'Backup User Favorites ...
    (microsoft.public.scripting.vbscript)