SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have used following PS Script to add a user to a group on a web. I didn't any error but I cannot find the user in the group or anywhere else. Thanks for your advice.

New-SPUser "wm\test2" -Web "http://mydomain/sites/s1" -Group "reader on s1"
share|improve this question
up vote 2 down vote accepted

Try this: Set-SPUser -Identity 'fun/factory' -Web http://someserver -Group 'Name of group'

share|improve this answer
thanks it is right. – Medes Nov 21 '12 at 10:45

I think you need to do a web.Update after adding a user.

(I'm not a machine with SharePoint installed at the moment to test, sorry)

share|improve this answer
I run web.Update() still not working – Medes Oct 26 '12 at 15:34

What happens when you try to get the user in PowerShell?

Get-SPUser "wm\test2" –Web "http://mydomain/sites/s1"

Furthermore, does the user already exist in your domain?

share|improve this answer
When I run your script I get userLogin and DisplayName with wm\test2, Yes the user is already exist in my domain. – Medes Oct 26 '12 at 15:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.