Reputation: 1202
Can someone please confirm if this powershell command for Sharepoint 2010 does sends email when adding users to SP groups. I cannot test it out right now so just confirming whether it does which if is the case how can I not make it send email to the user when being added to the group.
Comparing this in the UI when you add user to the group there is a default check box for sending email to users.
Set-SPUser -Identity 'Contoso\jdow' -Web http://test -AddPermissionLevel "Contributor"
Thanks
Upvotes: 1
Views: 2277
Reputation: 6592
The code you supplied doesn't add a user to a SharePoint group. It gives the user contributor access to a site. By default, this will not send an email. You would have to write your powershell Script to do send the email.
To add a user to a group, you would do this
Set-SPUser -Identity 'Contoso\jdow' -Web http://test -Group 'groupname'
Upvotes: 0