Group Policy Object Editor (GPedit)
On Microsoft Windows 2000/XP and later, we can edit Group Policy for the local computer using the Group Policy Object Editor tool, which is part of the system. This is a Snap-in to the Microsoft Management Console - MMC, which we can launch either by directly typing gpedit.msc or using mmc.exe (Microsoft Management Console), where we add the Group Policy Object Editor Snap-in. If we use mmc, we can choose whether to connect to the local computer, a different computer on the network, or a domain policy, i.e. a Group Policy Object (GPO).
A small tip for beginners. MMC is a very good tool, we can load all the important snap-ins for domain management (I have 17 of them), and save them. Then we open only one program (with domain admin rights) and have all the necessary tools accessible.

I came across a situation where I ran gpedit.msc locally and most of the options were missing under the Administrative Templates containers. The point is that this container is modular and we can add prepared templates (with the adm extension). Some open automatically, but can be deleted. So we just need to add them again, for example, adding System:
- right-click on Computer Configuration – Administrative Templates
- select Add/Remove Templates
- click on Add
- select the file
system.adm (C:\windows\inf)
Group Policy Management Console (GPMC)
Along with Windows Server 2003, MS released a new tool for managing Group Policy, called the Group Policy Management Console. On Server 2003, this tool is built into the system, but if we want to manage the domain from a Windows XP station (and it can be a Windows Server 2000 domain), we can download it from MS - Group Policy Management Console with SP1. We can launch it again by directly typing gpmc.msc or by adding the Group Policy Management Snap-in to mmc.

GPMC is used to manage domain GPOs. It contains a list of all group policy objects in the domain, the structure of organizational units (OUs) in the domain, where we can link and enable/disable individual GPOs, supports backup/restore and GPO import. It also includes the Group Policy Results tool, which offers a similar functionality to the gpresult.exe command. That is, it displays how policies were applied for a selected computer and user. And the Group Policy Modeling tool, which simulates policy application (with a variety of settings). GPMC only displays the values from the GPO that have been changed, so it's easy to find out what a given policy does. If we want to edit a GPO, GPEDIT will open, in which the given policy will open.
Group Policy Preferences (GPP)
With the advent of Windows Server 2008, Group Policy was further expanded with Group Policy Preferences. To be able to configure GPP, we need to have the Remote Server Administration Tools (RSAT) installed. It is included in Server 2008 and can be installed on Windows Vista SP1 x86 and x64. RSAT includes a modified version of the Group Policy Management Console along with the Group Policy Management Editor.
To be able to use GPP, we only need a Windows Server 2003 domain. We don't need any server with Windows Server 2008, but we need at least one Windows Vista station from which we will create the policies. By default, GPP will only apply to Server 2008, but for Windows XP SP2 x86 and x64, Windows Vista x86 and x64, and Windows Server 2003 SP1 x86 and x64 there is a Group Policy Preference Client Side Extensions (CSE). CSE can be installed manually or as an optional update from Windows Update kb943729.
If we open GPMC with RSAT and choose edit on a policy, the gpmedit will not open, but the new Group Policy Management Editor (can be run directly as gpme.msc). It has a new division under Computer and User Configuration into Policies and Preferences.
Group Policy Preferences are stored the same way as Policies (together as a GPO) in the SYSVOL folder on domain controllers. But the GPP configuration is stored in XML files, so the client must contain an XML parser.

GPP brings more than 20 new GP extensions. There is also a different way of application. Policies that we have set will be enforced on the station and cannot be changed (the option is grayed out). Whereas preferences can be edited and either re-applied after some time (group policy refresh interval, default 90 minutes) or we can choose the option that they only apply once (Apply once and do not reapply). There is also a feature called Item-level targeting. It allows us to very precisely determine which computers the given GPP should apply to. We can use a variety of conditions in the criteria, such as MAC address, LDAP query, WMI, free disk space, etc. If a policy was applied and the computer/user is no longer within the scope of that policy, all settings are removed. For GPP, the default behavior is that the values remain set (but we can change this by checking Remove this item when it is no longer applied).
Note: Policies are referred to as registry-based settings, their settings are made through the registry. Preferences, on the other hand, can configure more than just the registry.
Some of the possibilities offered by GPP are: mapping network drives, modifying local users and groups, copying files, creating shortcuts, working with the registry, setting environment variables, configuring VPN connections, setting folder properties, and more.
Additional note: In 2014, Microsoft found that storing passwords using Preferences is not secure, so they now block this option. This significantly limits the possibilities. Detailed description in MS14-025: Vulnerability in Group Policy Preferences could allow elevation of privilege: May 13, 2014.
Below I provide two examples of using GPP for operations that were previously performed in a more complicated way.
Mapping a Network Drive
I think it's a common operation in a corporate environment to map some common data storage as a network drive for all (or certain groups of) users. Until recently, this had to be done using a login script. Today we have GPP, which solves this more elegantly.
- launch Group Policy Management (Start > Administrative Tools)
- navigate to the container (OU) where we want to apply the settings
- right-click on it and choose Create a GPO in this domain, and Link it here ...
- enter a name and click OK, this will create a GPO
- right-click on it and choose Edit
- the GPO will open in the Group Policy Management Editor
- expand User Configuration > Preferences > Windows Settings > Drive Maps
- right-click and choose New > Mapped Drive

