[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2114
  • Last Modified:

Creating a Group Policy ADM to set the DefaultDomainName registry key

I want to create a custom .adm file to set the domain I am getting unexpected keyword errors for the following

 LASS MACHINE
      CATEGORY "DOMAIN Settings"
            CATEGORY "DOMAIN Server Setting"
                  POLICY "Default Domain"
                  KEYNAME "SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon
                  PART "DefaultDomainName" EDITTEXT
                  DEFAULT "DOMAINNAMEHERE"
                  END POLICY
      END CATEGORY
END CATEGORY

can anyone see what I am doing wrong .. thanks Michael
0
OSLEE
Asked:
OSLEE
  • 2
  • 2
1 Solution
 
Jay_Jay70Commented:
you havent specified where the key is....
0
 
Jay_Jay70Commented:
use the NUTS package
http://yizhar.mvps.org/
0
 
Chris DentPowerShell DeveloperCommented:

You're missing the VALUENAME part of the policy... without that it doesn't know what to alter.

You already have the KeyName:

KEYNAME "SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon

Is WinLogon the value you're trying to alter? Doesn't exist on my PC so I couldn't check.

Chris

0
 
OSLEEAuthor Commented:
the key name is "DefaultDomainName" it is a reg_sz value
0
 
Chris DentPowerShell DeveloperCommented:

Okay, then change it to:

CLASS MACHINE
     CATEGORY "DOMAIN Settings"
          CATEGORY "DOMAIN Server Setting"
               POLICY "Default Domain"
               KEYNAME "SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon"
               PART "Default Domain Name" EDITTEXT
                    VALUENAME "DefaultDomainName"
                    DEFAULT "DOMAINNAMEHERE"
               END POLICY
     END CATEGORY
END CATEGORY

You must always specify the ValueName you want to alter. The name you give to Part is just a name, nothing but aesthetics.

Chris
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now