This script will ensure reader permissions to specified user across site collection.
Keep in mind: This is not the right way to deal with permissions issues!
$site = Get-SPSite -Identity
"http://mysite/"
$user = Get-SPUser -Identity
"mydomain\myuser"
-Web $site.RootWeb
$assignment = New-Object Microsoft.SharePoint.SPRoleAssignment($user)
$role = $site.RootWeb.RoleDefinitions[[Microsoft.SharePoint.SPRoleType]::Reader]
$assignment.RoleDefinitionBindings.Add($role);
foreach
($web
in
$site.AllWebs) {
if
($web.HasUniquePerm) {
$web.RoleAssignments.Add($assignment)
}
Ed Price - MSFT edited Revision 2. Comment: Title, tags
Craig Lussier edited Original. Comment: added en-US to tags and title
Whilst this might not be the right way to add individual users, I can see a change to this being quite useful for adding users in bulk.
Have you considered adding this article to the Galleries?