Error 51 Unexpected keyword
I have a windows 2003 SP2 DC (BMSDC1) and everytime I attempt open a GPO under AD Users and Computers Administrative Templates I receive the following error: Error 51 Unexpected keyword Found CATEGOR Expected CATEGORY The file cannot be loaded. Please advise. Thank you
March 22nd, 2010 5:22pm

It appears one of the ADM files the GPO is using contains a syntax error (CATEGOR vs. CATEGORY). Open the GPO, Under Computer right click Administrative Templates, Select Add/Remove Templates. A list of templates filenames will appear. These are located in C:\Windows\inf by default. They have the ADM file extension. You can remove each of them one at a time, and close then reopen the policy to determine which file has the error. Your can can use Wordpad and search each file for the Syntax error (use Match whole word only).
Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2010 5:42pm

Error 51 generally means, there is an issue with ADM file. Do you use any custom ADM files? Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+ Houston, TX http://blogs.sivarajan.com/ http://publications.sivarajan.com/ This posting is provided "AS IS" with no warranties, and confers no rights.
March 22nd, 2010 5:46pm

It is the defaultdomain.adm file and here is the contents. All looks fine. Any ideas? CATEGORY "Logon Settings" KEYNAME "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" POLICY "Default Domain" PART "Default Domain" EDITTEXT VALUENAME "DefaultDomainName" DEFAULT "BMS" REQUIRED END PART END POLICY END CATEGORY
Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2010 10:13pm

Untested, but I think REQUIRED may be placed incorrectly, or may not be valid (try removing it). Also, i usually put the KEYNAME after the policy title. See here for more information http://msdn.microsoft.com/en-us/library/aa372405(VS.85).aspx Here is my best shot. I hate custom ADM files because they have so many issues. The microsoft documentation is poor and lacks examples. CATEGORY "Logon Settings" POLICY "Default Domain" KEYNAME "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" PART "Default Domain" EDITTEXT REQUIRED VALUENAME "DefaultDomainName" DEFAULT "BMS" END PART END POLICY END CATEGORY
March 22nd, 2010 10:34pm

Here is the affected GPO. Can you review and advise?CATEGORY "Logon Settings" KEYNAME "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" POLICY "Default Domain" PART "Default Domain" EDITTEXT VALUENAME "DefaultDomainName" DEFAULT "BMS" REQUIRED END PART END POLICY END CATEGORY
Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2010 10:42pm

Hello, At the end you have to close the policy script with ; For example: END CATEGORY; Please let me know if this works? Regards, Emiel ter Bogt
March 15th, 2011 10:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics