Configure Redirection Guard
Configurer Redirection Guard
Explanation
Determines whether Redirection Guard is enabled for the print spooler.
You can enable this setting to configure the Redirection Guard policy being applied to spooler.
If you disable or do not configure this policy setting, Redirection Guard will default to being 'Enabled'.
If you enable this setting you may select the following options:
-- Enabled : Redirection Guard will prevent any file redirections from being followed
-- Disabed : Redirection Guard will not be enabled and file redirections may be used within the spooler process
-- Audit : Redirection Guard will log events as though it were enabled but will not actually prevent file redirections from being used within the spooler.
Détermine si Redirection Guard est activé pour le spouleur d’impression.
Vous pouvez activer ce paramètre pour configurer la stratégie Redirection Guard appliquée au spouleur.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, Redirection Guard est par défaut « Activé ».
Si vous activez ce paramètre, vous pouvez sélectionner les options suivantes :
-- Activé : Redirection Guard empêche le suivi des redirections de fichiers
-- Désactivé : Redirection Guard ne sera pas activé et les redirections de fichiers peuvent être utilisées dans le processus spouleur
-- Audit : Redirection Guard enregistre les événements comme s’ils étaient activés, mais n’empêchera pas réellement l’utilisation des redirections de fichiers dans le spouleur.
Use cases
Turns on Redirection Guard for the print spooler: the process no longer follows file redirections (junctions, links) that an administrator did not create, which closes a family of privilege escalations where a user hijacks a write made by the spooler, which runs as SYSTEM. Options: disabled (0), enabled (1), audit only (2), which logs without blocking.
If the policy is disabled or not configured, the default behaviour is “enabled”. The Windows 11 22H2 security baseline sets this to Enabled; audit mode helps spot a printer driver or print software that relies on a redirection before you enforce it.
Microsoft source: Windows 11, version 22H2 Security Baseline
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers- 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: Printing/ConfigureRedirectionGuardPolicy
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Redirection Guard Options
# Possible options:
# Redirection Guard Disabled = 0
# Redirection Guard Enabled = 1
# Redirection Guard Audit Only = 2
Set-ItemProperty -Path $k -Name 'RedirectionGuardPolicy' -Value 1 -Type DWordDisable
# Disable: Printing/ConfigureRedirectionGuardPolicy
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": Printing/ConfigureRedirectionGuardPolicy
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
Remove-ItemProperty -Path $k -Name 'RedirectionGuardPolicy' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Redirection Guard OptionsOptions de Redirection GuardRedirectionGuardPolicy_Enum | Drop-down listenum | RedirectionGuardPolicy | REG_DWORD | Default choice (UI): #1
|