none
Changing a Default DNS message with Powershell fails with the message WARNING: The command completed successfully but no settings of 'en\Internal\5.7.1' have been modified. RRS feed

  • Question

  • I'm trying to change a default DNS message:

    en\internal\5.7.1

    From: "Your message wasn't delivered due to a permission or security issue. It may have been rejected by a moderator, the address may only accept email from certain senders, or another restriction may be preventing delivery.

    To: "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    I'm in PowerShell and used the command Set-SystemMessage en\internal\5.7.1 -Text "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    But I receive the message:  WARNING: The command completed successfully but no settings of 'en\Internal\5.7.1' have been modified.

    Friday, December 6, 2019 7:38 PM

Answers

  • Hi MickeyHey,
    I’ve found that your issue happens when the text in New-SystemMessage is same as in Set-SystemMessage, try to type in different words in Set-SystemMessage.
    Here is test in my lab:

    In addition, "The operation couldn't be performed because object..."  results from you did not run the correct command, it should be:

    $Perms = Get-ManagementRole -Cmdlet Set-SystemMessage

    $Perms | foreach {Get-ManagementRoleAssignment -Role $_.Name -Delegating $false | Format-Table -Auto Role,RoleAssigneeType,RoleAssigneeName}


    Regards,

    Eric Yin


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Yes, I already mentioned that.
    • Marked as answer by MickeyHey Friday, December 13, 2019 2:28 PM
    Thursday, December 12, 2019 11:51 AM
    Moderator

