%3CLINGO-SUB%20id%3D%22lingo-sub-255535%22%20slang%3D%22en-US%22%3ECentral%20Store%20and%20ADM%20Removal%20Q%26amp%3BA%20(with%20an%20updated%20script!)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-255535%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20TechNet%20on%20Mar%2014%2C%202012%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EWe%E2%80%99ve%20recently%20received%20some%20great%20feedback%20from%20several%20customers%20and%20other%20PFEs%20on%20the%20%3CA%3E%20ADM%20template%20post%20%3C%2FA%3E%20that%20Mark%20and%20I%20wrote%20a%20month%20or%20two%20back.%20I%20thought%20I%E2%80%99d%20take%20some%20time%20to%20respond%20to%20some%20of%20those%20questions%20and%20to%20post%20an%20updated%20version%20of%20the%20script.%20Going%20forward%2C%20we%20plan%20to%20spend%20some%20time%20responding%20to%20questions%2C%20either%20on%20previous%20posts%20or%20new%20topics%2C%20so%20keep%20them%20coming!%3C%2FP%3EQuestion%3A%3CP%3EThe%20dates%20in%20the%20script%20for%20the%20out-of-box%20ADM%20templates%20are%20different%20than%20what%20I%20have%20on%20SYSVOL.%20Why%20is%20that%3F%3C%2FP%3EAnswer%3A%3CP%3EWe%20tried%20to%20track%20down%20all%20of%20the%20possible%20dates%20for%20out-of-box%20ADM%20templates%20and%20missed%20a%20few.%20I%E2%80%99ve%20added%20those%20to%20the%20list%2C%20as%20well%20as%20added%20a%20new%20switch%20to%20the%20script%20%3CEM%3E%20%E2%80%93NoDateCheck%20%3C%2FEM%3E%20.%20Using%20this%20switch%20will%20cause%20the%20script%20to%20remove%20all%20ADMs%20where%20a%20matching%20ADMX%20template%20is%20found%2C%20regardless%20of%20time%20stamp.%3C%2FP%3EQuestion%3A%3CP%3EWhat%E2%80%99s%20with%20all%20of%20the%20dates%20for%20the%20ADMs%20in%20the%20script%2C%20anyway%3F%3C%2FP%3EAnswer%3A%3CP%3EWhen%20Mark%20and%20I%20were%20originally%20discussing%20this%20post%20and%20the%20script%2C%20we%20decided%20to%20err%20on%20the%20side%20of%20caution.%20We%20wanted%20to%20be%20100%25%20certain%20that%20nobody%20had%20modified%20the%20original%20ADMs%20and%20that%20there%20wouldn%E2%80%99t%20be%20unexpected%20behavior%2C%20or%20anything%20missing%2C%20when%20the%20migration%20to%20ADMX%20was%20complete.%20Checking%20for%20the%20time%20stamps%20ensured%20that%20things%20were%20good.%20The%20original%20plan%20was%20to%20have%20script%20users%20add%20their%20own%20%E2%80%9Cknown%20good%E2%80%9D%20ADM%20dates%20to%20the%20script%2C%20then%20run%20it%20to%20verify%20ADM%20consistency.%20For%20example%2C%20if%20I%20created%20a%20custom%20ADM%20and%20added%20it%20to%20GPO%20A%2C%20then%20modified%20that%20custom%20ADM%20again%20and%20deployed%20with%20GPO%20B%2C%20I%E2%80%99d%20have%20two%20different%20versions%20of%20the%20ADM%20template.%20After%2C%20I%20convert%20the%20ADM%20from%20GPO%20A%20to%20ADMX%20and%20place%20it%20in%20the%20store.%20I%20delete%20all%20of%20my%20ADMs%20then%20I%20attempt%20to%20edit%20GPO%20B.%20Since%20it%E2%80%99s%20using%20an%20ADMX%20template%20that%20differs%20from%20the%20ADM%20it%20was%20using%20originally%2C%20you%20may%20be%20missing%20settings%20or%20options.%20We%20wanted%20to%20prevent%20that.%3C%2FP%3E%0A%20%20%3CP%3EIf%20you%E2%80%99re%20100%25%20certain%20you%20won%E2%80%99t%20see%20this%20issue%2C%20feel%20free%20to%20use%20the%20%E2%80%93%20%3CEM%3E%20NoDateCheck%20%3C%2FEM%3E%20switch%20I%20mentioned%20above%20to%20remove%20all%20ADMs%20where%20a%20matching%20ADMX%20name%20is%20found.%3C%2FP%3E%3CSPAN%20style%3D%22%22%3E%20Question%3A%20%3C%2FSPAN%3E%3CP%3ECan%20I%20use%20the%20script%20if%20my%20organization%20hasn%E2%80%99t%20implemented%20the%20GP%20central%20store%3F%20(See%3A%20%3CEM%3E%20An%20Alternative%20to%20the%20Central%20Store%20%3C%2FEM%3E%20in%20%3CA%3E%20this%20%3C%2FA%3E%20AskDS%20post).%3C%2FP%3EAnswer%3A%3CP%3EWith%20the%20old%20script%2C%20no.%20With%20the%20new%20one%2C%20it%E2%80%99ll%20check%20for%20the%20central%20store%2C%20first.%20If%20it%20doesn%E2%80%99t%20exist%2C%20it%20will%20check%20the%20default%20policy%20definitions%20folder%20(C%3A%5Cwindows%5Cpolicydefinitions)%20and%20use%20that%20as%20the%20ADMX%20source.%20If%20you%E2%80%99ve%20got%20any%20non-standard%20ADMX%20templates%2C%20and%20you%20aren%E2%80%99t%20using%20the%20central%20store%2C%20you%E2%80%99ll%20need%20to%20ensure%20those%20ADMX%2FADML%20files%20are%20in%20c%3A%5Cwindows%5Cpolicydefinitions.%3C%2FP%3EQuestion%3A%3CP%3EThere%E2%80%99s%20a%20switch%20in%20the%20script%2C%20-%20%3CEM%3E%20ADMCSVPath%2C%20%3C%2FEM%3E%20and%20I%E2%80%99m%20not%20sure%20why%20it%E2%80%99s%20there.%20So%20why%20is%20it%20there%3F%3C%2FP%3EAnswer%3A%3CP%3EGood%20question.%20I%20forgot%20to%20remove%20it.%20Thanks%20for%20reminding%20me.%3C%2FP%3EQuestion%3A%3CP%3EIs%20it%20possible%20to%20add%20my%20own%20ADMs%20to%20the%20script%20so%20that%20I%20can%20check%20for%20and%20remove%20Office%20ADMs%2C%20custom%20ADMs%2C%20and%20more%3F%3C%2FP%3EAnswer%3A%3CP%3EYou%20sure%20can.%20If%20you%20go%20to%20line%20130%20in%20the%20script%20where%20all%20of%20the%20out-of-box%20ADMs%20are%20listed%20you%20can%20add%20each%20of%20your%20own%20ADMs%2C%20as%20well%20as%20the%20date%20stamp%20you%E2%80%99re%20expecting%20to%20find%20on%20that%20ADM.%20This%20is%20only%20necessary%20if%20you%20want%20to%20check%20specific%20dates%20on%20the%20ADMs.%20If%20you%E2%80%99re%20comfortable%20running%20the%20script%20with%20%3CEM%3E%20%E2%80%93NoDateCheck%2C%20%3C%2FEM%3E%20it%E2%80%99ll%20remove%20any%20ADMs%20it%20finds%20with%20a%20matching%20ADMX%20regardless%20of%20the%20date%20stamp.%3C%2FP%3EQuestion%3A%3CP%3EI%E2%80%99ve%20run%20the%20script%20and%20cleaned%20up%20all%20of%20the%20ADMs%20on%20sysvol.%20How%20can%20I%20keep%20ADMs%20from%20re-appearing%3F%3C%2FP%3EAnswer%3A%3CP%3EFirst%2C%20make%20sure%20that%20all%20GPO%20admins%20are%20on%20Vista%20SP1%2FServer%202008%2C%20or%20later%20(read%20%3CA%3E%20this%20%3C%2FA%3E%20if%20you%20have%20Vista%2F7%20mixed).%20If%20you%E2%80%99re%20worried%20about%20a%20rogue%20GPO%20admin%20showing%20up%20and%20using%20an%20older%20OS%2C%20enable%20the%20group%20policy%20setting%2C%20%3CSTRONG%3E%20Always%20use%20local%20ADM%20files%20for%20Group%20Policy%20Editor.%20%3C%2FSTRONG%3E%20This%20setting%2C%20outlined%20%3CA%3E%20here%20%3C%2FA%3E%20%2C%20will%20force%20GPMC%20to%20use%20ADMs%20from%20%25systemroot%25%5Cinf%20instead%20of%20storing%20and%20reading%20the%20ADMs%20from%20sysvol.%3C%2FP%3EQuestion%3A%3CP%3EWhat%20happens%20if%20I%20don%E2%80%99t%20have%20ADMX%20templates%20in%20my%20central%20store%20or%20local%20policy%20definitions%20and%20I%20remove%20the%20ADMs%3F%20Is%20that%20a%20resume%20generating%20event%3F%3C%2FP%3EAnswer%3A%3CP%3EIn%20short%2C%20you%E2%80%99ll%20probably%20irritate%20your%20Group%20Policy%20administrators.%20Removing%20the%20ADM%20template%2C%20and%20not%20having%20the%20ADMX%20present%2C%20means%20that%20when%20attempting%20to%20manage%20a%20GPO%20the%20administrator%20will%20not%20be%20able%20to%20modify%2C%20or%20view%2C%20any%20of%20the%20GPO%20settings%20specific%20to%20that%20ADM.%3C%2FP%3E%0A%20%20%3CP%3EHere%E2%80%99s%20a%20quick%20illustration.%20Assume%20that%20you%E2%80%99ve%20created%20a%20GPO%20which%20uses%20an%20Office12%20ADM%20template%20(office12.adm).%20If%20you%20view%20the%20details%20on%20that%20GPO%20in%20GPMC%2C%20you%E2%80%99ll%20see%20a%20%E2%80%9CUnique%20ID%E2%80%9D%20or%20GUID.%20When%20you%20navigate%20out%20to%20SYSVOL%20on%20one%20of%20your%20DCs%2C%20and%20go%20to%20the%20Policies%20folder%2C%20you%20should%20see%20a%20whole%20bunch%20of%20GUIDs.%20Find%20the%20one%20that%20matches%20your%20GPO%20GUID%20and%20navigate%20to%20it.%20Then%20open%20the%20ADM%20folder.%20In%20the%20case%20of%20my%20GPO%2C%20I%20see%20this%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CA%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F50299iDAB6DCE0D03B6669%22%20style%3D%22%22%20%2F%3E%20%3C%2FA%3E%3C%2FP%3E%0A%20%20%3CP%3EI%20delete%20it%20and%20let%20the%20change%20replicate%20around%2C%20then%20edit%20the%20policy%20in%20GPMC.%3C%2FP%3E%0A%20%20%3CP%3EWhen%20I%20open%20the%20GPO%20to%20view%20the%20Office%202007%20settings%2C%20I%20can%E2%80%99t%20find%20them.%3C%2FP%3E%0A%20%20%3CP%3E%3CA%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F50300i27F318291B7C359E%22%20style%3D%22%22%20%2F%3E%20%3C%2FA%3E%3C%2FP%3E%0A%20%20%3CP%3EWhat%20I%20would%20have%20seen%20before%20I%20deleted%20the%20template%20is%20this%3A%3C%2FP%3E%0A%20%20%3CP%3E%3CA%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F50301iF7E144C792F92563%22%20style%3D%22%22%20%2F%3E%20%3C%2FA%3E%3C%2FP%3E%0A%20%20%3CP%3EFixing%20it%20is%20easy.%20Find%20the%20missing%20template%20(because%20%3CSTRONG%3E%20of%20course%20%3C%2FSTRONG%3E%20you%20made%20a%20backup)%2C%20right%20click%20on%20%3CSTRONG%3E%20Administrative%20Templates%20%3C%2FSTRONG%3E%20in%20the%20GPO%20and%20click%20%3CSTRONG%3E%20Add%2FRemove%20Templates%20%3C%2FSTRONG%3E%20.%20In%20the%20%3CEM%3E%20Add%2FRemove%20Templates%20%3C%2FEM%3E%20dialog%2C%20click%20%3CSTRONG%3E%20Add%E2%80%A6%20%3C%2FSTRONG%3E%20and%20navigate%20to%20the%20missing%20ADM.%20Click%20Close%20.%20If%20you%20go%20back%20out%20to%20SYSVOL%20and%20take%20a%20look%20at%20that%20Adm%20folder%20on%20the%20PDCe%2C%20you%E2%80%99ll%20see%20the%20template%20is%20there%20and%20all%20of%20the%20group%20policy%20admins%20have%20stopped%20yelling%20at%20you.%3C%2FP%3E%0A%20%20%3CP%3ESo%20don%E2%80%99t%20worry%20about%20that%20resume%2C%20%3CA%3E%20unless%20you%E2%80%99re%20looking%20for%20a%20job.%20%3C%2FA%3E%3C%2FP%3EConclusion%3A%3CP%3ENow%20you%20can%20get%20out%20there%2C%20convert%20your%20ADMs%20to%20ADMX%2C%20clean%20up%20sysvol%2C%20and%20save%20yourself%20a%20ton%20of%20disk%20space.%3C%2FP%3E%0A%20%20%3CP%3EAlso%2C%20here%E2%80%99s%20a%20link%20list%20to%20the%20Office%20ADMX%20templates%20because%20Mark%20insisted%20I%20include%20it.%3C%2FP%3E%0A%20%20%3CUL%3E%0A%20%20%20%3CLI%3EOffice%202010%20-%20%3CA%3E%20http%3A%2F%2Fwww.microsoft.com%2Fdownload%2Fen%2Fdetails.aspx%3Fdisplaylang%3Den%26amp%3Bid%3D18968%3C%2FA%3E%3C%2FLI%3E%0A%20%20%20%3CLI%3EOffice%202007%20-%20%3CA%3E%20http%3A%2F%2Fwww.microsoft.com%2Fdownload%2Fen%2Fdetails.aspx%3Fdisplaylang%3Den%26amp%3Bid%3D22666%3C%2FA%3E%3C%2FLI%3E%0A%20%20%20%3CLI%3EOffice%202003%20-%20Just%20kidding.%20You%E2%80%99ll%20need%20to%20get%20the%20ADMs%20and%20convert%20to%20ADMX.%20Or%20consider%20an%20upgrade.%3C%2FLI%3E%0A%20%20%3C%2FUL%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3EUpdate%201%2F24%2F2013%3A%20We've%20removed%20the%20script%20from%20the%20blog%20and%20uploaded%20it%20at%20the%20script%20center.%20It%20can%20be%20found%20%3CA%3E%20here%3C%2FA%3E%3C%2FP%3E%0A%20%20%3CP%3E-%20Tom%20Moser%3C%2FP%3E%0A%20%20%3CDIV%20style%3D%22%22%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3C%2FDIV%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-255535%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TechNet%20on%20Mar%2014%2C%202012%20We%E2%80%99ve%20recently%20received%20some%20great%20feedback%20from%20several%20customers%20and%20other%20PFEs%20on%20the%20ADM%20template%20post%20that%20Mark%20and%20I%20wrote%20a%20month%20or%20two%20back.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-255535%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ecentral%20store%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGroup%20Policy%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Emark%20morowczynski%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Etom%20moser%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

