none
new-spuser not working properly in powershell RRS feed

  • Question

  • I am trying to add sp user in a sharepoint group by using new-spuser,

    But sometimes it is not working properly. 1st time adding is done properly, but for testing purpose i delete & then trying to add same users , though the new-spuser line is getting executed properly  in powershell ( checked that while debugging) users are not getting added at all !

    statement i use :

      new-spuser -UserAlias $UserName -Web $web -Group $group -ErrorAction Stop   

    Any help on this please ? Thanks in advance !

    Regards,

    Mohor

    P.S.

    Have tried with this statement also :

    new-spuser -UserAlias $UserName -Web $web -Confirm -Group $g -ErrorAction Stop

    still not working :( :( :(

    • Edited by Mind2013 Wednesday, September 25, 2013 6:22 AM
    Wednesday, September 25, 2013 5:41 AM

Answers

  • @Mind2013,

    can you include the errors you are getting when you are unsuccessful.  Does the command succeed?  Also, when you delete and retry, what your process there?  Are you using PowerShell?  Also, are you using the same account every time you run the command?

    Tuesday, October 1, 2013 4:51 PM

All replies