All replies

  • As per the error, it clearly say the email is incorrect that you entered. Check and verify that email.

    and Check the permission for you to do this

    Saturday, December 7, 2019 9:26 AM
  • I'm trying to change a default DNS message:

    en\internal\5.7.1

    From: "Your message wasn't delivered due to a permission or security issue. It may have been rejected by a moderator, the address may only accept email from certain senders, or another restriction may be preventing delivery.

    To: "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    I'm in PowerShell and used the command Set-SystemMessage en\internal\5.7.1 -Text "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    But I receive the message:  WARNING: The command completed successfully but no settings of 'en\Internal\5.7.1' have been modified.

    You can modify custom system messages , not the built-in default ones. So create a new one and you can

    modify that one if necessary.

    https://docs.microsoft.com/en-us/exchange/mail-flow/non-delivery-reports-and-bounce-messages/ndr-procedures?view=exchserver-2019

    Saturday, December 7, 2019 1:36 PM
    Moderator
  • Hi MickeyHey,
    Set-SystemMessage cmdlet is used to modify custom system messages. Have you run “new-systemmessage ” before?
    Here is an example :

    New-SystemMessage -DSNCode 5.1.2 -Internal $true -Language En -Text 'You tried to send a message to a disabled mailbox.'

    For more information about managing DSN message, refer to: https://docs.microsoft.com/en-us/exchange/manage-dsn-messages-exchange-2013-help


    Regards,

    Eric Yin


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Monday, December 9, 2019 10:03 AM
  • The message I am attempting to change is en\internal5.7.1

    and the text that my new message will contain is "The email address you entered..."email address

    I have checked permissions and I Have permissions for the "Set-SystemMessage" commandlet

    $Perms = Get-ManagementRole  -Cmdlet Set-SystemMessage

    but when I include the rest of the parameters I wish to modify I receive:

    $Perms = Get-ManagementRole  -Cmdlet Set-SystemMessage en\internal\5.7.1
    The operation couldn't be performed because object 'en\internal\5.7.1' couldn't be found on (One of my DCs)

    It appears PowerShell is looking for this message on my DC and not on my Exchange Server?

    Monday, December 9, 2019 2:07 PM
  • Yes, I ran:

    New-SystemMessage -Internal $true -Language En -DSNCode 5.1.1 -Text "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    Then:

    Get-SystemMessage en\internal\5.7.1

    And Finally:

    Set-SystemMessage en\internal\5.7.1 -Text "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    This is where I received the message above:

    "WARNING: The command completed successfully but no settings of 'en\Internal\5.7.1' have been modified."

    Monday, December 9, 2019 2:20 PM
  • So, If I cannot modify the default en\internal\5.7.1 message, how do I change what a user sees? We disable users' e-mail and deny everyone permission to send to it. I have been tasked by upper management to change what the end user sees wen they send to one of these disabled e-mail accounts. They want the message to be: "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."?  Since the incoming email is triggering the 5.7.1 message, how do I replace the 5.7.1 message going out after it is triggered with a New message?
    Monday, December 9, 2019 2:42 PM
  • You created a new message for 5.1.1 but then tried modify the 5.7.1 system message?

    ew-SystemMessage -Internal $true -Language En -DSNCode 5.1.1 -Text "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    Then:

    Get-SystemMessage en\internal\5.7.1

    And Finally:

    Set-SystemMessage en\internal\5.7.1 -Text "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    Monday, December 9, 2019 2:50 PM
    Moderator
  • I apologize, yes, I had created New-SystemMessage(s) for 5.1.1, 5.1.2 & 5.7.1 prior to Set-SystemMessage … 5.7.1 but I copied and pasted the wrong one in my reply.  here is the correct command that I used:

    New-SystemMessage -Internal $true -Language En -DSNCode 5.7.1 -Text "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    Monday, December 9, 2019 3:36 PM
  • I apologize, yes, I had created New-SystemMessage(s) for 5.1.1, 5.1.2 & 5.7.1 prior to Set-SystemMessage … 5.7.1 but I copied and pasted the wrong one in my reply.  here is the correct command that I used:

    New-SystemMessage -Internal $true -Language En -DSNCode 5.7.1 -Text "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."

    and this isnt working? You have tested it?

    Because simply running the set-systemmessage command with the same text as when you created it will throw that error. What you are you trying to change?

    "Set-SystemMessage en\internal\5.7.1 -Text "The email address you entered couldn't be found. Please check the recipient's email address and try to resend the message. If the problem continues, please contact your helpdesk."


    Monday, December 9, 2019 4:06 PM
    Moderator
  • Here is what I've run in PS:
    PS C:\Windows\system32> "Set-SystemMessage en\internal\5.7.1 -Text "The email address you entered couldn't be found. Please check the recipient's emailaddress and try to resend the message. If the problem continues, please contact your helpdesk."
    >>
    >>
    >>

    Please notice: After running the above "Set-SystemM…" PS has not returned to its normal PS C:\Windows\system32> prompt.  Just the two:  ">>"

    Monday, December 9, 2019 4:27 PM
  • Here is what I've run in PS:
    PS C:\Windows\system32> "Set-SystemMessage en\internal\5.7.1 -Text "The email address you entered couldn't be found. Please check the recipient's emailaddress and try to resend the message. If the problem continues, please contact your helpdesk."
    >>
    >>
    >>

    Please notice: After running the above "Set-SystemM…" PS has not returned to its normal PS C:\Windows\system32> prompt.  Just the two:  ">>"

    Yes, that wont work with the " before the set-systemmessage command, I think that typo slipped into my comment as well

    Monday, December 9, 2019 6:04 PM
    Moderator
  • Hi MickeyHey,
    I’ve found that your issue happens when the text in New-SystemMessage is same as in Set-SystemMessage, try to type in different words in Set-SystemMessage.
    Here is test in my lab:

    In addition, "The operation couldn't be performed because object..."  results from you did not run the correct command, it should be:

    $Perms = Get-ManagementRole -Cmdlet Set-SystemMessage

    $Perms | foreach {Get-ManagementRoleAssignment -Role $_.Name -Delegating $false | Format-Table -Auto Role,RoleAssigneeType,RoleAssigneeName}


    Regards,

    Eric Yin


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Thursday, December 12, 2019 10:18 AM
  • Hi MickeyHey,
    I’ve found that your issue happens when the text in New-SystemMessage is same as in Set-SystemMessage, try to type in different words in Set-SystemMessage.
    Here is test in my lab:

    In addition, "The operation couldn't be performed because object..."  results from you did not run the correct command, it should be:

    $Perms = Get-ManagementRole -Cmdlet Set-SystemMessage

    $Perms | foreach {Get-ManagementRoleAssignment -Role $_.Name -Delegating $false | Format-Table -Auto Role,RoleAssigneeType,RoleAssigneeName}


    Regards,

    Eric Yin


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Yes, I already mentioned that.
    • Marked as answer by MickeyHey Friday, December 13, 2019 2:28 PM
    Thursday, December 12, 2019 11:51 AM
    Moderator
  • Eric, Thank You, You are correct. I was able to change the message and it DID change... however, this opens up another can of worms. PS indicates I have changed the message successfully and when I "Get-SystemMessage en\internal\5.7.1" It shows the new text, but when I actually send an e-mail to an account that is disabled and the e-mail generated a 5.7.1 error, I still receive the default 5.7.1 message "Your message can't be delivered because you do not have permissions to send to this email address. Ask the recipient’s e-mail administrator to grant you permissions and then try again. For more information about this issue see DSN code 5.7.1 in Exchange Online."<o:p></o:p>

    MickeyHey

    Friday, December 13, 2019 2:28 PM
  • Eric, Thank You, You are correct. I was able to change the message and it DID change... however, this opens up another can of worms. PS indicates I have changed the message successfully and when I "Get-SystemMessage en\internal\5.7.1" It shows the new text, but when I actually send an e-mail to an account that is disabled and the e-mail generated a 5.7.1 error, I still receive the default 5.7.1 message "Your message can't be delivered because you do not have permissions to send to this email address. Ask the recipient’s e-mail administrator to grant you permissions and then try again. For more information about this issue see DSN code 5.7.1 in Exchange Online."<o:p></o:p>

    MickeyHey

    Does your inbound mail go through Office 365? 
    Friday, December 13, 2019 2:33 PM
    Moderator
  • No, Exchange 2013

    MickeyHey

    Friday, December 13, 2019 2:48 PM
  • Friday, December 13, 2019 3:09 PM
    Moderator
  • I’m pleased to know that the information is helpful to you.
     
    Here I will provide a brief summary of this post so that other forum members could easily find useful information here:
    [Exchange Server > Exchange Server 2013 -Changing a Default DNS message with Powershell fails with the message WARNING: The command completed successfully but no settings of 'en\Internal\5.7.1' have been modified. — Summary]
     
     
    Issue Symptom:
    get error when using the command set-systemmessage


    (Possible) Cause:
    type in the same words in new-systemmessage and set-systemmessage

     
    Solution:
    type in different words in new-systemmessage and set-systemmessage
    Monday, December 16, 2019 2:06 AM