Archive

Archive for May, 2014

PowerShell Commands which help to troubleshoot Exchange Server DAG Cluster


 

Get Exchange services status

Get-services *exchange*

 

Get variety of configuration settings, status, and other information about a database availability group (DAG)

Get-DatabaseAvailabilityGroup –Identity <DAGName> | FL

 

Check all aspects of replication and replay, or to provide status for a specific Mailbox server in a database availability group (DAG)

Test-ReplicationHealth

 

Administer a node in a server cluster or to view its status

Cluster node /status

 

Check the current activation policy on the server

Get-MailboxServer <MailBoxServerName> | fl Name,DatabaseCopyAutoActivationPolicy

 

Find the owner of the cluster core resources group

cluster.exe <DAGFQDN> group

 

Verifying the file share witness server

Get-databaseavailabilitygroup | FL Witness*

 

Retrieve DAG status

Get-DatabaseAvailabilityGroup -Identity DAG –Status

 

Listing status for all available resources

Cluster.exe <DAGFQDN> res

 

Listing status for all available resource groups

Cluster.exe <DAGFQDN> group

 

Bringing resource group ‘Available Storage’ online

Cluster group "Available Storage" /online

 

Get which server is holding PAM

Get-DatabaseAvailabilityGroup -Identity DAG -Status | fl name,primaryactivemanager

 

Move cluster group

Cluster group "Cluster Group" /MoveTo:<DAG Server Name>

 

block all databases hosted on a server from activating.

Set-MailboxServer –identity MAILBOXSERVER –DatabaseCopyAutoActivationPolicy blocked

 

Revert the above command

Set-MailboxServer –identity MAILBOXSERVER –DatabaseCopyAutoActivationPolicy Unrestricted

Categories: Exchange

"Couldn’t resolve the user or group "valakulu.net/Microsoft Exchange Security Groups/Discovery Management."


 

images

 

While I was upgrading one of my client’s Exchange 2010 Mailbox servers from SP1 to SP3 I came across with below error. I thought to share this with the community as I had to put a additional effort and time to resolve it.

You may get the below error when you upgrading your Exchange Mailbox Service Packs or installing Exchange 2013 CU1.

Mailbox Role

Failed

Error:

The following error was generated when "$error.Clear();

$name = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxUniqueName;

$dispname = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxDisplayName;

$dismbx = get-mailbox -Filter {name -eq $name} -IgnoreDefaultScope -resultSize 1;

if( $dismbx -ne $null)

{

$srvname = $dismbx.ServerName;

if( $dismbx.Database -ne $null -and $RoleFqdnOrName -like "$srvname.*" )

{

Write-ExchangeSetupLog -info "Setup DiscoverySearchMailbox Permission.";

$mountedMdb = get-mailboxdatabase $dismbx.Database -status | where { $_.Mounted -eq $true };

if( $mountedMdb -eq $null )

{

Write-ExchangeSetupLog -info "Mounting database before stamp DiscoverySearchMailbox Permission…";

mount-database $dismbx.Database;

}

$mountedMdb = get-mailboxdatabase $dismbx.Database -status | where { $_.Mounted -eq $true };

if( $mountedMdb -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 $dismbx -User $dmRoleGroup.Identity -AccessRights FullAccess -DomainController $RoleDomainController -WarningAction SilentlyContinue;

}

}

}

}

" was run: "Couldn’t resolve the user or group "valakulu.net/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 "valakulu.net/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.

Click here for help… http://technet.microsoft.com/en-US/library/ms.exch.err.default(EXCHG.141).aspx?v=14.3.123.3&e=ms.exch.err.Ex88D115&l=0&cl=cp

 

Solution:

 

Delete DiscoverySearchMailbox user from Active Directory Users Organization Unit or Disable the DiscoverySearchMailbox with below command,

 

Disable-Mailbox “DiscoverySearchMailbox {D919BA05-46A6-415f-80AD-7E09334BB852}”

 

Run your SP upgrade again, this time it will not give any errors and installation will be successful.

 

To recreate the deleted DiscoverySearchMailbox User, Run below command on Active Directory Domain Controller by inserting the installed Exchange SP media

 

Setup /PrepareAD

 

Once create the user, it is time to enable the DiscoverySearchMailbox on Mailbox server. Run below command to enable the Mailbox

 

Enable-Mailbox “DiscoverySearchMailbox {D919BA05-46A6-415f-80AD-7E09334BB852}” -Arbitration

Categories: Exchange