Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 12728

Powershell command to add ActiveDirectory group to site\library

$
0
0

I have searched and all I find is how to add ActiveDirectory groups to Sharepoint groups. We use only ActiveDirectory groups to give access to sites\library\lists. Is there a command that I can run to add an AD group to a site?

I tried: Set-SPUser -Identity "DOMAIN\GroupOrUser" -Web "https://SHAREPOINTDNS/SITE/SITE" -AddPermissionLevel Contribute

But that results in:

Set-SPUser : You must specify a valid user object or user identity.
    + CategoryInfo          : InvalidArgument: (:) [Set-SPUser], PSArgumentException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletSetUser

I am trying to automate this process and this is my only roadblock. Any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 12728

Trending Articles



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