Here's the PowerShell:
<# Instructions:
Create a Users.txt
in this format (all in one column):
i:0#.w|domain\aparnis
i:0#.w|domain\candlandan
i:0#.w|domain\stivj001
i:0#.w|domain\attaj001
i:0#.w|domain\marchorovitz
etc
Populate the
variables
#>
## Adding snap-in
Add-PSSnapin
"Microsoft.SharePoint.PowerShell"
# Variables
$group =
"External Readers"
$siteCollUrl =
"https://extranet.domain/groups/Board-of-Supervisors/"
$loc =
"C:\scripts"
$Users = Get-Content
"$loc\Users.txt"
$web = Get-SPWeb
-identity $siteCollUrl
# code
foreach ($User in
$Users) {
$web.EnsureUser($User)
Set-SPUser -Identity $User -Web
$siteCollUrl -Group $group
}
# Dispose the web
object
$Web.Dispose()