Thursday, 28 January 2021

Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Unable to relay for nawaz@domain.com

 Issue Detail:

Was using the following powershell command to send the email from the IIS/SMTP relay

Send-MailMessage -From "nawaz@domain.com" -to "khan@domain.com" -Cc "ali@domain.com" -Subject "SUBJECT TEST with no cred" -Body "BODY Test for the email" -SmtpServer SMTPSERVERNAME -Credential USER -usessl

but was unable to do so, getting the following error.   

Error:

Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Unable to relay for nawaz@domain.com

Solution:

Go to IIS and right click on your SMTP relay-->Properties-->Access tab-->Relay--->add the IP from where you are trying to send the emails

Send-MailMessage : Unable to send to all recipients

Issue Detail:

Was using the following powershell command to send the email from the IIS/SMTP relay

Send-MailMessage -From "nawaz@domain.com" -to "khan@domain.com" -Cc "ali@domain.com" -Subject "SUBJECT TEST with no cred" -Body "BODY Test for the email" -SmtpServer SMTPSERVERNAME -Credential USER -usessl

but was unable to do so, getting the following error.   

Error:

Send-MailMessage : Unable to send to all recipients

Solution:

Go to IIS and right click on your SMTP relay-->Properties-->Access tab-->Relay--->add the IP from where you are trying to send the emails

Thursday, 14 January 2021

Resolved: (2148074274) The target principal name is incorrect

 The issue, reason and solution was here in below article. 

 Error (Target Principal Name is incorrect) when manually replicating data between domain controllers - Windows Server | Microsoft Docs

and explanation

Troubleshoot AD replication error 2146893022 - Windows Server | Microsoft Docs


Resolutions steps.

First we have to identify the PDC emulator with the following command.

using the command prompt with admin credentials.

1:

netdom query fsmo

2:

On The Faulty DC , disable the Kerberos Key Distribution Center service (KDC)

and restart the Faulty DC

3:

After restart, with Netdom reset the secure channels between this faulty DC and PDC.
To do so, Run this command in command prompt of the faulty DC.

netdom resetpwd /server: DC /userd: domain\admin /passwordd: *

Note: Where server is the name of the PDC, not the faulty DC.

Restart the faulty DC again.

Start/restart the KDC service (net start KDC)

Force replication again via repadmin /syncall /APed


Monday, 30 November 2020

Unable to connect Microsoft Teams with powershell with MFA enabled user

Issue:

while trying to connect Microsoft Teams with MFA enabled user through powershell. 

Getting the following error in powershell.


"Connect-MicrosoftTeams : One or more errors occurred.: AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '00000002-0000-0000-c000-000000000000'"  

Solution:

There may be multiple solutions but one is to user the Connect-MicrosoftTeams without -Credential parameter as below.

Import-Module MicrosoftTeams

Connect-MicrosoftTeams

Tuesday, 24 November 2020

Addresslist and resource mailboxes in exchange 2016 and exchange online Hybrid environment


Requirement:

In Hybrid environment to create an address list and add resource/Room mailboxes, should be visible/available to both on premise and cloud users in their address book.

Issue:

A single address list (created on premise OR on exchange online) would not be enough. as if created on exchange on premise then will be only visible to on premise users 

OR

if created on Exchange online then will be only visible to Exchange online users.

Same is the case with resource/room mailboxes, if created on exchange on premise then will be only visible to on premise users OR if created on Exchange online then will be only visible to Exchange online.

Solution:

i had to create 2 address lists with the same name, one on Exchange on premise and one on Exchange online.

the case with room/resource mailboxes was a bit change, even that the on premise room mailboxes were not appearing to the cloud users in their address book but while scheduling the meeting they were able to see the free/busy of  the on premise resource/room mailboxes.

same was the case with exchange online migrated room mailboxes,  were not appearing to the on premise users in their address book but while scheduling the meeting they were visible and their free/busy were also appearing to the on premise users.

An email was getting quarantined even the sender was whitelisted through office 365 rule

An email was getting quarantined even the sender was whitelisted through office 365 rule.

After looking into the header of the quarantined email found the "SFV:BLK" which means the sender was blocked by the recipient as per (Anti-spam message headers - Office 365 | Microsoft Docs).

So when to the effected user outlook and then 

on the Home tab, then "Junk Email Options" then "Blocked senders" tab, the quarantined email sender was added there. so after removing from there, next time the email was not quarantined and was successfully delivered. 


Tuesday, 20 October 2020

Solved: Unable to activate Windows server 2016 though GUI. getting error "This Edition Cannot Be Upgraded"

Issue:
1:
Windows server 2016 was rebooting again and again
2:
Unable to activate Windows server 2016 "Microsoft Windows Server 2016 Standard Evaluation" Edition, though GUI to Standard edition. getting error "This Edition Cannot Be Upgraded"

Solution:

Dism /online /Set-Edition:ServerStandard /AcceptEula /ProductKey:12345-qwert-asdfg-zxcvb-qazws

Other findings:
  1. The server was running in VMWare environment.
  2. The server was rebooting again and again.
  3. After looking into the event viewer for the reboot cause found the error "The kernel power manager has initiated a shutdown transition.  Shutdown Reason: Kernel API"
  4. The Dism /online set-edition:serverstand.... command took more than 30 minutes to complete
  5. The server rebooted more than one time after running the DISM command.
  6. the cleaning up process took few hours to complete