Help needed creating custom DLP RRS feed

  • Question

  • Hi all,

    I am trying to build a custom DLP to block PPS numbers in Exchange 2013 on-prem.

    PPSN number have the following format of 1234567X, so 7 numbers, one letter.

    I built an xml file and tried to import it using the following:

    New-ClassificationRuleCollection -FileData ([Byte[]]$(Get-Content -Path "C:\PPSN.xml" -Encoding Byte -ReadCount 0))

    but get the following error:

    We couldn't import that rule collection because it isn't encoded properly. Please try one of the following steps to resolve the issue:
        + CategoryInfo          : InvalidData: (:) [New-ClassificationRuleCollection], ClassificationR...yptionException
        + FullyQualifiedErrorId : [Server=EX01,RequestId=c450a6d7-a052-4b30-b2d1-aedddc53982d,TimeStamp=25/11/2020 10:05:35] [FailureCategory=Cmdlet-ClassificationRuleCollec
       tionDecryptionException] D4629348,Microsoft.Exchange.Management.ClassificationDefinitions.NewClassificationRuleCollection
        + PSComputerName        : EX01.CONTOSO.COM

    The xml is at the foot of my post. Can anyone point me where to go from here?

    Thanks in advance.

    <?xml version="1.0" encoding="UTF-8"?>

    <RulePackage xmlns="http://schemas.microsoft.com/office/2011/mce">

    <RulePack id="3c155c44-a133-462d-956c-7731367429e2">

    <Version revision="0" build="0" minor="0" major="1"/>

    <Publisher id="37f35efc-1ad4-4e0f-868e-158be3052f34"/>

    <Details defaultLangCode="en-us">

    <LocalizedDetails langcode="en-us">


    <Name>PPSN BLOCK</Name>

    <Description>PPSN BLOCK</Description>





    <Entity id="d4fc5e01-3b9e-4332-8649-c30d590be331" recommendedConfidence="85" patternsProximity="">

    <Pattern confidenceLevel="85">

    <IdMatch idRef="PPSN"/>



    <Regex id="PPSN ">(\d{7})([A-Z]{1,2})</Regex>

    <Keyword id="">

    <Group matchStyle="word">




    <Resource idRef="d4fc5e01-3b9e-4332-8649-c30d590be331">

    <Name langcode="en-us" default="true">PPSN BLOCK</Name>

    <Description langcode="en-us" default="true">PPSN BLOCK</Description>





    Wednesday, November 25, 2020 10:12 AM

All replies

  • Hi,

    Please note that previous Exchange forums on TechNet have been migrated to a new home on Microsoft Q&A and this forum is for Exchange Server Development only.

    It is highly recommended to ask your question there so that there is more chance to get helpful suggestions or answers.

    In addition,we have created a thread on this question for you on the Microsoft Q&A forum:

    [Migrated from MSDN Exchange Dev]Help needed creating custom DLP

    Please register the new forum and continue the discussion with us there.


    Kael Yao

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

    Thursday, November 26, 2020 7:15 AM