group policy

Deploy LGPO with MDT 2013


Local Group Policy (LGPO) 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 LGPO (Local Group Policy) settings on Windows 10 during workstation deployment via Microsoft Deployment Toolkit 2013 (MDT 2013).

Deploying LGPO 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).

lgpo extract

The archive contains two files:

  • lgpo.exe
  • lgpo.pdf

lgpo.exe

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

lgpo editor

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

lgpo export

Backup LGPO settings

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:

cd c:\lgpo

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

LGPO.exe /b c:\lgpo

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

lgpo.exe command prompt

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

lgpo backup

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

mdt gpo pack windows 10

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

gpo pack windows 10

Now 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).

apply gpo pack

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

copy gpo pack

Import Local GPO settings

The second task is to import Local GPO settings on Windows 10 PC using the utility LGPO.exe

  • Name: Apply GPO using Local GPO
  • Command Line: “%DEPLOYROOT%\Tools\%ARCHITECTURE%\LGPO.exe” /g %WinDir%\temp\

run gpo pack

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.

apply local gpo package mdt 2013

Now 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.

You may also like:

How to Allow Saved Credentials for RDP Connection When you are connecting to remote system using native Microsoft RDP client (mstsc.exe), you have the ability to save login credentials in order to not...
Configuring GPO Proxy Settings for Internet Explor... The article shows how to configure GPO proxy settings for Internet Explorer 11 browser using Active Directory Group Policies. In earlier versions of I...
Integrate WSUS Offline Updater with MDT 2013 to De... In this article we will show you how to install updates offline gained using WSUS Offline Updater, inside MDT 2013 task sequences to deploy fully patc...
Configure NTP Time Sync using Group Policy The Windows Time service (despite its apparent simplicity) is the basis for the normal functioning of Active Directory domain. In properly configured ...
How to Setup FTP Server in Windows 10 Nowadays the FTP technology is awesome and we decided to show how to setup and access an FTP server in Windows 10 in a simple way. How to create FTP ...
Comments
  1. Posted by Jesse Mitchell
    • Posted by TheITBros
  2. Posted by Justin Loebel
    • Posted by Justin Loebel
      • Posted by Justin Loebel
        • Posted by Justin Loebel
          • Posted by Øystein Kolbenstvedt
          • Posted by Justin Loebel
          • Posted by Øystein Kolbenstvedt
          • Posted by Justin Loebel
          • Posted by Øystein Kolbenstvedt

Add Your Comment