FolderRisk: Caution
usermode C:\Windows\debug\usermode
Folder for user-mode debug logs, notably Group Policy processing logs (gpsvc.log, userenv.log) when enabled.
What it’s for
This folder holds debug logs from components that run in user mode, mostly those of the Group Policy client. It does not exist until verbose logging has been turned on.
What it contains
gpsvc.log: detailed log of the Group Policy client service (gpsvc). It only appears if you enable its debug level in the registry, theGPSvcDebugLevelvalue underHKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Diagnostics, for example0x30002. This is the one to read on current versions.userenv.log: old log of profile and policy processing, inherited from versions before Windows Vista (see its page).- Possibly the logs of other components enabled for a diagnosis.
Risks and best practices
- Nothing essential lives here, so you can delete everything. But turn verbose logging off as soon as the diagnosis is done:
gpsvc.loggrows fast and slows policy processing. - The logs name users, computers and policies: review them before sharing.
- Before enabling this debug level, check the Group Policy Operational log: it is enough in most cases.
Useful commands
# Turn on verbose Group Policy client logging (as administrator)reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Diagnostics" /v GPSvcDebugLevel /t REG_DWORD /d 0x30002 /f
# Turn it off again once the diagnosis is donereg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Diagnostics" /v GPSvcDebugLevel /f
# Group Policy operational logGet-WinEvent -LogName 'Microsoft-Windows-GroupPolicy/Operational' -MaxEvents 30 | Select-Object TimeCreated, Id, Message
# Policy application resultgpresult /r