Reader small image

You're reading from  Microsoft SharePoint 2010 Administration Cookbook

Product typeBook
Published inJan 2011
Reading LevelIntermediate
PublisherPackt
ISBN-139781849681087
Edition1st Edition
Languages
Right arrow
Author (1)
Peter Serzo
Peter Serzo
author image
Peter Serzo

Peter Serzo is an English major from Kent State who started his technical career with EDS out of college. 20 years later, all as a consultant, he is a national speaker regarding to SharePoint having worked at organizations of all sizes. His next challenge is to bring SharePoint to children and teach them. He has been working with SharePoint since 2003 in companies such as Microsoft, Ford, ADP, and many others throughout the United States. He is a Senior SharePoint Architect for High Monkey Consulting. The name refers to an old Jamaican proverb that means the higher up you go, the more responsible you must be; High Monkey takes pride in its accountability and excellence of work in regards to its clients' needs.
Read more about Peter Serzo

Right arrow

Adding a user via PowerShell


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.

Getting ready

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.

How to do it...

  1. 1. Click on the Start button on the web front end.

  2. 2. Under All Programs, navigate to the Microsoft SharePoint 2010 Products folder.

  3. 3. Right-click on the SharePoint 2010 Management Shell option and click Run as Administrator. The PowerShell console will appear.

  4. 4. Type the following command into the console...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Microsoft SharePoint 2010 Administration Cookbook
Published in: Jan 2011Publisher: PacktISBN-13: 9781849681087

Author (1)

author image
Peter Serzo

Peter Serzo is an English major from Kent State who started his technical career with EDS out of college. 20 years later, all as a consultant, he is a national speaker regarding to SharePoint having worked at organizations of all sizes. His next challenge is to bring SharePoint to children and teach them. He has been working with SharePoint since 2003 in companies such as Microsoft, Ford, ADP, and many others throughout the United States. He is a Senior SharePoint Architect for High Monkey Consulting. The name refers to an old Jamaican proverb that means the higher up you go, the more responsible you must be; High Monkey takes pride in its accountability and excellence of work in regards to its clients' needs.
Read more about Peter Serzo