When SharePoint is initially set up, many users may need to be added to SharePoint groups for a new site. The quickest and most efficient way to accomplish this is through PowerShell and scripting.
The following recipe shows how to add a user to a SharePoint group via PowerShell.
The user must have access to one of the servers running PowerShell 2.0 and be a member of the
WSS_ADMIN_WPG on the local computer. You must also be a member of the
SharePoint_Shell_Access role on the configuration database (SQL Role).
There must be an existing site, a SharePoint group called
TestAddUser, and a user named
jdoe set up in the active directory.