Windows 10: Use AppLocker to Allow or Block Script Files in Windows 10

Discus and support Use AppLocker to Allow or Block Script Files in Windows 10 in Windows 10 Tutorials to solve the problem; How to: Use AppLocker to Allow or Block Script Files in Windows 10 How to Use AppLocker to Allow or Block Script Files from Running in Windows 10... Discussion in 'Windows 10 Tutorials' started by Scottyboy99, Nov 26, 2017.

  1. Use AppLocker to Allow or Block Script Files in Windows 10


    How to: Use AppLocker to Allow or Block Script Files in Windows 10

    How to Use AppLocker to Allow or Block Script Files from Running in Windows 10


    packaged apps (aka: Microsoft Store apps), and packaged app installers.

    AppLocker defines script rules to include only the .ps1, .bat, .cmd, .vbs, and .js file formats.

    The following table lists the default rules that are available for the script rule collection.

    Any script file not allowed by the default rules below will automatically be blocked by default unless you create a new rule to allow it for a user or group.

    If you want to block a script file allowed by the default rules below, you will need to create a new rule to block (deny) it for a user or group.

    [table][tr]Purpose Name User Rule condition type [/tr] [tr][td]Allows members of the local Administrators group to run all scripts[/td] [td](Default Rule) All scripts[/td] [td]BUILTIN\Administrators[/td] [td]Path: *[/td] [/tr] [tr][td]Allow all users to run scripts in the Windows folder[/td] [td](Default Rule) All scripts located in the Windows folder[/td] [td]Everyone[/td] [td]Path: %windir%*[/td] [/tr] [tr][td]Allow all users to run scripts in the Program Files folder[/td] [td](Default Rule) All scripts located in the Program Files folder[/td] [td]Everyone[/td] [td]Path: %programfiles%*[/td] [/tr] [/table]

    See also:
    This tutorial will show you how to use AppLocker to allow or block specified script (.ps1, .bat, .cmd, .vbs, and .js) files to run for all or specific users and groups in Windows 10 Enterprise and Windows 10 Education.

    *Warning You must be signed in as an administrator to use AppLocker.


    Here's How:

    1. Open an elevated command prompt.

    2. Copy and paste the command below into the elevated command prompt, press Enter, and close the elevated command prompt when it has finished. (see screenshot below)

    *note This command is to make sure the Application Identity service is enabled, set to Automatic, and running. AppLocker cannot enforce rules if this service is not running.
    *Arrow sc config "AppIDSvc" start=auto & net start "AppIDSvc"


    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    3. Open Local Security Policy (secpol.msc).

    4. Expand open Application Control Policies in the left pane of the Local Security Policy window, click/tap on AppLocker, and click/tap on the Configure rule enforcement link on the right side. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    5. Check the Configured box under Script rules, and click/tap on OK. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    6. Expand open AppLocker in the left pane of the Local Security Policy window, right click or press and hold on Script Rules, and click/tap on Create Default Rules. (see screenshots below)

    *note If this step is not done, AppLocker will block all script files from running by default unless allowed by a created rule.

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    7. Right click or press and hold on Script Rules, and click/tap on Create New Rule. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    8. Click/tap on Next. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    9. If you would like to specify a user or group to enforce this rule on, click/tap on Select. (see screenshot below)

    *note The default setting is Everyone for all users and groups.

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]


    A) Click/tap on the Advanced button. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    B) Click/tap on the Find Now button. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    C) Select a user or group you want, and click/tap on OK. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    D) Click/tap on OK. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    10. Select (dot) Allow or Deny for what you want, and click/tap on Next. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    11. Select (dot) Path, and click/tap on Next. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    12. Do step 14 (file) or step 15 (folder/drive) below for the file or folder path you want to specify to allow or block.


    13. To Specify a Script File Path to Allow or Block
    A) Click/tap on the Browse Files button. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    B) Select if you want to allow or block a .ps1, .bat, .cmd, .vbs, or .js file in the drop menu at the bottom right corner. (see screenshots below)

    C) Navigate to and select the .ps1, .bat, .cmd, .vbs, or .js file you want to allow or block.

    D) Click/tap on Open, and go to step 15 below.


    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]


    14. To Specify a Folder or Drive Path to Allow or Block All Script Files in the Folder or Drive
    A) Click/tap on the Browse Folders button. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    B) Navigate to and select a folder or drive you want to allow or block all script (.ps1, .bat, .cmd, .vbs, and .js) files in.

    C) Click/tap on OK, and go to step 15 below.


    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    15. Click/tap on Next. (see screenshots below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    16. Click/tap on Next. (see screenshots below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    17. Click/tap on Create. (see screenshots below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    18. Your new rule for "Script Rules" will now be created. (see screenshot below)

    Use AppLocker to Allow or Block Script Files in Windows 10 [​IMG]

    19. Repeat steps 7 to 18 if you would like to create another new rule to allow or block another script file for a user or group.

    20. When finished, you can close the Local Security Policy window.


    That's it,
    Shawn


    Related Tutorials

    :)
     
    Scottyboy99, Nov 26, 2017
    #1
  2. Brink Win User
  3. ahmd Win User
    How to set up AppLocker restrictions on Windows 10 Pro?

    Dude, thanks for the info and sorry for my late reply. I've been bashing my head against it but I still can't make it work. I did everything like it says there but it still didn't do anything. It doesn't block anything. The only difference that I see in your tutorial is this line:

    Like I said I have Pro.
     
  4. Use AppLocker to Allow or Block Script Files in Windows 10

    Block an executable file with AppLocker

    Hi everyone,

    Does anyone here know how I can block (grey out) the "Reset this PC" on Windows 10 via AppLocker?
     
    PariaShahabi, Oct 27, 2019
    #4
  5. chisle Win User
    Applocker not blocking -- Win10Pro, Applocker configured, AppIDsvc run


    • OS: Win10Pro
    • Applocker: configured blocking of apps and executables
    • Applocker rules: set to enforcing
    • Service: AppIDSvc is running

    I've been trying to get Edge and a couple other utilities blocked on the laptop to keep distractions to a minimum for my child who uses the computer to study.
    However, even after rules are defined, and they are set to enforcing as blocked, the apps and executables are still available to them -- even after a reboot.

    I have followed the instructions here: https://social.technet.microsoft.com...10itprogeneral
    However, there is still no blocking of the apps or the executables.
    Thank you for your consideration.
     
    chisle, Oct 27, 2019
    #5
  6. Block a DLL with Applocker

    Hi all,

    On my organization we want to implement Applocker to block unauthorized DLLs. So far, I've created a very simple test, I've created an exe file that loads a function stored on a DLL. I created the program using visual studio and C#.


    Use AppLocker to Allow or Block Script Files in Windows 10 6f2c0613-d5bb-4701-ac86-8d5fbbf047d6?upload=true.png


    I followed the instructions posted here to block the DLL that my EXE file uses to work using Applocker.
    This are my settings


    Use AppLocker to Allow or Block Script Files in Windows 10 a296efb7-61f2-42a9-9661-dd35c92fd9fd?upload=true.png

    Use AppLocker to Allow or Block Script Files in Windows 10 b695c03b-a2cf-4400-a535-d2280777fe6d?upload=true.png

    Use AppLocker to Allow or Block Script Files in Windows 10 89f752ff-185f-4e2a-9fc3-cfa9433ac3cb?upload=true.png


    For my surprise this don't stop my program from loading the function in the DLL. Is there a way to achieve this using Applocker?

    OS: Windows Server 2012 R2
     
    OliverCaceres, Oct 27, 2019
    #6
Thema:

Use AppLocker to Allow or Block Script Files in Windows 10

Loading...
  1. Use AppLocker to Allow or Block Script Files in Windows 10 - Similar Threads - AppLocker Allow Block

  2. Allow blocked file

    in Windows 10 Network and Sharing
    Allow blocked file: I have attempted to use the exclusions to allow a blocked file, but windows security still will not allow me to use this file. I have attempted turning off anti-viruses, to no avail. Help....
  3. Block a DLL with Applocker

    in Windows 10 Customization
    Block a DLL with Applocker: Hi all, On my organization we want to implement Applocker to block unauthorized DLLs. So far, I've created a very simple test, I've created an exe file that loads a function stored on a DLL. I created the program using visual studio and C#. [ATTACH] I followed the...
  4. Use AppLocker to Allow or Block DLL Files from Running in Windows 10

    in Windows 10 Tutorials
    Use AppLocker to Allow or Block DLL Files from Running in Windows 10: How to: Use AppLocker to Allow or Block DLL Files from Running in Windows 10 How to Use AppLocker to Allow or Block DLL Files from Running in Windows 10 packaged apps (aka: Microsoft Store apps), and packaged app installers. AppLocker defines DLL rules to include...
  5. Use AppLocker to Allow or Block Windows Installer Files in Windows 10

    in Windows 10 Tutorials
    Use AppLocker to Allow or Block Windows Installer Files in Windows 10: How to: Use AppLocker to Allow or Block Windows Installer Files in Windows 10 How to Use AppLocker to Allow or Block Windows Installer Files from Running in Windows 10 packaged apps (aka: Microsoft Store apps), and packaged app installers. AppLocker defines Windows...
  6. Use AppLocker to Allow or Block Executable Files in Windows 10

    in Windows 10 Tutorials
    Use AppLocker to Allow or Block Executable Files in Windows 10: How to: Use AppLocker to Allow or Block Executable Files in Windows 10 How to Use AppLocker to Allow or Block Executable Files from Running in Windows 10 packaged apps (aka: Microsoft Store apps), and packaged app installers. AppLocker defines executable rules as any...
  7. Use AppLocker to Block Microsoft Store Apps in Windows 10

    in Windows 10 Tutorials
    Use AppLocker to Block Microsoft Store Apps in Windows 10: How to: Use AppLocker to Block Microsoft Store Apps in Windows 10 How to Use AppLocker to Block Microsoft Store Apps from Running in Windows 10 dynamic-link libraries (DLLs), packaged apps, and packaged app installers. Packaged apps are also known as Universal...
  8. Blocking Edge with AppLocker

    in Browsers and Email
    Blocking Edge with AppLocker: Does anyone know how to prevent Edge from running using AppLocker rules? I've tried various AppLocker rules to block Edge but Edge keeps running. If you have managed to block Edge using AppLocker, what rules did you create for this block to work? 83673
  9. Windows 10 1703 - no "blocked" message from Applocker

    in Windows 10 Software and Apps
    Windows 10 1703 - no "blocked" message from Applocker: Trying to whip Win10 Enterprise into shape for our environment and just did my first Applocker policy (created the rules on a Win10 machine, exported and imported into my policy on our domain controllers). It worked mostly as expected. On the account of which the policy was...
  10. Applocker not blocking -- Win10Pro, Applocker configured, AppIDsvc run

    in Windows 10 Software and Apps
    Applocker not blocking -- Win10Pro, Applocker configured, AppIDsvc run: OS: Win10Pro Applocker: configured blocking of apps and executables Applocker rules: set to enforcing Service: AppIDSvc is running I've been trying to get Edge and a couple other utilities blocked on the laptop to keep distractions to a minimum for my child who uses the...