2016-10-18



Local Group Policy of computer is configured through gpedit.msc snap-in, which does not provide the possibility to export/import settings. That’s why when Windows is deploying in a non domain environment (you can’t use domain GPO), Administrator has to configure policies directly in the reference Windows image.

In this tutorial we will show you how to push out Local Group Policy settings on Windows 10 during workstation deployment via Microsoft Deployment Toolkit 2013 (MDT 2013).

Deploying Local GPO using MDT 2013

To import/export Local Group Policy settings (created using gpedit.msc) we will use a new command-line utility LGPO.exe, which replaces the no longer supported utility LocalGPO (part of the SCM Security Compliance Manager). LGPO.exe utility allows you to backup and restore the local GPO settings, import the individual components, including advanced auditing files, registry.pol and security templates. It also allows to turn on GP client-side extension (CSE) for the local processing.

Download LGPO.zip and extract the archive content to a separate folder on the Windows 10 client (C:\LGPO in this case).



The archive contains two files:

exe

pdf



Now we need to set up some local settings on the reference Windows 10 PC using Group Policy Editor (gpedit.msc).

As an example, we will enable some password policies (Computer Configuration -> Windows Settings -> Account Policies -> Password Policies):

Enforce password history: 10 password remember

Minimum password length: 6 characters

Password must meet complexity requirements: Enable

Also prohibit the use of Microsoft accounts (Computer Configuration -> Windows Settings -> Local Policies -> Security Options)

Block Microsoft accounts : Users can’t add or log on with Microsoft accounts

Now you should make a backup of the current local GPO settings using LGPO.exe utility. Run command prompt with the Administrative privileges and go to folder c:\LGPO:

To backup current Local GPO settings, run the following command:

Creating LGPO backup in “c:\lgpo\{7F823B9A-0D1C-4F88-BE2F-2FE033D8013E}”

Make sure that the folder DomainSysvol and 2 files (Backup.xml and Bkupinfo.xml) is located in this directory:

Now you need to rename backup folder {7F823B9A-0D1C-4F88-BE2F-2FE033D8013E} for example to W10RefLGPO and copy it to the deployment share on the MDT server.

\\srv-mdt1\deploymentshare$\GPOPacks

Also copy Local Group Policy Object utility (LGPO.exe) to the MDT server in the folders DeploymentShare\tools\x86 and x64.

Open the MDT Management Console (DeploymentWorkbench) and proceed to the Deployment Share -> MDT Deployment Share -> Task Sequence. Open the properties of Windows 10 deployment task sequence, and in this case it is Windows 10 x64 Pro Deploy (if this task has not yet been created, use the manual How to Create Windows 10 Deployment Task with MDT). Click on the Task Sequence tab and create two new tasks in the State Restore section (Add -> General -> Run command Line).

The first task: with the help of xcopy command-line tool copy the folder with the backup of the local policy from MDT server to a workstation into the folder %WinDir%\Temp

Name: Copy LGPO to Workstation

Command Line: xcopy “%DEPLOYROOT%\GPOPacks” %WinDir%\temp\W10RefLGPO /E /I

The second task imports the GPO settings on Windows 10 PC using the utility LGPO.exe

Name: Apply GPO using LGPO

Command Line: “%DEPLOYROOT%\Tools\%ARCHITECTURE%\LGPO.exe” /g %WinDir%\temp\

Save the changes in the Task Sequence by pressing OK, right click on the root of the DeploymentShare and select Update Deployment Share. Select Optimize the boot image updating process and click on Next.

It remains to deploy Windows 10 on a test workstation or a VM. Using the task sequence Windows 10 x64 Pro Deploy and after finishing Windows installation, verify that the system is applied all the previously configured local policies.

The post Deploy Local GPO with MDT 2013 appeared first on TheITBros.

Show more