Mailbox Role
Failed
Error:
The following error was generated when "$error.Clear();
$lgUsers = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxUniqueName;
$showname = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxDisplayName;
$shmbx = get-mailbox -Filter {name -eq $lgUsers} -IgnoreDefaultScope -resultSize 1;
if( $shmbx -ne $null)
{
$servname = $shmbx.ServerName;
if( $shmbx.Database -ne $null -and $RoleFqdnOrName -like "$servname.*" )
{
Write-ExchangeSetupLog -info "Setup DiscoverySearchMailbox Permission.";
$mntMdb = get-mailboxdatabase $shmbx.Database -status | where { $_.Mounted -eq $true };
if( $mntMdb -eq $null )
{
Write-ExchangeSetupLog -info "Mounting database before stamp DiscoverySearchMailbox Permission...";
mount-database $shmbx.Database;
}
$mntMdb = get-mailboxdatabase $shmbx.Database -status | where { $_.Mounted -eq $true };
if( $mntMdb -ne $null )
{
$dmRoleGroupGuid = [Microsoft.Exchange.Data.Directory.Management.RoleGroup]::DiscoveryManagementWkGuid;
$dmRoleGroup = Get-RoleGroup -Identity $dmRoleGroupGuid -DomainController $RoleDomainController -ErrorAction:SilentlyContinue;
if( $dmRoleGroup -ne $null )
{
Add-MailboxPermission $shmbx -User $dmRoleGroup.Identity -AccessRights FullAccess -DomainController $RoleDomainController -WarningAction SilentlyContinue;
}
}
}
}
" was run: "Couldn't resolve the user or group "englending.mrtg/Microsoft Exchange Security Groups/Discovery Management." If the user or group is a foreign forest principal, you must have either a two-way trust or an outgoing trust.".
Couldn't resolve the user or group "englending.mrtg/Microsoft Exchange Security Groups/Discovery Management." If the user or group is a foreign forest principal, you must have either a two-way trust or an outgoing trust.
The trust relationship between the primary domain and the trusted domain failed.
Bookmarks