First published on TechNet on Mar 14, 2012

 

We’ve recently received some great feedback from several customers and other PFEs on the ADM template post that Mark and I wrote a month or two back. I thought I’d take some time to respond to some of those questions and to post an updated version of the script. Going forward, we plan to spend some time responding to questions, either on previous posts or new topics.

 

Question:

The dates in the script for the out-of-box ADM templates are different than what I have on SYSVOL. Why is that?

 

Answer:

We tried to track down all of the possible dates for out-of-box ADM templates and missed a few. I’ve added those to the list, as well as added a new switch to the script –NoDateCheck. Using this switch will cause the script to remove all ADMs where a matching ADMX template is found, regardless of time stamp.

 

Question:

Can I use the script if my organization hasn’t implemented the GP central store? (See: An Alternative to the Central Store in this AskDS post).

 

Answer:

With the old script, no. With the new one, it’ll check for the central store, first. If it doesn’t exist, it will check the default policy definitions folder (C:\windows\policydefinitions) and use that as the ADMX source. If you’ve got any non-standard ADMX templates, and you aren’t using the central store, you’ll need to ensure those ADMX/ADML files are in c:\windows\policydefinitions.

 

Question:

There’s a switch in the script, -ADMCSVPath, and I’m not sure why it’s there. So why is it there?

 

