Restricting file copy with group policy on Windows 10 22H2

Elsayed, Marwa R 20 Reputation points

How can I apply a group policy on Windows 10 22H2 that restricts the copying of files with extensions .rar, .zip, .bat, and .rar on USB drives?

A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
3,073 questions
0 comments No comments
{count} votes

Accepted answer
  1. Wesley Li-MSFT 3,336 Reputation points Microsoft Vendor


    You can use Group Policy to restrict the copying of files with certain extensions to USB drives on Windows 10 22H2. Here’s how you can do it:

    Open the Group Policy Management Console by typing gpedit.msc in the Start menu and pressing Enter.

    In the left pane, navigate to Computer Configuration > Administrative Templates > System > Removable Storage Access.

    In the right pane, double-click on the Removable Disks: Deny write access policy.

    Select the Enabled option, then click on the Show button next to the List of file extensions to block field.

    In the Value column, enter the file extensions you want to block, separated by semicolons. For example: .rar;.zip;.bat;.rar

    Click on OK to save your changes.

    After applying this policy, users will not be able to copy files with the specified extensions to USB drives. Keep in mind that this policy only applies to the computer where it is configured, so you will need to apply it on all computers where you want to restrict access.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Limitless Technology 42,296 Reputation points


    Thank you for your question and reaching out.

    You can use some Endpoint protection tools or Antivirus tools which prevent access of USB or certain file types.

    In Windows Server, you can add and install "File server resource manager" (via add/remove programmes). All you needed is described in the bottom link)

    and then block all extension groups (such as executable files or video files) of a specific path (in your case, your upload folder).

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments