none
Export Anti-spam contents in Exchange Server 2010 RRS feed

  • Question

  • Dear All,

    I have a issue in in our Exchange server 2010 in the Anti-spam agent, so I need to uninstall the agent and reinstall it again, but i have to export all the content that added like ( Content Filtering, IP Allow List, IP Allow List Providers, IP Block List, IP Block List Providers, Recipient Filtering, Sender Filtering, Sender ID, and Sender Reputation), there is any script can do like this export.
    Thursday, July 18, 2019 6:33 AM

All replies

  • Hi Bishoy,

    The following scripts will export all the anti spam agent settings to a txt file named antispamsettings.txt, you could specify the folder path as required. To use it, copy and paste the following in a notepad file and save as a ps1 file, then run the scripts in EMS.

    "Connent Filter" >c:\temp\antispamsettings.txt
    Get-ContentFilterConfig | fl | Out-File -Append c:\temp\antispamsettings.txt
    
    "Sender Filter" | Out-File -Append c:\temp\antispamsettings.txt
    Get-SenderFilterConfig | fl | Out-File -Append c:\temp\antispamsettings.txt
    
    "Sender ID" | Out-File -Append c:\temp\antispamsettings.txt
    Get-SenderIDConfig | fl | Out-File -Append c:\temp\antispamsettings.txt
    
    "Sender Reputation" | Out-File -Append c:\temp\antispamsettings.txt
    Get-SenderReputationConfig | fl | Out-File -Append c:\temp\antispamsettings.txt
    
    "Recipient Filter" | Out-File -Append c:\temp\antispamsettings.txt
    Get-RecipientFilterConfig | fl | Out-File -Append c:\temp\antispamsettings.txt
    
    "IP Block List" | Out-File -Append c:\temp\antispamsettings.txt
    Get-IPBlockListEntry | fl | Out-File -Append c:\temp\antispamsettings.txt
    Get-IPBlockListConfig | fl | Out-File -Append c:\temp\antispamsettings.txt
    
    "IP Block List Provider" | Out-File -Append c:\temp\antispamsettings.txt
    Get-IPBlockListProvider | fl | Out-File -Append c:\temp\antispamsettings.txt
    Get-IPBlockListProvidersConfig | fl | Out-File -Append c:\temp\antispamsettings.txt
    
    "IP Allow List" | Out-File -Append c:\temp\antispamsettings.txt
    Get-IPAllowListEntry | fl | Out-File -Append c:\temp\antispamsettings.txt
    Get-IPAllowListConfig | fl | Out-File -Append c:\temp\antispamsettings.txt
    
    "IP Allow List Provider" | Out-File -Append c:\temp\antispamsettings.txt
    Get-IPAllowListProvider | fl | Out-File -Append c:\temp\antispamsettings.txt
    Get-IPAllowListProvidersConfig | fl | Out-File -Append c:\temp\antispamsettings.txt


    Regards,

    Manu Meng


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

    Monday, July 22, 2019 10:14 AM
    Moderator
  • Just checking in to see if above information was helpful. Please let us know if you would like further assistance.

    Regards, 

    Manu Meng


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

    Friday, July 26, 2019 9:45 AM
    Moderator