Answer:

Good question. I forgot to remove it. Thanks for reminding me.

 

Question:

Is it possible to add my own ADMs to the script so that I can check for and remove Office ADMs, custom ADMs, and more?

 

Answer:

You sure can. If you go to line 130 in the script where all of the out-of-box ADMs are listed you can add each of your own ADMs, as well as the date stamp you’re expecting to find on that ADM. This is only necessary if you want to check specific dates on the ADMs. If you’re comfortable running the script with –NoDateCheck, it’ll remove any ADMs it finds with a matching ADMX regardless of the date stamp.

 

Question:

I’ve run the script and cleaned up all of the ADMs on sysvol. How can I keep ADMs from re-appearing?

 

Answer:

First, make sure that all GPO admins are on Vista SP1/Server 2008, or later (read this if you have Vista/7 mixed).  If you’re worried about a rogue GPO admin showing up and using an older OS, enable the group policy setting, Always use local ADM files for Group Policy Editor. This setting, outlined here, will force GPMC to use ADMs from %systemroot%\inf instead of storing and reading the ADMs from sysvol.

 

Question:

What happens if I don’t have ADMX templates in my central store or local policy definitions and I remove the ADMs? Is that a resume generating event?

 

Answer:

In short, you’ll probably irritate your Group Policy administrators. Removing the ADM template, and not having the ADMX present, means that when attempting to manage a GPO the administrator will not be able to modify, or view, any of the GPO settings specific to that ADM.

