Use STSADM Command to add users
Hi, How do I add users in bulk which are in an excel file to Sharepoint using STSADM command?
May 11th, 2010 9:06am

Well you could start by ensuring your excel file was in suitable format with the STSADM command ADDUSER and then convert it to a batch file. stsadm -o adduser -url http://yoursiteurl -userlogin domain\ADGroupName -group "web site Members" -useremail ADGroupName@domain.com -username "ADGroupName" One thing to consier though is if you should add users to an AD group or to Sharepoint as a local account. AD is really the correct way to go on this. An easier and more repeatable approach would probably be to use powershell to parse the CSV and then execute the STSADM command on each line, of course you'll need to lear a bit of powershell - but if your administering MOSS you should be doing this anyway. Heres an example of parsing a CSV and an example fo adding users to AD from a csv file. http://www.hanselman.com/blog/ParsingCSVsAndPoorMansWebLogAnalysisWithPowerShell.aspx http://www.wapshere.com/missmiis/powershell-retrieving-data-from-excel http://techstarts.wordpress.com/2007/02/21/bulk-user-creation-using-powershell-2/ Good luck. Regards John TImney http://www.johntimney.com.blog
Free Windows Admin Tool Kit Click here and download it now
May 11th, 2010 2:25pm

Just a suggestion, adding the users to a sharepoint site can be achived through SPWeb.EnsureUser() method - Checks whether the specified login name belongs to a valid user of the Web site, and if the login name does not already exist, adds it to the Web site. Example: SPUser user = web.EnsureUser("ValidDomainUserID"); - mention along with domain name web.Groups["MySharePointGroup"].AddUser(user);
May 11th, 2010 3:41pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics