en-US fslogix computer

Number Session VHD(s) To Keep

Verified with Microsoft FSLogix — updated on July 12, 2026

Supported on: v2105 or later

Path in the GPO console

Computer Configuration\Administrative Templates\FS Logix\ODFC Containers

Description

This setting is used when VHDAccessMode is set to '3'. This controls the number of session VHD(x) containers that are persisted. For example, if this is set to '2' and the user creates a 3rd session, a new session VHD(x) will be created and used and it will be deleted when the 3rd session ends. Th default value is 2 sessions which is the same as "Not Configured" Registry Entry: HKLM\SOFTWARE\Policies\FSLogix\ODFC\NumSessionVHDsToKeep Type: DWORD Values: Min = 0, Max = 10

Registry

HKLM Software\Policies\FSLogix\ODFC

More options available

Options

Number Session VHD(s) To Keep
NumSessionVHDsToKeep decimal - range 0-10 - default: 2

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Number Session VHD(s) To Keep
; State: Enabled
; Supported on: v2105 or later

[HKEY_LOCAL_MACHINE\Software\Policies\FSLogix\ODFC]
"NumSessionVHDsToKeep"=dword:00000002
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Number Session VHD(s) To Keep
# State: Enabled
# Supported on: v2105 or later

$path = 'HKLM:\Software\Policies\FSLogix\ODFC'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'NumSessionVHDsToKeep' -Value 2 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview