Monday 25 May 2020

Database Status Passive Failed and Suspended, Content index state: Suspended in exchange server 2016

I have Exchange Server 2016 DAG, consist of 2 PR and 1 DR servers. the PR DBs status was Healthy but the DR DBs were in Status Passive Failed and Suspended, Content index state: Suspended
Tried different solutions to reseed but know luck.
Solution:
there are two solutions, which you may try.
1:
From ECP, instead of Resuming the copy, tried to Update the effected copy, which recreated the copy and the issue was resolved.

2:
From Exchange power shell you may use
Update-MailboxDatabaseCopy -Identity "DBname\ServerName" -SafeDeleteExistingFiles

More Detail:

I looked into the path on the effected server/database and the database file (venDB2.edb) was not found.
I also tried to update the effected copy with -catalogonly switch as mentioned below but no luck as were getting the given warning.
.
[PS] C:\Windows\system32>Get-MailboxDatabaseCopyStatus VenDB2\XMBS2 | Update-MailboxDatabaseCopy -CatalogOnly
Confirm
Are you sure you want to perform this action?
Seeding database copy "VenDB2\XMBS2".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): y
WARNING: Seeding of content index catalog for database 'VenDB2' failed. Please verify that the Microsoft Search
(Exchange) and the Host Controller service for Exchange services are running and try the operation again. Error: There
was no endpoint listening at
net.tcp://localhost:3863/Management/SeedingAgent-78CFB425-GE76-4B17-9B48-2E3BE436368812/Single that could accept the
message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more
details..

So after running
Update-MailboxDatabaseCopy -Identity "DBname\ServerName" -SafeDeleteExistingFiles
it delete the already created logs file and create the logs files again and create the DB file as well.


P.S:
It may take some long time, depending on the size of database size, as both the database copy and the content index catalog copy will be recreated/copied to the server.
So you should wait until all of the files are copied, you can monitor in the ECP console.
or you can use the following command.
Get-MailboxDatabaseCopyStatus VenDB2\XMBS2


Note: Posts are provided “AS IS” without warranty of any kind, always based on my experience and findings in my routine tasks in my production environment.



Saturday 23 May 2020

How to export all member of a group in AD with their specific attributes

How to export all member of a group in AD and their specific attributes

PS C:\Windows\system32>$group = "ABCGroup"

PS C:\Windows\system32> Get-ADGroup $group -Properties Member | Select-Object -Expand Member | Get-ADUser -Property * | ft company, whenCreated, lastLogonTimestamp, mobile > C:\ABCGroup.CSV

Monday 11 May 2020

How to update meta data in a Relying Party Trust in ADFS

First you should note the name of the Relying Party Trust with the following command.

PS C:\Windows\system32>get-ADFSRelyingPartyTrust | ft name

once you get the name of the Relying Party Trust which you want to update, use the following command


PS C:\Windows\system32> update-ADFSRelyingPartyTrust -targetName "Planning & Budgeting " -MetadataFile "C:\Users\adc\Desktop\DataCloud.xml"