Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Powershell and Client Object Model - no error thrown if user is added more than once to same site or group

$
0
0

Hello All -

I am trying to add a user to a SharePoint site using PowerShell like below:-

New-SPUser -UserAlias MyDomain\jan20a -Web http://SPServer/sites/MySite

If I execute the above more than once, SharePoint does not throw that user already exists or something. This is not the same behavior in AD/Exchange PowerShell cmdlets.

Also, even the client object model behaves the same way.

Another interesting thing I noticed, I tried to remove a user from group in which the user was not part of it at all and still no error..!!

Looks like SharePoint does not care of invalid input and just ignores it.

Can anyone please confirm this and also the reason behind it ?


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>