Why is this XML file not working?

Anonymous
2024-02-09T17:34:00.13+00:00

Hello, I am trying to use an XML file to import app control rules within Local Security Policy. I got the script from this link --> https://call4cloud.nl/2020/06/managing-apps-in-the-microsoft-store/ being the script below, and when I try to import it, it gives me this error "The specified applocker policy cannot be imported. Verify that the policy file is valid and import the policy again. Use the error message below to troubleshoot. Error: The XML Policy is invalid for the following reason: RuleCollection element is not declared" Im new to XML and know im forgetting and missing something. Any help is appreciated <RuleCollection Type="Appx" EnforcementMode="Enabled"> <FilePublisherRule Id="617edd5b-3360-4281-9724-21e453587fce" Name="Alle ondertekende toepassingspakketten" Description="Hiermee kunnen leden van de groep Iedereen ondertekende toepassingspakketten uitvoeren." UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePublisherCondition PublisherName="CN=MICROSOFT CORPORATION, O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="" BinaryName=""> <BinaryVersionRange LowSection="0.0.0.0" HighSection="" /> </FilePublisherCondition> </Conditions> </FilePublisherRule> <FilePublisherRule Id="617edd5b-3360-4281-9724-21e443587fce" Name="Whitelist Microsoft Windows app" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePublisherCondition PublisherName="CN=MICROSOFT Windows, O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="" BinaryName=""> <BinaryVersionRange LowSection="0.0.0.0" HighSection="" /> </FilePublisherCondition> </Conditions> </FilePublisherRule> </RuleCollection>


<RuleCollection Type="Appx" EnforcementMode="Enabled"> <FilePublisherRule Id="617edd5b-3360-4281-9724-21e453587fce" Name="Alle ondertekende toepassingspakketten" Description="Hiermee kunnen leden van de groep Iedereen ondertekende toepassingspakketten uitvoeren." UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePublisherCondition PublisherName="CN=MICROSOFT CORPORATION, O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="*"> <BinaryVersionRange LowSection="0.0.0.0" HighSection="*" /> </FilePublisherCondition> </Conditions> </FilePublisherRule> <FilePublisherRule Id="617edd5b-3360-4281-9724-21e443587fce" Name="Whitelist Microsoft Windows app" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"> <Conditions> <FilePublisherCondition PublisherName="CN=MICROSOFT Windows, O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="*"> <BinaryVersionRange LowSection="0.0.0.0" HighSection="*" /> </FilePublisherCondition> </Conditions> </FilePublisherRule> </RuleCollection>

Windows for business Windows Client for IT Pros Devices and deployment Configure application groups
Windows for business Windows Client for IT Pros User experience Other
Microsoft Security Intune Other
{count} votes

1 answer

Sort by: Most helpful
  1. Crystal-MSFT 53,981 Reputation points Microsoft External Staff
    2024-02-12T02:15:29.64+00:00

    @Zachary Ralph, Thanks for posting in Q&A. After looking through the xml, I find it seems not English but Dutch. Please confirm if you are using Dutch. If not, then the xml is not suitable.

    In the xml, I notice it seems creating Execution Rule in AppLocker which allow the app via Publisher. You can manually create the rule in Local Group Policy and export the xml to make it work.

    User's image

    Here are links about how to create AppLocker policy for your reference:

    https://cloudinfra.net/how-to-implement-applocker-using-intune/#:~:text=Press%20Windows%20%2B%20R%20to%20open%20Run%20Dialog,and%20click%20on%20Create%20New%20Rule%20Click%20Next.

    Note : Non-Microsoft link, just for the reference.

    https://techcommunity.microsoft.com/t5/intune-customer-success/support-tip-using-applocker-to-create-custom-intune-policies-for/ba-p/364981

    Hope the above information can help.


    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.