Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Using the Unified Write Filter (UWF) on Windows 10

December 23, 2020 Windows 10

Using the Unified Write Filter (UWF) on Windows 10

UWF (Unified Write Filter) is a special file system write filter in Windows 10 that allows you to protect Windows system and user files on the local drive from any changes. When the UWF filter is enabled, any write operations to a protected disk or to the system registry are intercepted by the UWF filter driver and placed in a separate virtual space (overlay). After restarting Windows, all changes on protected drives are not saved, i.e. Windows always reverts to its original state when the UWF filter was enabled.

How does a UWF filter work? It protects the file system of the selected partitions on the local disks from changes by transparently redirecting all file system write operations into virtual overlay where all changes are stored.

Note. In previous Windows versions, write filters were available only in the Embedded editions, that were used in ATMs, POS systems, kiosks, self-service terminals, industrial systems, etc. Now this feature is available in Windows 10 Enterprise (including LTSB/LTSC) and Windows 10 Education. This opens up additional scenarios for using Windows in enterprises and educational institutions (information kiosks, study rooms, demo stands, etc.). 

How to Enable and Configure Unified Write Filter on Windows 10?

The UWF filter is a separate Windows feature that is enabled through the Control Panel -> Programs and Features -> Turn Windows Features On or Off -> Device Lockdown -> Unified Write Filter.

enable Unified Write Filter in windows 10

The UWF feature can also be installed using PowerShell:

Enable-WindowsOptionalFeature -Online -FeatureName "Client-UnifiedWriteFilter" –All

Or DISM:

DISM.exe /Online /enable-Feature /FeatureName:client-UnifiedWriteFilter

The uwfmgr.exe console tool is used to manage UWF settings.

To enable UWF filter on Windows 10, run the following command and restart your computer:

uwfmgr.exe filter enable

uwfmgr.exe filter enable

After enabling the UWF filter, it automatically reconfigures the system to exclude unnecessary disk write operations (paging file, restore points, file indexing, defragmenting are disabled).

To enable write protection for a specific drive, run this command:

uwfmgr.exe volume protect c:

Now restart your computer. After the restart, everything that a user writes on the disk during the session will be available only till the next computer reboot. Any changes will be discarded.

You can check the UWF status using this command:

uwfmgr.exe get-config

uwfmgr.exe get-config - Volume state: Protected

In this example you can see that the system disk is protected, the UWF filter is enabled (Volume state: Protected).

The current overlay settings in which the UWF stores temporary data can be displayed using the command:

uwfmgr overlay get-config

You can configure the following UWF overlay parameters:

  • Type – overlay type. You can store data on disk (DISK) or in RAM;
  • Maximum size – the maximum overlay size;
  • Warning Threshold – overlay size, if exceeded, a warning should be displayed;
  • Critical Threshold – the size of the overlay, if exceeded, a UWF error will appear;
  • Freespace Passthrough – used only for disk overlay mode. Allows you to write data to any free space on the disk, and not to a special file.

The default is a 1 GB RAM overlay.

You can change overlay settings (if you have enough free RAM):

uwfmgr overlay set-size 8192
uwfmgr overlay set-criticalthreshold 8192
uwfmgr overlay set-warningthreshold 7168

If you need to use DISK overlay, run the command:

uwfmgr overlay set-type Disk

The current size of the data in the overlay can be displayed as follows:

uwfmgr overlay get-consumption

Remaining free space:

uwfmgr overlay get-availablespace

Unified Write Filter Servicing on Windows 10

When performing system maintenance tasks (installing updates, updating antivirus signatures), you need to put your Windows device into a special UWF servicing mode:

uwfmgr servicing enable

enable uwfmgr servicing mode on windows 10

After restarting, Windows will boot under the local UWF-Servicing account and automatically install available Windows updates (via Windows Update or approved WSUS updates), update antivirus signatures. If you wish, you can log on to the computer under the UWF-Servicing account (the password for this user is unknown, but you can reset it).

After the UWF-Servicing user is automatically logged on, the uwfservicingshell.exe tool starts, which runs the Windows 10 servicing scripts. You cannot do anything else in service mode.

uwf servicing user account on windows 10

After the updates are installed, the computer will automatically restart in normal mode with the UWF filter enabled.

You can also install Windows updates without going into Servicing mode. Use the command:

uwfmgr servicing update-windows

uwfmgr servicing update-windows

Unified Write Filter updated Windows result: REBOOT REQUIRED.

Adding Unified Write Filter Exclusions on Windows 10

If you need to force a modified file to be saved to disk while the UWF filter is enabled, you need to run the command:

uwfmgr file commit C:\Labs\MyApp.exe

Now the file won’t be deleted even if you restart Windows.

To completely remove a file with UWF enabled, use the command:

uwfmgr file commit-delete C:\Labs\MyApp.exe

Similar UWF commands for the registry:

uwfmgr registry commit ...
uwfmgr registry commit-delete ...

You can add certain files, directories or registry keys to the list of UWF exclusions. The changes you make to these items will be written directly to the disk, and not to the overlay.

To add a specific file or folder to exclusions, run the following command:

Uwfmgr.exe file add-exclusion c:\labs

Or:

Uwfmgr.exe file add-exclusion c:\labs\report.docx

To add an exclusion for the registry key:

Uwfmgr.exe registry add-exclusion “HKLM\Software\My_RegKey”

You must restart your computer to apply new exclusion list.

To list the exclusions of a UWF filter, run the command:

uwfmgr file get-exclusions

To remove a file from exclusions:

uwfmgr file remove-exclusion c:\student\report.docx

You cannot add exclusions for some system files or folders, like:

  • Registry files in \Windows\System32\config\;
  • Root of the volumes;
  • \Windows, \Windows\System32, \Windows\System32\Drivers;
  • Pagefile.sys, swapfile.sys;
  • Etc.
Note. UWF cannot be used to protect data on flash drives and external USB devices. It seems enabling write filter for Removable disk types is not supported at the software level. However, you can bypass this restriction with the trick from article Removable USB drive as fixed disk in Windows.  

To make some services work correctly, you have to add paths to their directories, files and registry keys to the exclusion list. I’ve collected typical exclusions for some Windows subsystems below:

Exclusions for BITS:

  • % ALLUSERSPROFILE%\Microsoft\Network\Downloader
  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\BITS\StateIndex

Exclusions for the correct work in wireless networks (these exceptions will allow you to connect to Wi-Fi networks and save WLAN profiles):

  • HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Wireless\GPTWirelessPolicy
  • C:\Windows\wlansvc\Policies
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\wlansvc
  • C:\ProgramData\Microsoft\wlansvc\Profiles\Interfaces\{<Interface GUID>}\{<Profile GUID>}.xml
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Wlansvc
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WwanSvc

Exclusions for the correct work in wired networks:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WiredL2\GP_Policy
  • C:\Windows\dot2svc\Policies
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\dot3svc
  • C:\ProgramData\Microsoft\dot3svc\Profiles\Interfaces\{<Interface GUID>}\{<Profile GUID>}.xml
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\dot3svc

Exclusions for Windows Defender

  • C:\Program Files\Windows Defender
  • C:\ProgramData\Microsoft\Windows Defender
  • C:\Windows\WindowsUpdate.log
  • C:\Windows\Temp\MpCmdRun.log
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender

How to Reset or Disable UWF Filter?

You can reset the UWF filter settings to the initial ones (at the moment the filter is turned on):

uwfmgr filter reset-settings

To completely disable UWF (after a reboot, all changes on the disk will be saved):

uwfmgr.exe filter disable

Or you can disable the filter for a specific volume:

uwfmgr.exe volume unprotect E:

Important. If the Windows won’t boot due to incorrect UWF filter settings, you can disable the filter by booting from the install/boot media and editing the registry  offline:

  • Disable UWF driver autostrart by changing the value of Start parameter to 4 in the reg key HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\uwfvol;
  • Delete the uwfvol string in HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{71a27cdd-812a-11d0-bec7-08002be2092f}\Lower Filters

UWF with HORM (Hibernate Once/Resume Many) on Windows 10

Starting with Windows 10 1709, another UWF filter mode appeared – Hibernate Once/Resume Many (HORM). This mode allows you to quickly get the state of Windows with running apps and open files. Every time the computer boots up, Windows immediately returns to this state.

Limitations of HORM Mode on Windows 10:

  • UWF filter must be enabled for all local (fixed) drives;
  • UWF filter exceptions are not supported;
  • Overlay works in RAM mode (disk-overlay is not supported);
  • Hibernation and Fast Startup are disabled.

To enable HORM, you need to run the command:

uwfmgr filter enable-horm

windows uffmgr enable horm mode (Hibernate Once/Resume Many)

Unified Write Filter enabled HORM. Please hibernate the system to use HORM functionality. The system must be hibernated at least once after run enable-horm command, or it may bring the system into corrupted state.

Configure the user’s working environment (run the required applications, open files, etc.). Then put the computer into hibernation mode with the command:

shutdown /h

Wake up your computer and restart it. On the next reboot, Windows 10 will immediately start in the state stored in the hibernation file.

To disable HORM mode, run the command:

uwfmgr filter disable-horm

UWF offers some interesting scenarios:

  1. Improving Windows performance  (nothing is written on the disk, all write operations are performed in the memory, like on a RAM disk);
  2. You can reduce wear on solid-state drives (SSD/CompactFlash) due to less write operations;
  3. Experimenting, testing of third-party software and studying malware (for these purposes, you can also use the Windows 10 Sandbox).

5 comments
3
Facebook Twitter Google + Pinterest
previous post
Zerologon (CVE-2020-1472): Critical Active Directory Vulnerability
next post
Take a Screenshot of a User’s Desktop with PowerShell

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

5 comments

Mauro De Vecchi April 6, 2019 - 8:40 am

Hello, I tried to follo many HowTos to activate UWF on Windows 10 LTSB (after installing also last available Cumulative Update and Maintenance Stack Update). After setting correctly UWF filter on C: partition, I have many troubles related to Windows that is trying to download Updates and Language Update Packs. Is this a normal condition? Must I lock by myself all Windows attempts to update itself? To lock Windows Updates I found on internet a small utility called Wub (I don’t know if I can post it’s download URL) that locks Windows Update Service start locking also it’s start settings, because it seems that Windows 10 maintenance task re-enable it automatically. How can I block language updates? Are there other updates processes to block? How?

Regards
Mauro

Reply
admin April 15, 2019 - 11:53 am

You can configure your devices to receive updates from your WSUS (https://woshub.com/installing-configuring-wsus-on-windows-server-2012/) server with the manual approving of new updates for your Win 10 LTSB edition, or regularly (once a month) install Windows security patches from Windows Update servers in accordance with the article “Apply Windows updates to UWF-protected devices” (https://docs.microsoft.com/en-us/windows-hardware/customize/enterprise/uwf-apply-windows-updates)

Reply
Kilian June 25, 2020 - 9:49 pm

https://docs.microsoft.com/en-us/windows-hardware/customize/enterprise/uwf-antimalware-support lists more registry exclusions for the Windows Defender than described here. Unfortunately, after excluding

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WdBoot
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WdFilter
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WdNisSvc
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WdNisDrv
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend

PC did not boot anymore and was hanging there with the rotating donut. Problem occurred after 2nd restart! After restoring the partition from an image to bring the system back to live and removing the mentioned exclusions the PC works again.
Don’t know what really causes the troubles but I will never ever add these exclusions again.

Reply
teamrocket0 June 22, 2022 - 9:36 pm

I want to make a script, that will check the enable or disable-status of the write filter, depending on its current state.

$State = uwfmgr.exe filter get-config
Select-String -inputObject $State -pattern “Filter State: OFF”

This actually doesn’t work. Can anybody improve that?

Reply
Ela July 2, 2022 - 6:37 am

Alternately, can get the state from the registry value
HKLM\SYSTEM\CurrentControlSet\Services\uwfvol\parameters\static\copy0, UwfEnabled – 0 Disabled , 1 Enabled (Next Session)
HKLM\SYSTEM\CurrentControlSet\Services\uwfvol\parameters\static\copyV, UwfEnabled – 0 Disabled , 1 Enabled (Current Session)

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Disable UAC Prompt for Specific Applications in Windows 10?
  • How to Download APPX File from Microsoft Store for Offline Installation?
  • Fix: Windows Cannot Connect to the Shared Printer
  • How to Clean Up Large System Volume Information Folder on Windows?
  • Fixing “Winload.efi is Missing or Contains Errors” in Windows 10
  • Windows Doesn’t Automatically Assign Drive Letters
  • How to Hide Installed Programs in Windows 10 and 11
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top