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.