Group Policy
Group Policy
Group Policy:
Jeremy Moskowitz
Mark Minasi Windows Administrator Library
SeriouS SkillS.
Contents at a Glance
Introduction Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Appendix A Index Group Policy Essentials Managing Group Policy with the GPMC Group Policy Processing Behavior Troubleshooting Group Policy ADM and ADMX Template Management Implementing Security with Group Policy Windows Vista Security Enhancements with Group Policy Scripting GPMC Operations Profiles: Local, Roaming, and Mandatory Implementing a Managed Desktop, Part 1: Redirected Folders, Offline Files, and Disk Quotas The Managed Desktop, Part 2: Software Deployment via Group Policy More to Love: Deploying Printers, Shadow Copies, and Using Windows Deployment Services Group Policy Tools xxvii 1 65 119 175 267 309 381 433 469 527 621 697 741 761
You might occasionally wonder, Where do all those bazillions of policy settings come from? Theyre not a magical gift from the Group Policy Fairy Godmothertheyre encoded inside files within Windows which allow you to do the stuff you want to do. Group Policy has lots of nooks and crannies in which many options can be set. Its likely youll spend most of your time manipulating the Administrative Templates section. Consequently, you need to know where all these settings come from. In Windows XP, the Administrative Templates section comes from ADM files. In Windows Vista, that same section comes from ADMX files. These templates hold the key to a large chunk of what makes Group Policy great. These settings are so important and powerful because they alter the Registry on the target computer. These ADM and ADMX files describe the Registry settings that can be toggled on or off through the Group Policy Object Editor. Thats where the duality of this chapter comes in. Its not only going to be really important to understand the under the hood goings-on of both ADM and ADMX files, but also where Windows Vista brings new features to the table when ADMX files are used. And, while not strictly necessary, if you want to take your Group Policy game to the next level, you might want to invest some time in understanding the language used to create ADMX files. After you understand the syntax, you can create, modify, and troubleshoot almost any Registry change that is implemented by the Administrative Templates in the Group Policy Object Editor. Finally, a little later in the chapter, well explore a new tool from Microsoft and FullArmor which can take existing ADM files you might already have and convert them into ADMX files.
Youll find the complete reference for creating your own ADMX templates in the ADMX Template Syntax download on this books website. If you still feel you need to create ADM files after reading this chapter, the previous editions download of a similar reference, ADM Template Syntax, should still be available on GPanswers.com as well.
This title is not available as an eBook. For ordering information, please see the last page of this sample chapter.
268
Chapter 5
It should be noted that local administrators have security permissions to these keys and could maliciously modify delivered GPO settings because of rights within this portion of the Registry.
This is the magic that makes Group Policy shine over old-style NT 4 System Policy; that is, Group Policy wont tattoo because its being directed to go in a nonsticking place in the Registry. Old-style NT 4 System Policy had no such facility. Today, Microsoft calls these NT-style policies that tattoo preferences. You might want to control a pet application that you have deployed in-house, say, DogFoodMaker 6.1. Greatyouve decided you want more control. Now, you need to determine which Registry values and data DogFoodMaker 6.1 understands. That could take some time; you might be able to ask the manufacturer for the valid Registry values, or you might have some
269
manual labor in front of you to determine what can be controlled via the Registry. Youll then be able to begin to create your own templates. However, after youve determined how DogFoodMaker 6.1 can be controlled via the Registry, youll find you have two categories of Registry tweaks: Values that fit neatly into the new Policies keys listed earlier Values that are anywhere else Youll have some good news and some bad news. If DogFoodMaker 6.1 can accept control via the Registry, you can still create template files and control the application. The bad news is that if the Registry punches it accepts are not inside the Policies keys listed earlier, you will not have proper Policies. Rather, they become old-style tattooing preferences. To reiterate, the target applications must be programmed to look for values in the Policies keys. Some applications, such as Word 2000, check the Policies keys (specifically HKEY_ CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Word\). Other applications, such as WordPad, do not understand the Policies keys. (WordPad looks in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\ Wordpad). Hence, WordPad wouldnt be a candidate to hand-create a template file for the purpose of coding for true policies settings. You could, however, still create your own preferences for WordPad that modify and tattoo the Registry. Therefore, you will have to do the legwork to figure out if your applications are compatible with the new Profiles keys. Because preferences and policies act so differently, you will need to quickly identify them within the Group Policy Object Editor interface. You will want to note whether youre pushing an actual new-style policy to them or a persistent old-style policy. Youll see both cases in this chapter. When viewed on Windows Vista, new-style policies are designated by little paper icons. When viewed on Windows XP, new-style policies are designated by little blue dots. Again, these are proper because they modify the Policies Registry keys. Policies that represent Registry punches in places other than the preferred Microsoft policies are designated another way. On Windows Vista, theyre represented by paper icons with a down arrow. On Windows XP, theyre designated by red dots. Again, youll see this distinction a bit later as you work through the examples. Since this is an important distinction in the rest of this chapter, lets recap: New-style policies are temporary Registry changes that are downloaded at logon and startup (and periodically in the background). They dont tattoo the Registry (though they are maintained and stay persistent should the user log on while offline). These are set to modify the Registry in specific Microsoft-blessed Policies keys. Applications need to be coded to recognize the presence of the keys in order to take advantage of the magic of policies. In the Vista Group Policy interface, these look like little paper icons. New-style policies also dont overwrite user preferences if they exist. For instance, if a program like Microsoft Word is policy-enabled, and a user specifies to enable Correct two initial capitals, but later the administrator chooses to disable this setting with a GPO, the original users desires will just magically come back. So, when you remove a true policy setting from a GPO (that is, set to Not Configured), the original user preference will be returned.
270
Chapter 5
Old-style preferences are persistent Registry changes sent from on high using the Group Policy Object Editor. These typically tattoo the Registry until theyre specifically removed. In the Vista Group Policy Object Editor interface, they look like paper icons with a little down-arrow. Unlike new-style policies, if you remove the GPO, you orphan the settings on the target computer (no fun at all). They work like old-style NT System Policy. These can be set to modify the Registry anywhere. Hang tight, dear reader. The differences between preferences and policies will be underscored a bit later when we add in additional templates and you create your own settings to manipulate your clients later in this chapter.
inetcorp.adm and inetset.adm are two ADM templates which can alternatively be used to manipulate Internet Explorer settings. However, it is not advised, as they dont work well for newer versions of Internet Explorer.
271
Default ADM Templates Features NetMeeting settings. Where to Find in Interface Computer Configuration/User Configuration Administrative Templates Windows Components NetMeeting Computer Configuration/User Configuration Administrative Templates Windows Components Internet Explorer
Inetres.adm
Internet Explorer settings, including security, advanced options, and toolbar settings. It is equivalent to the options that are available when using the Internet Options menu inside Internet Explorer. Used for Internet Explorer Maintenance preference mode settings.
User Configuration Windows Settings Internet Explorer Maintenance. We wont be exploring this particular ADM template much. If you want more information on its ins and outs, read http://tinyurl.com/ z3cae. It is not suggested to use this unless especially directed by a specific Microsoft document or PSS person. User Configuration Windows Settings Internet Explorer Maintenance Advanced. Only visible in Internet Explorer Maintenance Preference mode (see Chapter 6s Internet Explorer Maintenance Policies section). It is not suggested to use this unless especially directed by a specific Microsoft document or PSS person.
Inetset.adm (not Internet Explorer used in a GPO by Advanced Settings for default) Internet Explorer 6.
System.adm
Everything else under Computer ConfiguOperating system changes and settings. Most of the Com- ration/User Configuration Administraputer and User Administrative tive Templates Template settings are in this ADM template. Windows Media Player 9 settings. User Configuration Administrative Templates Windows Components Windows Media Player Computer Configuration Administrative Templates Windows Components Windows Update
Wmplayer.adm
Wuau.adm
272
Chapter 5
Windows Vista ADMX files are stored in the %systemroot%\PolicyDefinitions folder, which is usually C:\windows\PolicyDefinitions. There are now about 132 ADMX files which roughly cover the same settings found in Windows XP. Theyre generally component specific. For instance, youll find things like WindowsMediaPlayer.admx and EventLog.admx, amongst others. Heres something neat about ADMX filestheyre language neutral. That is, the definitions for the Registry values that are controlled are inside the ADMX file. However, the text strings describing the policy and the Explaintext are contained within a separate file called an ADML file. These ADML files are located in specific sub-directories for each language within the c:\windows\ PolicyDefinitions folder. For instance, U.S. English is contained within the en-US directory, which can be seen in Figure 5.1.
en-US is for US English. For other locales, visit http://tinyurl.com/qpomo. For instance, HE is for Hebrew, RU is for Russian, DE is for German, AR is for Arabic.
On GPanswers.com in the Book Resources section, Ill have a table with the names of all the ADMX and ADML files, what they do, and more.
FIGURE 5.1 A quick list of some ADMX files. Note the language-specific directory here for English (en-US).
273
Lots and lots of definitions are Definitions are split logically into much smaller ADMX packed into several large-ish files. files, generally by Windows feature area. The biggest one is SYSTEM.ADM. Each ADM file contains settings in one specific language. ADMX files are language neutral. Language-specific information is contained within a corresponding ADML file. Language-specific files live in hard-coded directories. For example, U.S. English language files live in %systemroot%\PolicyDefinitions\en-us. Live on each Windows Vista machine in %systemroot%\PolicyDefinitions GPOs created from ADMX files never have big space requirements. Thats because the ADMX files are never pushed into the GPO themselves (regardless if the Central Store is used or not). We'll discuss the Central Store a bit later. Use standard XML as the syntax for describing Registry policy.
Live on each Windows XP machine in %systemroot%\inf. Every time a GPO is born it costs about 35MB on each Domain Controller because the ADM files are placed inside the GPO. Use their own proprietary ADM syntax for describing Registry policy.
274
Chapter 5
Youre likely to have a mix of client and server systems. Its likely youll have: Domain Controllers: Windows 2000, Windows Server 2003, and/or Longhorn Servers Member servers: Windows 2000, Windows Server 2003, and/or Longhorn Server Client machines (your users machines): Windows 2000, Windows XP, Windows Vista Management stations (your machines, the ones you manage Group Policy from): Windows XP, Windows Vista Figure 5.2 shows a typical Active Directory domain that could be representative of what you might have. The question is: With all these types of client systems, how do we ensure weve got the maximum power to control them all? Thats what were going to explore in this next section.
FIGURE 5.2 A typical Active Directory domain with administrative systems, client systems, Domain Controllers and servers
Your machinesthe Administrators who control Group Policy Administrators Windows XP Administrators Windows Vista Users client machinesSales, Marketing, HR, etc. Windows XP Windows 2000 Windows Vista File servers
Active Directory Domain Controllers of any kind (Windows 2000 and above)
WS03FS01 WS03FS02
275
Do you use any machine you happen to be working on that day to create or modify your GPOs? (This could be a Windows 2000, Windows XP, serverwhatever.) Do you use a specific machine to manipulate all the GPOs over which you have control? That is, do you have a management station you use when you need to manage your GPOs? If you use either the first or second option, youre likely going to want to change your habits and start working with a strategy that gets you toward a management station. Heres why. Every time a new operating system is released (and again each time a new service pack is released), theres more power to behold. Heres a brief history of increased power and what you can control: Windows Version Windows 2000 Windows 2000 + SP1 Windows 2000 + SP4 Windows XP Windows Server 2003 Number of Policy Settings About 300 policy settings About 20 additional policy settings 5 additional policy settings About 150 additional policy settings About 24 additional policy settings About 10 additional policy settings About 600 additional policy settings What Can You Control? Windows 2000 Windows 2000, Windows 2000 + SP1 All version of Windows 2000 Windows XP and all versions of Windows 2000 Windows Server 2003, Windows XP, and all versions of Windows 2000 Windows XP + SP1, Windows XP, and all versions of Windows 2000 Windows XP + SP2, Windows XP + SP1, Windows XP, and all versions of Windows 2000
Windows XP + SP1
Windows XP + SP2
About 5 additional policy settings Windows Server 2003 + SP1, Windows Server 2003, Windows XP + SP2, Windows XP + SP1, Windows XP, and all versions of Windows 2000 About 700 additional policy settings Windows Vista, Windows Server 2003 + SP1 , Windows Server 2003, Windows XP + SP2, Windows XP + SP1, Windows XP, and all versions of Windows 2000
Windows Vista
276
Chapter 5
Number of Policy Settings Even more additional policy settings (not yet known at this time)
What Can You Control? Longhorn Server, Windows Vista, Windows XP + SP2, Windows XP + SP1, Windows XP, Windows Vista, Windows Server 2003 + SP1, Windows Server 2003, and all versions of Windows 2000
Additionally, when service packs come out, Microsoft has been known to update the wording of policy settings and the Explaintext for clarity (though its underlying actions are usually the same).
So, Microsoft makes updates; you have more power, right? Sure. But the message is clear: if you want to control every client and server machine in your environment using Group Policyuse the latest version of the OSWindows Vista.
Creating and Editing a New GPO While Using a Pre-Vista Management Station
In order for us to create GPOs using a Windows XP machine, we need to have the GPMC console loaded (downloadable at http://tinyurl.com/q77wx). Note that the GPMC requires the .NET Framework files (downloadable at http://tinyurl.com/758p8).
Note the GPMC requires .NET Framework 1.1. If you only have 2.0, the GPMC wont install.
Recall from Chapter 4 that when you use any ADM templates, these templates are added to the file-based Group Policy Template (found in SYSVOL) of the GPO. Unfortunately, theres no master update location where you can just drop the latest ADM files from Microsoft (or other vendors) and universally update the ADM files of existing GPOs and any future GPO
277
that will be created. Indeed, youll need to understand where new GPOs get their ADM templates from when you create new GPOs or modify existing GPOs. In all cases, the editor you use (either Active Directory Users And Computers or GPMC) really uses the GPEDIT MMC snap-in (really the GPEDIT.DLL) when actually poking around or creating new GPOs. GPEDIT pulls the ADM template files from the computer it is running on. And it yanks these ADM template files from %systemroot% \infusually c:\windows\infdirectly into the GPO. Each time you do this, youre burning about 35MB of disk spaceon every Domain Controller. This is because all material inside the GPO is replicated to every Domain Controller. If youve created 100 GPOs using pre-Vista machines (like Windows XP or Windows 2000), youre using about 300500MB of disk spaceon every Domain Controller to store these ADM files. This problem is called SYSVOL bloat. In Figure 5.4, you can see a sample SYSVOL with several GPOs. Recall that GPOs live on every Domain Controller in the sysvol\corp.com\ Policies directory underneath their GUID. Each GPO has an ADM directory each containing the same ADM templates at about 35MB each directory.
FIGURE 5.3 Whats copied into the GPO when using which type of management station
Your machinesthe Administrators who control Group Policy Administrators Windows XP (ADM files) Administrators Windows Vista (ADMX files)
ADM files from the \windows\inf directory copied into the GPO Active Directory Domain Controllers of any kind (Windows 2000 and above) GPO: Sales desktop settings
DC01
278
Chapter 5
FIGURE 5.4 Every GPO created with a pre-Vista management station pushes about 3.3MB into SYSVOL.
How to Prevent SYSVOL Bloat If Youre Still Using Pre-Vista Management Stations
There is a way to avoid copying up the ADM files into the GPO, hence wasting the 35MB on each Domain Controller per GPO. The trick is to use a policy setting entitled Always use local ADM files for Group Policy Object Editor (located in Computer Configuration Administrative Templates System Group Policy) and have it affect your management station. By enabling this policy, youre telling your management station: Im not going to push ADM files into the SYSVOL folder. Sounds great, right? The downside, however, is that if you try to edit the GPO on a machine that doesnt have the same ADM templates as the GPO (or worse, the local machine is just plain missing an ADM template), you simply wont be able to edit the GPO the way you want. Youll have to track down the original machine that had the full complement of ADM templates to properly manage the GPO. Because of the downsides, this workaround is only suggested for very large environments that have lots of GPOs which are taking a long time to replicate because of all the ADM template data being pushed into the GPO.
279
Heres the big ol scary warning about the policy setting: it only works if the management station is Windows Server 2003 (not Windows XP). Why? I have no idea. So, if you want to prevent SYSVOL bloat from ADM files, and you want to utilize this sneaky way to do it, you absolutely must make your management station Windows Server 2003 (and not Windows XP). Microsoft talks a bit more about this in Knowledge Base article 816662.
280
Chapter 5
Scenario 1: Start Out by Creating and Editing GPO on Pre-Vista Management Station. Edit Using Another Pre-Vista Management Station.
Again, here, Windows Vista isnt involved. In this scenario, its all about pre-Vista machines using old-school ADM templates and ADM template behavior. And, of course, note that by creating a GPO using a Windows XP machine, you wont be able to get to any of the Vista goodiesthats because all the Windows Vista goodies are only available when you use a Windows Vista management station. So, lets imagine that youve created 128 GPOs using an old-and-crusty Windows 2000 machine. Of course, all 128 GPOs have the Windows 2000 versions of those ADM templates (yes, old and crusty). Now, you learn about a policy setting in Windows XP that requires the corresponding Windows XP templates. What are you going to do? Easy! Jump on a Windows XP machine and edit the GPO using the GPMC! This is because, as we already understand, the ADM template files used to modify and update a GPO are always copied from your management station. Older ADM templates inside GPOs are automatically updated when you re-edit a GPO on a machine that has new ADM templates. When you edit the GPO on your Windows XP management station and merely look at the policy settings in the Administrative Templates section, the editor will say: Ah-ha! Ive got Windows XP templates available to me! This specific GPOs ADM templates are only Windows 2000! I can tell because the date is sooo old. Ill update the underlying ADM templates automatically from c:\windows\inf in Windows XPwithout even saying a word. Thats because I have newer ones! And it then proceeds. And it proceeds because the time/date stamp for Windows XP ADM templates your editor has access to is more recent than the time/date stamp for Windows 2000 ADM templates. Its doing you a favor behind your back. You must repeat for every old GPO you want to update. If you want to update all your GPOs with Windows XP ADMs, you simply have to open each old GPO and look at the policy settings in the Administrative Templates section. But again, you need to do this from a Windows XP management station. Then theyll be updated.
281
Again, theres no universal master update location where you can just drop in your latest ADM templates and be done. However, with a script, you can update all your GPOs at one time (see the sidebar Automatically Updating All Your Existing GPOs at Once with the Latest ADM Templates.)
Automatically Updating All Your Existing GPOs at Once with the Latest ADM Templates
In Chapter 7, youll get a grip on all the myriad of things you can do with scripting and Group Policy. However, one thing that we wont tackle there (but we do want to tackle here) is how to automatically update all your existing GPOs with the latest ADM templates. As of this writing, the latest ADM templates are Windows 2003/SP1, but you could use this same tip to update all your GPOs with the ADM templates from, say, Windows XP/SP2 or earlier (not that you would really want to). Or, use this tip when XP/SP3 comes out. To update all your GPOs (or just some of them), Microsoft has a downloadable script that will do this for you at http://tinyurl.com/7v4s2. It runs as a command line (as opposed to a GUI-based script). When youre ready to give the script a try, be sure to run it from the command line as cscript admupdate.vbs so it continues to use the command line for output (and not try to push data to the graphical output). Heres what you need to tell the script: You need to tell it which GPOs to update. You can update using the /GUID switch, the / GPOfriendlyname switch, or the very powerful /ALL switch. You need to tell it where the latest ADM files reside. You do this with the /ADMSRC switch. You need to tell it what domain to update. You do this with the /DNSDOM:<domain> switch. There are other switches available. But, if you tell it just this much information, it performs a simulation of what it will do. When youre actually ready for the script to do the deed and perform the upgrade, you need to add the /FILECOPY:ON switch (not shown in the preceding example). This actually performs the work. Note that this could take a long time and cause a lot of replication traffic. So, be sure to do it in the off-hours if possible. Again, running this script isnt expressly necessaryfor two reasons. First, because, as weve discussed, anytime you specifically touch an old GPO with an updated management station, the GPO will be automatically updated. Use this script to simply guarantee that the latest ADM files are pushed to every GPO. Second, by the time this chapter is over, Im going to have convinced you to use a Windows Vista management station. And, then the GPOs themselves wont care about ADM files at all. But, if youre still in a Windows XP-only environment, where you dont even have one Windows Vista management station, then this tip is still useful for you.
282
Chapter 5
Scenario 2: Start Out by Creating and Editing a GPO on a PreVista Management Station. Edit Using a Windows Vista Station.
This will be the common upgrade scenario. That is, youve already got your gaggle of GPOs created. You created them using Windows 2000, Windows XP, or Windows Server 2003 with Active Directory Users and Computers or the GPMC. Now, Vista comes along, and youre ready to use it. What happens? Not much! If you start to use a Vista management station and edit an existing GPO created by a pre-Vista operating system, nothing happens in SYSVOL. No Vista ADMX files are copied anywhere, and very little happens overall. However, while youre editing the GPO, youll have access to all the latest-greatest Vista policy settings, one of which is seen in Figure 5.6. For arguments sake, lets say you decided to enable Turn off Windows HotStarta Windows Vista-only feature. Now, what happens if you try to edit and/or report on those settings using Windows XP? Short answer: Its not good. Thats because Windows XP doesnt know how to interpret the Vista-only settings youve set within the GPO. If you try to edit the GPO on a Windows XP machine, you simply wont see the newly available Windows Vista policy setting. And, if you try to look at it using the GPMCs Settings Report feature, the Vista-only settings show up as Extra Registry Settings as seen in Figure 5.7. In Figure 5.7 you can see the Settings tab from GPMC running on an XP machine, which is a report of whats going on inside the GPO.
FIGURE 5.6 updated settings. Editing an existing GPO with Vista gives you the ability to see
283
FIGURE 5.7 Windows XP doesnt know how to interpret Vista-only settings within a GPO. These settings show up as Extra Registry Settings.
Again, if you were to continue to use your Windows XP management station to edit the GPO, youd find that you simply wouldnt be able to find the Turn off Windows Hotstart policy settingor any other Windows Vista-specific policy setting for that matter.
While its clearly not a good idea, there is nothing that technically that prevents you from using Windows XP to make a change to a GPO that was edited by Vista. In short, you simply cant see the Vista settings.
If a custom ADM file has been added to the GPO (yes, ADM) then Vista will utilize it and present it.
Scenario 3: Start Out by Creating and Editing a GPO on a Windows Vista Management Station. Edit Using Another Windows Vista Station.
This is the scenario you want to strive for. That is, always use Windows Vista to create and edit your GPOs. When Windows Vista + SP1 comes out (with its additional policy settings),
284
Chapter 5
youll be all set. You wont have to do a thing (except use a Windows Vista + SP1 management station) to be latest and greatest. If you backtrack to a Windows Vista (no service pack) machine, you wont have access to the latest and greatest Vista + SP1 settings (and the GPMC wont accurately report whats Enabled or Disabled, either because it simply cannot know about those updated policies). So, it sounds like the message is. Always use the latest-greatest operating system and service pack as my management station. But what if youre not ready to personally upgrade your management station to the latest and greatest? Or, what if you had 20 administrators, each with their own management station? If only there were a way to ensure that all your administrators always used the latest and greatest ADMX files, youd have no issues. That way, even older version of Windows Vista would be able to determine the latest and greatest settings. Sounds like a dream, right? Good news: Its a dream that well make a reality in the next big section, with the Central Store. so stay tuned!
Scenario 4: Start Out by Creating and Editing a GPO on a Windows Vista Management Station. Edit Using a Windows XP Management Station.
Avoid this scenario whenever possible. This is the worst of all worlds because when you originally created the GPO on your Windows Vista management station, you did so without copying the 35MB of ADM files up (remember: Windows Vista doesnt use ADM files). So, you did good here! However, by merely viewing the GPO using Windows XP, you end up pushing up the 35MB of ADM files into the GPO. So, every time you do this, youll see an ADM directory inside the GPO because they were pushed up from your Windows XP machine. And its done invisibly.
285
As youre reading this right now, Vista is pretty darned new. But lets fast forward a bit and assume, oh, that were up to Windows Vista + SP3. Yep, Windows Vista Service Pack 3 has just been released and you need to control the new whiz-bang features that only come with Windows Vista + SP3 client computers. (Again, Im dreaming a little into the future here; new whiz-bang features might or might not come in service packs or other delivery vehicles, but stay with me through this example anyway). No problem! you say, Ill just create a Windows Vista management station. And youd be right! Except that you already have a Windows Vista management station. So you wouldnt want to run out and create a whole new machine just for this. Youd want to leverage the Windows Vista management station you already have, right? Sure! This is easy! Youre a diligent administrator (you bought this book, after all), and you know you have two ways to update your current management station: Apply SP3 to your Windows Vista management station. That would update the ADMX files which live in c:\windows\PolicyDefinitions. Or, you could forgo applying SP3 to your Windows Vista management station and simply copy the ADMX (and associated ADML files) from another Windows Vista + SP3 machine to your management station. Again, youll plunk them in the c:\windows\ PolicyDefinitions directory. So, the message again sounds simple: whenever Microsoft has new ADMX/ADML files, get them into your management station. Simple, yesuntil you realize you have 20 administrators in your company, each with their own Windows Vista management station. Or you remember those administrators who love to bounce from machine to machine because they have three sites to run. Yikes! How are you going to guarantee that all of these administrators will use the updated ADMX files? Lets assume youve successfully upgraded your Windows Vista management station to SP3, but only some of your 20 administrators successfully upgrade to Windows Vista + SP3 (or have created custom ADMX files) (or jam in the ADMX files into c:\windows\PolicyDefinitions). This becomes a big problemfast. Heres why: If you create a new GPO, that GPO will have the definitions for all the whiz-bang stuff Windows Vista + SP3 has to offer. However, when another administrator (who doesnt have the latest ADMX files) tries to edit or report on that GPO, they simply wont see the policy settings for Windows Vista + SP3 available.
GPMC reports about this newly created GPO would show them as Extra Registry Settings, but actually trying to edit the GPO itself will not show the new whiz-bang features.
What you need is a way to ensure that all administrators who are using Windows Vista management stations have a one-stop-shop way to ensure theyre getting the latest ADMX files. That way, everyone will be on the same page, and there will be no challenges when one administrator creates a GPO and another tries to edit it.
286
Chapter 5
On the PDC emulator, use explorer or the command line to create a directory within %systemroot%\sysvol\sysvol\domain name\policies. You want to create a directory called PolicyDefinitions as seen in Figure 5.8. We need a location to store our language-specific ADML files. Within PolicyDefinitions youll create a directory for each locale. Again, U.S. English is US-EN. For other locales, visit http://tinyurl.com/qpomo.
2.
Note that the directory name must be the same as specified in the locale reference page. If its not, the ADMX file will not find its corresponding ADML file for that language.
287
To copy in the ADML files into, say, the U.S. English directory we created earlier:
xcopy %systemroot%\PolicyDefinitions\EN-US\* %logonserver%\sysvol\%userdnsdomain%\policies\POlicyDefinitions\EN-US\
You can also use a free graphical utility for creating and populating the central store automatically at www.gpoguy.com/tools.htm.
288
Chapter 5
289
Office 2007 has, confusingly, both ADM templates and ADMX templates. As of this writing, ADMX templates are not available for download, but the ADM templates are. You can find the ADM templates here, www.tinyurl.com/hzfcr, but dont bother putting them in the Central Store, because ADM templates and the Central Store dont mix.
290
Chapter 5
When adding an Administrative Template, the interface suggests that you can choose to add it from either the Computer Configuration or the User Configuration node. In actuality, you can add the ADM template from either section, and the appropriate policy settings appear under whichever node the ADM template was designed for.
291
You can still Add/Remove Templates from a GPO you create with
Once ADM templates are added using a Windows Vista management station, ADM templates show up under a special node within the Group Policy Object Editor, called Classic Administrative Templates (ADM) as seen in Figure 5.11. In Figure 5.11, Ive loaded an ADM template for Word 2003 (again, Ill show you where to get these templates in a minute so you can experiment, too).
292
Chapter 5
FIGURE 5.11 ADM templates are permitted in GPOs created from Windows Vista management stations. True policy settings are automatically available for use.
Click the Add button to open up the file requester, and select to load the ADM template you want. Ill show you in the next section or two where to track down more ADM files, but I wanted to show you this first so youd know how to use them. Once loaded, youll see the same Classic Administrative Templates (ADM) node and the list of categories contained within the ADM file containing preferences (as seen in Figure 5.12). But, you wont see any settings. Again, thats because the Group Policy Object Editor automatically prevents you from seeing preferencesyou need to turn on that ability inside the GPO. To see the preference settings contained within the ADM file, use the menu at the top and select View Filtering to open the Filtering dialog box, as shown in Figure 5.13. By default, the Only show policy settings that can be fully managed check box is checked. This is a safety mechanism that prevents old-style tattooing policies from being visible. Uncheck the check box, and youll be in business. After you turn on the ability to see the preferences within the interface, youll notice that icons for old-style preferences have paper icon with a down arrow on them. This is to indicate that this is a preference and not a true policy, and these values will stick around even after the policy no longer applies to the user or computer. Indeed, the Windows Vista Group Policy Object Editor is nice enough to even tell you this fact, as seen in Figure 5.14. You can see the little down arrow icon for any tattooing preference.
293
FIGURE 5.12 ADM files containing preferences will show the categories available, but not the actual preferences until you enable that feature for the GPO.
FIGURE 5.13 To see old-style preferences, clear the Only show policy settings that can be fully managed check box. This check box is checked by default to prevent you from seeing old-school preferences.
294
Chapter 5
FIGURE 5.14 Windows Vistas Group Policy Object Editor warns you about the issues when leveraging preferences and not policies.
For information on how to automatically deploy Office 2000, XP, or 2003 (with patches and personalized customizations) to your users, see Chapter 10.
295
The file youre looking for (with either Office 2000 or XP) is called Orktools.exe (for Office 2003, its Ork.exe), and its about 9MB. After you install the corresponding Resource Kit on your management station, the following files are automatically placed in the \windows\inf folder for importation like the other ADM files.
Office 2000, Office XP, Office 2003, and Office 2007 ADM Templates
Here is a list of the ADM templates available for Office 2000, Office XP, Office 2003 and Office 207. Office 2000 Templates access9.adm clipgal5.adm excel9.adm frontpg4.adm instlr1.adm office9.adm outlk9.adm ppoint9.adm pub9.adm word9.adm N/A N/A Office XP Templates access10.adm gal10.adm excel10.adm fp10.adm Office 2003 Templates access11.adm gaal11.adm excel11.adm fp11.adm Office 2007 Templates access12.adm N/A excel12.adm N/A Description Access settings Restrict access to media clips Excel settings FrontPage settings Windows Installer settings Common Office settings Outlook 2000 settings PowerPoint settings Publisher settings Word settings Visio Settings Corporate Windows Error Reporting (see the Microsoft Corporate Error Reporting section later in this chapter)
instalr11.adm instalr11.adm N/A office10.adm outlk10.adm ppt10.adm pub10.adm word10.adm N/A N/A office11.adm outlk11.adm ppt11.adm pub11.adm word11.adm N/A aer.adm office12.adm outlk12.adm ppt12.adm pub12.adm word12.adm visio12.adm N/A
296
Chapter 5
Description Microsoft Relationship Manager File location Microsoft OneNote 2003 settings Calendar Printing Assistant for Outlook 2007 Groove 2007 Office InterConnect 2007 InfoPath 2007 Project 2007 Sharepoint Designer 2007
N/A
N/A
scrib11.adm
onent12.adm
N/A
N/A
N/A
cpao12.adm
If you dont want to use the Office 2000 ADM templates in this example, you can substitute Office XP or Office 2003 templates. Just make sure you also have the corresponding Office suite installed on the target machine!
Here, youll see how to use an additional template. Well load the WORD9.ADM template alongside our current default templates. Then, well change the default behavior of our Human Resources users for Word 2000 as follows: The grammar checker is turned off while we type in Word. The spell checker is turned off while we type in Word. Word will ignore words in uppercase during spell check. Word will ignore words with numbers during spell check.
297
To change Words default behavior for the Human Resources Users OU, follow these steps:
1. 2. 3. 4. 5. 6. 7.
Log on to your Windows Vista management station as the Domain Administrator. Download the Office 2000 Resource Kit tools and make sure the ADM templates are properly installed in the \windows\inf folder. Fire up the GPMC. Right-click Human Resources Users OU and select Create and link a GPO here. Create a new GPO called Word 2000 Settings. Edit the Word 2000 Settings GPO. Choose either User Configuration Administrative Templates or Computer Configuration Administrative Templates, right-click over either instance of Administrative Templates, and choose Add/Remove Templates to open the Add/Remove Templates dialog box.
When adding an Administrative Template, the interface suggests that you can choose to add it from either the Computer Configuration or the User Configuration node. In actuality, you can add the ADM template from either section, and the appropriate policy settings appear under whichever node the ADM template was designed for.
8.
Click the Add button to open up the file requester, and select to load the Word9.adm template from the \windows\inf folder. Click Close to close the Add/Remove Templates dialog box to return to the Group Policy Object Editor. To turn off the Check Grammar As You Type feature, drill down to User Configuration Administrative Templates Microsoft Word 2000 Tools Options Spelling & Grammar Check Grammar As You Type. Then, enable the setting, but do not select the check box. This forces the policy on the user, but clearing the check box forces it off. Ignore Words with Numbers.
9.
10. Repeat step 9 for Check Spelling As You Type, Ignore Words in Upper case, and
You can try this exercise with the other Office 2000supplied templates listed earlier. These will affect Excel, PowerPoint, Access, and the like. To test your new policy on the Human Resources Users OU, simply log on to any Windows 2000 or Windows XP machine loaded with Word 2000 as a user who would be affected by the new policy. For instance, log on to XPPRO1 as Frank Rizzo, our old HR pal from Chapter 1 (assuming you have Word 2000 loaded). Then in Word, choose Tools Options to open the Options dialog box, and make sure the settings reflect the policy settings you dictated. Now, in this example we just explored, we were using the raw ADM files. Again, you can (as youll discover a little later) take these ADM files and covert themlock, stock, and barrel, into ADMX files to be used in the central store. Also note that Office 2007 will have available downloadable ADMX filesno need to convert or do anything fancy. Just plop em in your Central Store and start using them. Well talk more about the Office 2007 ADMX files a little later. Check it out in the upcoming section Using ADMX Templates from Other Sources.
298
Chapter 5
Microsoft Software Update Services (SUS) and Windows Server Update Services (WSUS)
The job of Microsofts Software Update Services (SUS) and the newer Windows Server Update Services (WSUS) is to ensure that patches are deployed to your Windows 2000, Windows XP, and Windows 2003 client systems. After a server is set up to deploy the patches, the client system learns about the server by way of a custom ADM template. The template is built in to Windows 2003 and Windows 2000 + SP4 as Wuau.adm. However, the template is not built in to Windows 2000 + SP3. You can learn more about SUS, how to deploy it, and how to use the rather complex ADM templates from two articles I wrote for MCP Magazine, which you can find at http:// tinyurl.com/86sbj and http://tinyurl.com/5gfuk. These articles form a two-part series about installation and troubleshooting. The latters main focus is on understanding the ADM template. Lastly, Microsoft has an excellent guide to the policy settings with regard to WSUS available at http://tinyurl.com/8nalu.
ADM Templates You Shouldnt Use with Windows 2000, Windows XP, or 2003
Both the Office 2000 Resource Kit and Windows 2003 Server itself come with additional ADM templates that are not truly meant for the Group Policy Object Editor. Make a note of them so that you dont use them by mistake.
299
Description Data binding settings. Microsoft Chat settings. NetMeeting settings. Dial-up, language and temporary Internet files settings. Internet properties, including connections, toolbars, and toolbar settings. Equivalent to the Tools Internet Options command. Additional Internet properties: AutoComplete, display, and some advanced settings. Outlook Express Identity Manager settings. Use this to prevent users from changing or configuring identities. Active Desktop settings. Offline Pages settings.
Some of these templates can be loaded into Windows 2000, but you probably wouldnt want to do so; some settings included in these templates include actual policies (nontattooing), and some include only preferences (only tattoo). To review the difference between policies and preferences, see the opening section of this chapter. You can just use the included Internet Explorer template settings found in Windows 2000s inetres.adm, instead of loading these templates that include both policies and preferences.
Windows NT Templates
Additionally included with a Windows 2000 computer are even more ADM templates. These are not for use within the Windows 2000 Group Policy Object Editor either; rather, they are for use with the old-style NT Poledit.exe program. This feature set includes the following: Windows NT Template Common.adm Inetcorp.adm Inetset.adm Function
User interface options common to Windows NT 4 and Windows 9 x. For use with System Policy Object Editor (Poledit.exe).
Dial-up, language, and temporary Internet files settings. For use with System Policy Object Editor (Poledit.exe). Additional Internet properties: AutoComplete, display, and some advanced settings. For use with System Policy Object Editor (Poledit.exe). User interface options specific to Windows 95 and Windows 98. For use with System Policy Object Editor (Poledit.exe). User interface options specific to Windows NT 4. For use with System Policy Object Editor (Poledit.exe).
Windows.adm Winnt.adm
300
Chapter 5
These templates are really not 100 percent compatible with the Group Policy Administrative Template interface if imported directly. Some will indicate that they are unsupported, as shown here.
These are to be used with the old System Policy Object Editor (Poledit.exe). For instance, if you do end up loading, say, the Winnt.adm into the Windows 2003 Group Policy Object Editor, you are informed that it wont work, and the settings will not be displayed.
301
302
Chapter 5
ADMX Migrator
There are lots of places you can get pre-made ADM files. You might try leveraging some right nowsome are at GPanswers.com, others are found online from various other websites. Heres an example of a simple ADM file if you want to follow along. Just take this text, and copy it into Notepad and save it as Sounds.ADM.
CLASS USER CATEGORY Sounds POLICY Sound to hear when starting Windows XP KEYNAME Appevents\Schemes\Apps\.Default\SystemStart\.Current PART What sound do you want? EDITTEXT REQUIRED VALUENAME .default END PART END POLICY END CATEGORY
Then run the tool named faAdmxConv.exe against the ADM file you have. It can be as simple as just pointing to the file, but there are more switches if you have specific requirements. Once run, it will create an ADMX and ADML file for the ADM, which is then ready to be put in the central store (or, if youre not using the central store, then with individual Windows Vista management stations). You can see the program run and its output in Figure 5.15.
FIGURE 5.15 The faAdmxConv.exe tool will take your ADM and convert it into an ADMX and ADML file.
303
Then, if you want to leverage these in the central store, put the ADMX file in the \PolicyDefinitions directory within the SYSVOL and the ADML file in the language directory (en-US for English).
ADMX Editor
In the previous example, we leveraged an existing ADM file which modified Windows XPs startup sound. What if you wanted to create the ADMX file from scratch? Creating an ADMX template can sometimes be difficult. The hardest part can be figuring out which Registry setting you need to modify on the client system. You can use several tools to help you. One such tool is ProcessMonitor from Microsofts Sysinternals tools. You can find it at http://tinyurl.com/y45pu7. This tool can help point out whats changing on the client. Then, armed with that information, you can triumphantly create your own custom ADM or ADMX template and try it. Thats where the ADMX editor, also in the ADMX Migrator download comes in. Once you fire it up, youll be able to create a new ADMX file and add categories, like Misc XP Sounds as seen in Figure 5.16. Note that its not easy (at all) to realize you need to click to the right of Display Name to get that field to turn on. Once you do, you can enter in the name. Then, right-click over your new category and enter in your first policy setting. Here, were only entering one: Sound to hear when starting Windows XP. We then give it the Registry key (seen in the previous ADM listing) and the Registry value name (also seen in the previous ADM listing) and finally specify that its a User-side setting with the pull-down menu next to Class. You can see these all entered in Figure 5.17. Then, you can add different Elements, such as a Dropdown List, ComboBox, and more as seen in Figure 5.18. You can also enter in your own Explaintext and Supported On text.
FIGURE 5.16 Once you create a new ADMX file, you can create your first category, such as Misc XP Sounds.
304
Chapter 5
You can create your own policy settings within the categories you
When ready, you can right-click over the ADMX file (in my example the node labeled Control XP Sounds) and click Save As. This will create an ADMX and ADML file. Be sure to (again) move the ADMX into the central store and the ADML file into the language directory (en-US) for English.
Finding the Policy Settings You Need and Cracking the ADM/ADMX Files
305
I really wish there was some kind of preview mode to see if you got it right before you went through the motion of copying the ADMX and ADML files to their final location. Because theres potentially a lot of trial and error involved before you get it just right. When you do get it right, however, and fire up the GPO editor youll notice that the category is there (in my example its called Misc XP Sounds), but the settings within it are absent. Thats because the keys were dictating arent part of the proper Policies keys, and hence wont show by default. If you want to expose them, youll need to select View Filtering from the Group Policy Object Editor window, and in the Filtering dialog, uncheck Only show policy settings that can be fully managed. When you do this, youll see the setting show up, with a little down-arrow designating that its not a true Policy setting, as seen in Figure 5.14.
Finding the Policy Settings You Need and Cracking the ADM/ADMX Files
I get about ten e-mails a day which ask me, Hey Jeremy, how do you X with Group Policy? (where X is some policy or trick Ive never personally tried to do before). My standard answer is: I dont know because I simply dont have all 1800 Windows XP and certainly not all 2400 Windows Vista policy settings memorized. So, I immediately follow up my I dont know with But we can find out!
306
Chapter 5
FIGURE 5.19
Final Thoughts
307
Open the ADMX template to locate the policy and the corresponding
As you can see, the policy setting modifies Software\Microsoft\Windows\ CurrentVersion\Policies\Explorer. It adds a value of ForceClassicControlPanel and sets it to 1 to force the XP Control Panel to revert back to the older Windows 2000 style. You can plunk this into the Registry yourself and see this actually happen; you dont need to set a GPO to try it. After you verify the results, youre closer to knowing precisely whats going on.
Final Thoughts
Managing ADM and ADMX files can be a little tricky. The key message to take away is always use a Windows Vista management station to do your editing. If you bounce around using various operating system types, youll be back in SYSVOL bloat hell again. Its easy to use Microsoft and third-party, vendor-supplied ADM templates to control your applications or to make your own ADM modifications. But rememberonly applications coded to read Registry settings from the Policy keys will be true Policies. They will be applied and removed when different users log on or off. They will not tattoo. They will appear with a paper icon (in Windows Vista) or a blue dot (in pre-Windows Vista versions) in the Group Policy Object Editor. Most applications are not yet Policy keyaware, which means if you want to create your own modifications, youll likely need to make them preferences. Preferences do not modify the Policy keys. They tattoo the Registry. They will appear with a downarrow (in Windows Vista) or a red dot (in pre-Windows Vista versions) in the Group Policy Object Editor.
308
Chapter 5
If you want an application which can truly policy-enable your existing applications, check out PolicyPak.com.
Be wary of download ADM templates you find online. Theyll usually work as advertised, but the problem, again, is that theyre likely chock full of irritating tattooing preferences, not lovely nontattooing policies. One site thats full of such ADM templates is http://worldofasp .com/ts/download.cfm. Of course, I have some free ADM templates to download at www .GPanswers.com/faq. If you have an ADM file you want to use in the central store, youll have to convert it to ADMX first. Use the downloadable ADMX Migrator tool to perform that magic. Additionally, use the ADMX Editor (part of the ADMX Migrator download) to hand-create your own ADMX files if you like. If you're interested in hand-creating ADMX files, we will have tips and tricks and a forum on GPanswers.com. We will also maintain the previous editions ADM Template Syntax section if you need that as well. Lastly, check out Microsofts document to Step-by-Step Guide to Managing Group Policy ADMX Files at http://go.microsoft.com/fwlink/ ?LinkId=55414. And for the truly geeky, you can check out the ADMX schema, located at http://tinyurl.com/28k56v.
Group Policy: Management, Troubleshooting and Security is not available for sale as an eBook. Click the following link to purchase signed copies of this book: http://www.gpanswers.com/book. (Unsigned copies are available from Amazon.com.)
Practical Guidance with Detailed Coverage of Windows Vista, XP, and Server 2003
This revision of the popular Group Policy, Profiles, and IntelliMirror is fully updated for Windows Vista. Inside, youll learn how best to use Group Policy to take full advantage of Active Directory and create a managed desktop environment. Youll learn details about the GPMC, Group Policy troubleshooting techniques, and configuring Group Policy to create a resilient desktop environment. Inside, discover how to: Master all major Group Policy functions for all versions of Windows Troubleshoot Group Policy using tools, logs, Resource Kit utilities, registry hacks, and third-party tools Use Group Policy to secure your Windows Vista and Windows XP desktops Create and manage ADMX files and leverage the Group Policy Central Store Deploy Office 2007, Office 2003, and more using Group Policy Software Installation Utilize Windows Deployment Services to roll out new desktops Script complex Group Policy operations, including linking, backup, restore, permissions changes and migrating Set up roaming and managed desktops between XP and Vista machines Control hardware, restrict software, assign printers, and tweak Internet Explorer 7 Coverage Includes: ADMX files, the Central Store, Offline Files Updates , Windows Deployment Services, and More Master Advanced Features: Inheritance Blocking, Prioritization, Linking, Loopback Policy Processing, Security Policy Processing, Enforcing, and WMI Filters Go Beyond Group Policy: Deploy Shadow Copies and Utilize Windows Deployment Services for Complete Protection of Your Data and Systems
www.sybex.com