- choose the parameters for the mapped drive, in practice I found the Create action to work well (I tried Replace, which should first remove the mapped drive if it exists, but I couldn't get it to work properly)

- on the Common tab, check Run in logged-on user's security context (user policy option) so that the drive is mapped with the permissions of the currently logged-in user

- close the windows and we're done
Changing the Local Administrator Password
Note: This method can no longer be used, more info in the article Remote change of local user passwords in Windows.
The second interesting task that we can solve using GPP and previously was a problem, is changing the parameters of the local account (especially the password).
- launch Group Policy Management (Start > Administrative Tools)
- navigate to the container (OU) where we want to apply the settings
- right-click on it and choose Create a GPO in this domain, and Link it here ...
- enter a name and click OK, this will create a GPO
- right-click on it and choose Edit
- the GPO will open in the Group Policy Management Editor
- expand Computer Configuration > Preferences > Control Panel Settings > Local Users and Groups
- right-click and choose New >Local User

- fill in the details of the user to be modified, in our case we choose the Update action, because we want to modify an existing account (this is important because the original SID and thus the permissions are preserved)
- since we want to modify the local administrator account, we select it from the list (enter the others manually), we can rename it (which is a good security measure) and set other parameters

- close the windows and we're done
Of course, there is the question of the security of such a setting. The good news is that passwords in GPP are stored encrypted using 256-bit AES encryption. But they are stored in this way in an XML file that anyone can obtain.
Dd,
je potreba neco specialniho poustet na Windows 2003 pokud chci pouzivat RSAT pto upravu GPO v domene 2003? Nejak se mi nedari na server pripojit. Dekuji.
respond to [1]Safranek Jaroslav: Myslím, že dokud jsme měli doménu 2003, tak RSAT fungoval bez problémů.
podla mojich skusenosti funguje spolahlivo v 2003 aj 2008 verzii domeny
Zdravim,
ve vysledne sade zasad se mi projevi zmeny napriklad ze sablon pro spravu, ale z prevoleb (prave jako mapovani sitoveho disku) uz ne, stanice je XPP, server 2008 std. Nevite kde by mohla byt potiz?
respond to [4]Milan: Nevím, jestli dotazu rozumím správně. Ale jak jsem psal v článku, na Windows XP je potřeba nahrát patch, aby podporoval Group Policy Preferences.
Mám soubor *.reg na úpravu hodnoty v registru. Je nějaká možnost jak tento reg soubor spouštět přes Group Policy?
je to super článek děkuji, ale kdyby za anglickými názvy funkcí apd. byl v závorce český název, tak bych se vůbec nezlobil ;-), doba je již pokročilá a spousta adminů vč mě používá CZ lokalizovaný server, navíc mi dělá problém dešifrování zkratek viz "OU", jinak :-)
respond to [7]Milan S.: Já mám všechny servery v AJ, takže je těžké uhodnout, jaký český název MS zvolil :-). Na prvním místě, kde je zkratka OU použita, je i její význam "organizační jednotka", jinak se těmhle základním věcem věnuji v několika jiných článcích ;-).
respond to [8]Samuraj: ahoj, děkuji za bleskovou odpověď, nakonec se mi to podařilo najít a nastavit, ale nefunguje mi to (změna hesla local admina), na ikoně admina mi svítí žlutý trojúhelníček, je to OK nebo to značí nějaký problém/omezení? jinak jsem vytvořil GPO na OU "Domain Controllers" je to dobře? nebo jsem GPO měl vytvořit už na domain.local?
respond to [9]Milan S.: Žlutý trojúhelník by neměl být problém, informuje o jakou jde akci (update). Musíte to linkovat na kontejner, kde se nachází počítače, kde se má měnit heslo. To asi nebude Domain Controllers (tento postup je změna lokálních uživatelů ne doménových).
respond to [10]Samuraj: aha už to chápu ;-) no mé snažení je, jestli je to vůbec možné, se přihlásit s lokálním účtem admina na DC (doménový řadič) heslo lokálního admina jsem zapoměl a potřebuji v nouzáku něco odinstalovat, ale nemůžu se do něj přihlásit, páč to řve, že není doména spuštěna/k dispozici a lokál nejde, protože neznám heslo a už mě nenapadá co s tím :-(
respond to [11]Milan S.: Jakmile se server povýší na DC, tak nejsou k dispozici lokální účty. Dá se nastartovat pouze do Directory Services Restore Mode.
respond to [12]Samuraj: jj to jsem taky zjistil, ale ani tak se tam nedá přihlásit, píše to stejně jako při normálním běhu, že doména není k dispozici, nemůžu mít nastavené blbě DNS na DC? mám 127.0.0.1, nemá tam být IP DC? protože to už řeším nějakou dobu a zkouším už i nemožné :-O
respond to [13]Milan S.: Když se přihlašujete lokálně, tak to musíte definovat (že jde o přihlášení k PC a ne doméně). Třeba pomocí ".\administrator"
respond to [14]Samuraj: ano jen místo ".\administrator" dávám jméno serveru "server\administrator" a to mi pak hodí chybu, že je zadáno špatné heslo ať dám jaké chci, třeba i to admina v doméně
Zdravím, zrovna se zabývám GPP, na Win 7 mi všechno šlape v pohodě, ale mám problémy s Win XP. Vím, že je potřeba doinstalovat aktualizaci kb943729, tu jsem stahl z Microsoftu a nainstaloval, neprojevila se žádná změna, když jsem pak kouknul do instalovanejch aktualizací tuhle jsem tam nenašel, přitom při instalaci se nevyskytl problém...
Na některých forech jsem nasel, ze je treba nainstalovat jeste aktualizaci kb914783, ta mi ale píše, že se neshoduje jazyk OS s požadovaným..
Prosím poraďte, jak to rozchodit na XP, předem díky.
Ahoj, ja som nainštaloval W2012 server, vytvoril učty užívateľov, nastavil som práva na file server. Po nastavení mapovania diskov podľa vyššie uvedeného návodu, tretí mapovaný disk sa nenamapuje a dochádza po nejakom čase cca. 1hod. k strate prístupu.
Pri mapovaní nemá byť zapnutá voľba Aply once?
Ahoj, při pokusu nastavit lokálního administrátora přes GPO dle návodu mám "zašedlé" pole pro zadání a kontrolu hesla - nemohu heslo nastavit / změnit.
Neví někdo, kde se to dá povolit?
respond to [18]spojstroj: Popisuji to v novějším článku www.samuraj-cz.com/clanek/vzdalena-zmena-hesla-lokalnich-uzivatelu-windows/.