Open in the explorer

Action on server disconnect

Action à la déconnexion du serveur

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Offline Files FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Fichiers hors connexion
Supported on
Windows Server 2003, Windows XP, and Windows 2000 only FR: Windows Server 2003, Windows XP et Windows 2000 uniquement
ADMX file
OfflineFiles.admx
Internal name
OfflineFiles/Pol_GoOfflineAction_2

Explanation

Determines whether network files remain available if the computer is suddenly disconnected from the server hosting the files.

This setting also disables the "When a network connection is lost" option on the Offline Files tab. This prevents users from trying to change the option while a setting controls it.

If you enable this setting, you can use the "Action" box to specify how computers in the group respond.

-- "Work offline" indicates that the computer can use local copies of network files while the server is inaccessible.

-- "Never go offline" indicates that network files are not available while the server is inaccessible.

If you disable this setting or select the "Work offline" option, users can work offline if disconnected.

If you do not configure this setting, users can work offline by default, but they can change this option.

This setting appears in the Computer Configuration and User Configuration folders. If both settings are configured, the setting in Computer Configuration takes precedence over the setting in User Configuration.

Tip: To configure this setting without establishing a setting, in Windows Explorer, on the Tools menu, click Folder Options, click the Offline Files tab, click Advanced, and then select an option in the "When a network connection is lost" section.

Also, see the "Non-default server disconnect actions" setting.

French text from Windows 11 26H2

Détermine si les fichiers en réseau demeurent disponibles si l’ordinateur est subitement déconnecté du serveur qui héberge ces fichiers.

Ce paramètre désactive également l’option « Lorsqu’une connexion réseau est perdue » de l’onglet Fichiers hors connexion. Il empêche les utilisateurs de tenter de modifier l’option pendant qu’un paramètre en a le contrôle.

Si vous activez ce paramètre, vous pouvez utiliser la zone « Action » pour spécifier la façon dont les ordinateurs du groupe réagissent.

-- « Travailler hors connexion » indique que l’ordinateur peut utiliser les copies locales des fichiers en réseau quand le serveur n’est pas accessible.

-- « Ne jamais travailler hors connexion » indique que les fichiers en réseau ne sont pas disponibles lorsque le serveur n’est pas accessible.

Si vous désactivez ce paramètre ou si vous sélectionnez l’option « Travailler hors connexion », les utilisateurs peuvent travailler hors connexion en cas de déconnexion.

Si vous ne configurez pas ce paramètre, les utilisateurs peuvent travailler hors connexion par défaut, mais ils peuvent modifier cette option.

Ce paramètre apparaît dans les dossiers Configuration ordinateur et Configuration utilisateur. Si les deux paramètres sont configurés, le paramètre dans Configuration ordinateur est prioritaire sur le paramètre dans Configuration utilisateur.

Conseil : pour configurer ce paramètre sans recourir à un paramètre, dans l’Explorateur Windows, dans le menu Outils, cliquez sur Options des dossiers, cliquez sur l’onglet Fichiers hors connexion et sur Avancé, puis sélectionnez une option dans la section « Lorsqu’une connexion réseau est perdue ».

Consultez également le paramètre « Actions non standard lors de la déconnexion du serveur ».

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: OfflineFiles/Pol_GoOfflineAction_2
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Action
# Possible options:
#   Work offline = 0
#   Never go offline = 1
Set-ItemProperty -Path $k -Name 'GoOfflineAction' -Value 0 -Type DWord

Disable

# Disable: OfflineFiles/Pol_GoOfflineAction_2
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": OfflineFiles/Pol_GoOfflineAction_2
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
Remove-ItemProperty -Path $k -Name 'GoOfflineAction' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Action:Action :Lbl_GoOfflineActionComboDrop-down listenumGoOfflineActionREG_DWORD
Required · Default choice (UI): #0
LabelValue
Work offlineREG_DWORD = 0
Never go offlineREG_DWORD = 1

Availability