Powershell script to push out from MS InTune to delete Applocker on a computer

mmacnip 0 Reputation points
2023-03-25T23:50:14.8633333+00:00

Looking for a powershell script that i can push to a laptop from MS InTune to delete a computers local applocker settings

Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,973 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,459 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ayomide Oluwaga 961 Reputation points
    2023-03-25T23:55:33.92+00:00

    Hello, There is a script for that. Use this script and let me know how it goes, Mark as helpful so others can access.

    $registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\SrpV2"
    $registryKey = "AppxRuleList"
    
    if (Test-Path $registryPath) {
        Remove-ItemProperty -Path $registryPath -Name $registryKey -ErrorAction SilentlyContinue
        Write-Host "AppLocker policy has been removed."
    } else {
        Write-Host "No AppLocker policy found on this computer."
    }
    
    

    To push this script out from Microsoft Intune, you can create a new PowerShell script profile in Intune and paste the script into the PowerShell script field. Then, assign the profile to the target devices or device groups as desired.

    0 comments No comments

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.