Protect Your System! Disable Removable Storage to Prevent Malware in Windows 11

3. Using PowerShell

In addition to using Group Policy Editor and Registry Editor, you can also disable removable storage in Windows 11 by using PowerShell. PowerShell is a powerful command-line tool that allows administrators to automate system tasks, including blocking access to removable storage. Here is the full guide.

Steps to Disable Removable Storage with PowerShell

  1. Click Start, type PowerShell, then right-click on Windows PowerShell and select Run as Administrator.
  2. If you see a User Account Control (UAC) alert, click Yes to continue.
  3. Enter the following command in PowerShell to block access to all removable storage:
Set-ItemProperty -Path “HKLM:\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices” -Name “Deny_All” -Value 1 -Type DWord

This command will create or change the value of the Deny_All in the registry to 1, which means access to all removable storage is blocked.

  1. Press Enter to execute the command.
  2. After running the command, restart your computer for the changes to take effect. After restarting, access to all removable storage such as USB Flash Drives, External Hard Drives, and SD Cards will be disabled.

How to Restore Access to Removable Storage

If at any point you need to restore access to removable storage, you can use PowerShell to delete or change the registry values that have been created. Here are the steps:

  1. Follow the same steps as before to open PowerShell with administrator privileges.
  2. Enter the following command in PowerShell to restore access to removable storage:
Set-ItemProperty -Path “HKLM:\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices” -Name “Deny_All” -Value 0 -Type DWord

This command will change the value of Deny_All to 0, which means access to removable storage is allowed again.

  1. Press Enter to execute the command.
  2. Restart your computer for the changes to take effect.

4. Using Windows Defender and Endpoint Security

In addition to the manual method, you can also take advantage of Windows 11’s built-in security tools such as Microsoft Defender for Endpoint or third-party software to prevent access to removable storage.

Leverage Microsoft Defender for Endpoint

Microsoft Defender for Endpoint is a powerful security solution to automatically block access to removable storage.

The setup steps:

  1. Open Microsoft Defender Security Center.
  2. Select Device Control > Removable Storage Access Control.
  3. Create a new policy to block access to removable storage.
  4. Apply the policy to the devices you want to protect.

Third-Party Security Software Recommendations

If you’re looking for a more complete solution, some third-party security software to consider are:

  • Symantec Endpoint Protection: Offers effective USB blocking and endpoint protection features.
  • Bitdefender GravityZone: Allows access control to removable storage and protects the system from malware.
  • McAfee Endpoint Security: Provides end-to-end security features, including blocking external devices.

Disabling removable storage in Windows 11 is an important step to prevent malware infections and improve system security. With methods such as Group Policy Editor, Registry Editor, Windows Defender, and PowerShell, you can block access to external storage devices such as USB Flash Drives, External Hard Drives, and SD Cards.

For maximum protection, it is recommended to combine various security methods and implement strict Endpoint Security policies. Implement these strategies immediately to protect your data and systems from increasingly sophisticated cyber threats. Digital security is our shared responsibility, start acting now!

Latest Articles