Here’s a quick illustration. Assume that you’ve created a GPO which uses an Office12 ADM template (office12.adm). If you view the details on that GPO in GPMC, you’ll see a “Unique ID” or GUID. When you navigate out to SYSVOL on one of your DCs, and go to the Policies folder, you should see a whole bunch of GUIDs. Find the one that matches your GPO GUID and navigate to it. Then open the ADM folder. In the case of my GPO, I see this:

 

BrandonWilson_0-1581088693081.png

 

I delete it and let the change replicate around, then edit the policy in GPMC.

When I open the GPO to view the Office 2007 settings, I can’t find them.

 

BrandonWilson_1-1581088693085.png

 

What I would have seen before I deleted the template is this:

 

BrandonWilson_2-1581088693088.png

 

Fixing it is easy. Find the missing template (because of course you made a backup), right click on Administrative Templates in the GPO and click Add/Remove Templates. In the Add/Remove Templates dialog, click Add… and navigate to the missing ADM. Click Close. If you go back out to SYSVOL and take a look at that Adm folder on the PDCe, you’ll see the template is there and all of the group policy admins have stopped yelling at you.

 

So don’t worry about that resume, unless you’re looking for a job.

 

Conclusion:

 

Now you can get out there, convert your ADMs to ADMX, clean up sysvol, and save yourself a ton of disk space.

 

Also, here’s a link list to the Office ADMX templates because Mark insisted I include it.

 

Update 1/24/2013: We've removed the script from the blog and uploaded it at the script center.

 

- Tom Moser