Receiving Write-Error when trying to run Get-quarantinemessage cmdlet in Powershell

Erin Martin 0 Reputation points
2024-03-06T16:56:00.1366667+00:00

Hello, I am encountering a Write error when trying to run the Get-QuarantineMessage cmdlet in Powershell for Exchange Online.

Related question: https://answers.microsoft.com/en-us/msoffice/forum/all/can-not-release-quarantined-messages/9489cf72-2d83-4be2-b071-486c109f34bc

Error received: Write-ErrorMessage : |System.Net.WebException|The remote name could not be resolved: 'nam05-quarantine-internal.dataservice.protection.outlook.com'

When I run the Resolve-DnsName cmdlet, I get back "nonexistent domain."

Any idea why this would be occurring and what I can do to fix it?

Microsoft Exchange Online
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,059 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JimmyYang-MSFT 48,871 Reputation points Microsoft Vendor
    2024-03-07T09:37:09.3666667+00:00

    @Erin Martin

    Did you try to check the other command in Exchange Online PowerShell to see if it works? 

    Firstly, please make sure you have assigned permissions before you can run this cmdlet.  you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

    According to your error message, it seems remote name "nam05-quarantine-internal.dataservice.protection.outlook.com" could not be resolved, which suggests that there might be a problem with the DNS server that your machine is using. To troubleshoot this issue, you can try the following steps:

    1. Check your DNS settings: Make sure that your machine is configured to use the correct DNS server. You can do this by checking the network settings on your machine or by running the ipconfig /all command in a command prompt.
    2. Flush your DNS cache: Sometimes DNS resolution problems can be caused by a corrupted DNS cache. To fix this, you can try flushing your DNS cache by running the ipconfig /flushdns command in a command prompt.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.