Turn on session logging
Activer la journalisation de session
Explanation
This policy setting allows you to turn logging on or off. Log files are located in the user's Documents folder under Remote Assistance.
If you enable this policy setting, log files are generated.
If you disable this policy setting, log files are not generated.
If you do not configure this setting, application-based settings are used.
Ce paramètre de stratégie vous permet d’activer ou de désactiver la journalisation. Les fichiers journaux sont situés dans le dossier Documents de l’utilisateur sous Assistance à distance.
Si vous activez ce paramètre de stratégie, les fichiers journaux sont générés.
Si vous désactivez ce paramètre de stratégie, les fichiers journaux ne sont pas générés.
Si vous ne configurez pas ce paramètre, les paramètres basés sur l’application sont utilisés.
Registry
HKEY_LOCAL_MACHINE\Software\policies\Microsoft\Windows NT\Terminal Services- Value name
LoggingEnabled
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
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: RemoteAssistance/RA_Logging
$k = 'HKLM:\Software\policies\Microsoft\Windows NT\Terminal Services'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'LoggingEnabled' -Value 1 -Type DWordDisable
# Disable: RemoteAssistance/RA_Logging
$k = 'HKLM:\Software\policies\Microsoft\Windows NT\Terminal Services'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'LoggingEnabled' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": RemoteAssistance/RA_Logging
$k = 'HKLM:\Software\policies\Microsoft\Windows NT\Terminal Services'
Remove-ItemProperty -Path $k -Name 'LoggingEnabled' -ErrorAction SilentlyContinue