Add users to SharePoint using PowerShell

By | February 24, 2016


Add-PSSnapin "Microsoft.Sharepoint.PowerShell"
$web = Get-SPWeb "https://Marketing"
$userObject = $web.EnsureUser("ABC\a.b")
$group = $web.SiteGroups["Site Members"]
$group.AddUser($userObject)