Home > Windows Server Tips > Windows Systems and Network Administration > Debugging Userenv issues using Windows new event viewer
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WINDOWS SYSTEMS AND NETWORK ADMINISTRATION

Debugging Userenv issues using Windows new event viewer


Gary Olsen, Contributor
01.17.2008
Rating: -4.40- (out of 5)


News on enterprise Windows platforms and applications
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Although the Userenv.log is not the most cryptic log there is to read, it isn't exactly intuitive. IT managers do need some experience using it to extract information out of it to help them troubleshoot problems.

Generated by the userenv.dll, Userenv.log collects events -- including errors, warnings and informational messages related to the processing of Group Policies and the user profile configuration for a particular user during logon. KB221833 describes how to set verbose logging in the Userenv.log because normal output is useless for debugging problems.

To set verbose logging, set the registry key: Subkey: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon Entry: UserEnvDebugLevel Type: REG_DWORD Value data: 10002 (Hexadecimal)

Because Userenv.log is produced on every client and server for Windows 2000, Windows Server 2003 and XP, the procedure is to collect the Userenv.log on the client and its authenticating DC.

In the past, one of the most frustrating things was that the time stamp on events in the Userenv.log had no date. So to refine your troubleshooting to the current day, you had to delete or rename the old Userenv.log and then reproduce the problem. This was inconvenient and time-consuming.

Good news: Windows Vista and Windows Server 2008 do not use a Userenv.log. Instead, they dump it to the event viewer. There is now a Group Policy Operational Log that will log events specifically with Group Policy as the source.

In addition, Group Policy-sourced events will show up in the system event log. This is unlike the old Group Policy events that carried a userenv source along with a variety of other events related to such things as profiles. Furthermore, you can add verbosity to these events by setting a registry key:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\GPEditDebugLevel

Set this to a DWord typ...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Microsoft Windows Server 2008 Administration
Utilizing Active Directory snapshots in Windows Server 2008
How to configure backups and perform restores in Windows Server 2008
Using DFSR for SYSVOL replication in Windows Server 2008
Installing Server Core for Windows 2008 the easy way
File classification the automated way with Windows Server 2008 R2
Using DFS to create file system virtualization in Windows Server 2008
Internet Information Services (IIS) sees big changes in Windows Server 2008
Microsoft adds hypervisor support to Windows Server 2008 R2
File server migration tips for Windows Server 2008
Top five Server Core management tips for Windows 2008

Windows Systems and Network Management Tools and Techniques
Perfmon made easy with PAL utility
Troubleshooting Windows application crashes or hangs
Free Windows security tools every admin must have
Top five Server Core management tips for Windows 2008
Top free tools for Windows server administration
A first look at Internet Information Services 7.0
Windows registry hack improves offline file access for mobile users
Reducing the size of network backups in Windows
Monitor network bandwidth with CyberGauge
How to format NTFS: More tricks to improve file system performance

Windows Systems and Network Administration
Troubleshooting Windows application crashes or hangs
Converting VMware ESX machines to Hyper-V format
Using DFSR for SYSVOL replication in Windows Server 2008
Top 25 Windows PowerShell commands for administrators
Key DFS improvements in Windows Server 2008 R2
Free Windows security tools every admin must have
Group Policy makes strides in Windows Server 2008 R2
Quick tips for troubleshooting NTFS permissions
Common causes of Windows server security vulnerabilities
Cutting the cost of Windows identity and access management

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Server Core  (SearchWindowsServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


e and data of 10002. Note the similarity between this value and the UserEnvDebugLevel value above. This one will produce a GPEdit.log in the %windir%\debug\usermode directory, which is the same location that the old Userenv.log was located. Remember: This log contains Group Policy information exclusively, unlike Userenv.log.

If you haven't looked at the new event viewer in Windows Vista and Windows 2008, you should. Figure 1 shows a sample event viewer on a Windows 2008 domain controller.

[IMAGE]
Figure 1: Sample event viewer on a Windows 2008 domain controller.

The Windows Vista version will look similar but won't have the DC-related logs. It uses the new MMC 3.0 snap-in, like so many other administrative tools that have come out since Windows Server 2003 R2, so you should be getting used to the three panes.

Note in Figure 1 that the event viewer is considerably more complex than Windows Server 2003 with just a handful of event logs. See how far we had to drill down in the left pane to find the Group Policy Operational log. However, there is a very cool feature at the top of the left pane called Custom Views. Expanding Custom Views, as shown in Figure 2, we see Administrative Events.

[IMAGE]

Figure 2: Administrative Events

This is a collection of "Critical, Error and Warning events from all administrative logs," as the properties description of this group describes. With so many logs available, this is a nice summary of critical errors that Windows administrators should pay attention to -- sort of an automatic Eventcomb output. In Figure 2, we see a lot of Group Policy errors, which is much more descriptive than "Userenv."

You may choose to add your own custom views. For instance, maybe you want to have the Group Policy log added to Custom Views so you can see more of the Group Policy events that might help debug the critical Group Policy events shown in the Administrative Events custom view.

To do this, right click on Custom Views and select Create Custom View. In Figure 3, you can see the dialog shown in Create Custom View.

[IMAGE]

Figure 3: Dialog in Create Custom View.

Note that you can select the type of events to save -- critical, error, warning, etc. -- and that you can simply select "verbose." This is much easier than messing with the registry as previous Windows versions required.

See how we selected "by log" and browsed to the Group Policy Operational log and checked it. We can set up more filter features such as keywords if we wish. We also could have elected to create a custom view based on one or more event sources.

I like to think of Custom Views like the Saved Queries option in the Active Directory Users and Computers (ADUC) snap-in. It will then prompt us for a name -- and I specified "Group Policy" -- as well as a location for the view. I said to put it under Custom Views. You may want to keep this Group Policy custom view permanently, or you may want it just for debugging this problem and delete it later.

This feature of event viewer will undoubtedly prove to be a powerful debugging tool in Windows Server 2008 and Windows Vista. It also makes debugging Group Policy issues much easier than in older Windows products.

Gary Olsen is a systems software engineer for Hewlett-Packard in Global Solutions Engineering. He authored Windows 2000: Active Directory Design and Deployment and co-authored Windows Server 2003 on HP ProLiant Servers. Olsen is a Microsoft MVP for Windows Server-File Systems.


Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts