BlackBerry “Domain Prep”

#BlackBerry, #Powershell

So I had a bit of brain freeze yesterday, and then it hit me.  BlackBerry needs AD SendAs permissions, but I thought I had done that!

Doh! The current place I am working has multiple AD Domains, and I done the root!  What I needed was an Exchange like domainprep to apply the permissions ..

So knocked up this.  I basically this assigns the permission to a group, so I can add and remove service accounts to it ;-)

$domains = ([System.DirectoryServices.ActiveDirectory.forest]::getcurrentforest()).domains | select name | sort name
ForEach($domain in $Domains){
$dom = $domain.name
Write-Host $dom
Add-ADPermission $dom -user “domain\Group” -AccessRights extendedright -ExtendedRight Send-As
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: