Offline Files feature in Windows 10 allows you to make certain shared network folders and files available offline even if your computer is not connected to the corporate network. In this article, we will show how to enable and configure Offline Files on Windows 10 and Windows Server 2019 manually and using GPO.
Offline Files have been available in Windows for a long time. A user only needs to enable Offline Files on the computer and check the “Always available offline” option for some files or folders in a shared folder. Then Windows saves the specified files to the local cache on the disk and periodically updates them in the background (every 2 hours by default, but you can set how often your Offline Files are synchronized using the Configure Background Sync option in GPO).
How to Enable Offline Files on Windows 10?
In Windows 10, you can enable Offline Files through the classic Control Panel.
- Open the Sync Center;
- Select Manage Offline Files on the left;
- Click Enable Offline Files;
- Restart your computer.
Then a user can just right-click a file or a folder in the shared network folder and select the Always available offline th option.
Windows will start copying the specified files to the local cache of Offline Files. By default, the cache size of Offline Files in Windows is 25% of the total disk size (depending on your Windows version).
Then if a source file server is not available or the network connection speed is slower than the threshold value, the files will be available offline in the Sync Center.
All changes made to Offline Files will be synchronized with the server next time when a computer connects to the network.
C:\Windows\CSC
folder on a client computer and are not directly accessible through File Explorer.Configuring Offline Files for a Shared Folder on Windows Server
To allow a user to make files available offline, Offline Files support must be enabled in the shared folder settings.
On Windows Server 2019, open Server Manager and check the option Allow caching of share in the settings of your shared folder.
You can enable manual caching mode for your network shared folder using PowerShell (in this mode users can manually select files and folders to make them available offline):
Set-SMBShare -Name Docs -CachingMode Manual
If a network share is located on a computer running desktop Windows edition, select Caching -> Only the files and programs that users specify are available offline in the settings of the shared folder.
How to Configure Offline Files Using Group Policy?
If you want to enable Offline Files on all computers in your Active Directory domain, you may deploy the following registry settings through a GPO:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CSC
– Start = 1 (type DWORD)HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CscService
–Start = 2 (type DWORD)HKLM\Software\Policies\Microsoft\Windows\NetCache
–Enabled=1 (type DWORD)
Or you can use the Allow or Disallow use of the Offline Files policy from the Computer Configuration -> Policies -> Administrative Templates -> Network -> Offline Files section of GPO. You can configure other Offline Files options here:
- Configure Background Sync — to enable background synchronization and set synchronization intervals;
- Limit disk space used by Offline Files / Default Cache size – to limit the size of Offline Files cache on the disk;
- Specify administratively assigned Offline File is the list of shared folders to be synchronized on user computers and available offline (you can specify UNC paths to any network share or a personal user folder
\\hostname1\Users$\%username%
)
When analyzing Offline Files issues in Windows, it is worth checking synchronization events in the Windows Event log. Enable Offline Files synchronization log:
wevtutil sl Microsoft-Windows-OfflineFiles/SyncLog /e:true /q
Then you can get a list of successfully synchronized files for the last 24 hours using the PowerShell command below:
get-winevent -oldest -filterhashtable @{ logname = "Microsoft-Windows-OfflineFiles/SyncLog"; starttime = (get-date).adddays(-1); id = 2005 } | select-object TimeCreated, @{ name = "Path"; expression = { ([xml]$_.toxml()).Event.UserData.SyncSuccessInfo.Path } }
To clear the Offline Files cache, change the FormatDatabase registry parameter and restart your computer:
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Csc\Parameters /v FormatDatabase /t REG_DWORD /d 1 /f
shutdown –f –r –t 0