Remove "Make Available Offline" for these files and folders
Supprimer l’option « Rendre disponible hors connexion » pour ces fichiers et dossiers
Explanation
This policy setting allows you to manage a list of files and folders for which you want to block the "Make Available Offline" command.
If you enable this policy setting, the "Make Available Offline" command is not available for the files and folders that you list. To specify these files and folders, click Show. In the Show Contents dialog box, in the Value Name column box, type the fully qualified UNC path to the file or folder. Leave the Value column field blank.
If you disable this policy setting, the list of files and folders is deleted, including any lists inherited from lower precedence GPOs, and the "Make Available Offline" command is displayed for all files and folders.
If you do not configure this policy setting, the "Make Available Offline" command is available for all files and folders.
Notes:
This policy setting appears in the Computer Configuration and User Configuration folders. If both policy settings are configured, the policy settings are combined, and the "Make Available Offline" command is unavailable for all specified files and folders.
The "Make Available Offline" command is called "Always available offline" on computers running Windows Server 2012, Windows Server 2008 R2, Windows Server 2008, Windows 8, Windows 7, or Windows Vista.
This policy setting does not prevent files from being automatically cached if the network share is configured for "Automatic Caching." It only affects the display of the "Make Available Offline" command in File Explorer.
If the "Remove 'Make Available Offline' command" policy setting is enabled, this setting has no effect.
Ce paramètre de stratégie vous permet de gérer une liste des fichiers et dossiers pour lesquels vous souhaitez bloquer la commande « Rendre disponible hors connexion ».
Si vous activez ce paramètre de stratégie, l’option « Rendre disponible hors connexion » n’est pas disponible pour les fichiers et dossiers que vous indiquez. Pour spécifier ces fichiers et dossiers, cliquez sur Afficher. Dans la colonne Nom de la valeur de la boîte de dialogue Afficher le contenu, tapez le chemin d’accès UNC complet du fichier ou du dossier. Ne renseignez pas le champ de la colonne Valeur.
Si vous désactivez ce paramètre de stratégie, la liste des fichiers et des dossiers est supprimée, ainsi que les listes héritées des objets de stratégie de groupe de priorité moindre, et la commande « Rendre disponible hors connexion » est affichée pour tous les fichiers et dossiers.
Si vous ne configurez pas ce paramètre de stratégie, la commande « Rendre disponible hors connexion » est disponible pour tous les fichiers et dossiers.
Remarques :
Ce paramètre de stratégie apparaît dans les dossiers Configuration ordinateur et Configuration utilisateur. Si vous configurez les deux paramètres de stratégie, ils sont combinés et la commande « Rendre disponible hors connexion » n’est disponible pour aucun des fichiers et dossiers spécifiés.
La commande « Rendre disponible hors connexion » est appelée « Toujours disponible hors connexion » sur les ordinateurs Windows Server 2012, Windows Server 2008 R2, Windows Server 2008, Windows 8, Windows 7 ou Windows Vista.
Ce paramètre de stratégie n’empêche pas la mise en cache automatique des fichiers si le partage réseau est configuré pour une « mise en cache automatique ». Cela n’affecte que l’affichage de la commande « Rendre disponible hors connexion » dans l’Explorateur de fichiers.
Si le paramètre de stratégie Supprimer la commande « Rendre disponible hors connexion » est activé, ce paramètre n’a aucun effet.
Registry
HKEY_CURRENT_USER\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_NoPinFiles_1
$k = 'HKCU:\Software\Policies\Microsoft\Windows\NetCache\NoMakeAvailableOfflineList'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Files and Folders
$items = @{
'<name1>' = '<value1>'
'<name2>' = '<value2>'
} # Replace the values with your own
$items.GetEnumerator() | ForEach-Object { Set-ItemProperty -Path $k -Name $_.Key -Value $_.Value -Type String }Disable
# Disable: OfflineFiles/Pol_NoPinFiles_1
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": OfflineFiles/Pol_NoPinFiles_1
$k = 'HKCU:\Software\Policies\Microsoft\Windows\NetCache\NoMakeAvailableOfflineList'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Files and Folders:Fichiers et dossiers :Lbl_NoPinFilesList | List (table)list | Software\Policies\Microsoft\Windows\NetCache\NoMakeAvailableOfflineListName = value pairs · additive | REG_SZ (values under the key) |