Deploying Windows 8 and Customizing the Lock Screen with ConfigMgr 2012

This week my post will be about the deployment of Windows 8 and then with a customized lock screen. One of the main complaints about a customized deployment of Windows 8 was that it wasn’t possible to set a customized lock screen without using unsupported methods of “hacking” file permissions and replacing the pictures. This has changed since the cumulative update of November for Windows 8 (see also here).

One of the nice adjustments with this cumulative update is that it enables enterprise customers to customize the default lock screen. This setting is introduced as a Group Policy –setting, named Force a specific default lock screen image. In this post I’m not going to use the Group Policy –setting, but only the corresponding registry value LockScreenImage under HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization. The reason for that is simple, I like setting a customized lock screen via my task sequence, because it gives a clear view when the task sequence is successfully ended.

Prerequisites

Like last week, before we can start to deploy Windows 8 we need ConfigMgr 2012 SP1. The biggest difference is that Microsoft released updated binaries, this week (see here), for ConfigMgr 2012 SP1. These binaries prevent the problems with deploying Windows 8 and installing the client. Besides that, the following two bullets are a prerequisite for this post:

  • An activated version of Windows 8 Enterprise. Without activation it’s not possible to personalize the default lock screen.
  • The cumulative update of November 2012 (KB2770917). Without this update, Windows 8 does not support customizing the default lock screen.

Configuration

TSEdiSetLocScrNow, after the prerequisites are met, let’s start with configuring the task sequence. There are only a few steps that need to be configured and they are all basic actions. So I won’t go into a lot of details, besides the batch file with the real actions. These are the global steps:

  • Add a Configuration Manager Client Package (default)
  • Add a x86/ x64 Boot Image (default)
  • Add a Operating System Image of Windows 8 (default install.wim)
  • Create an Package, with as content the new lock screen image and a batch file. The content of the batch file should look like this:

    REM ============================================================================== REM Make OEM Background directory REM ============================================================================== MD "C:\<NewLockScreenFolder>" REM ============================================================================== REM Copy OEM Background image REM ============================================================================== XCOPY "%~dp0<NewLockScreenImage>.jpg" "C:\<NewLockScreenFolder>" /HERCIY REM ============================================================================== REM Make Windows use OEM Background image REM ============================================================================== REG ADD HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization /V LockScreenImage /T REG_SZ /D C:\<NewLockScreenFolder>\<NewLockScreenImage>.jpg /F

  • Create a Install an existing image package –Task Sequence, with the mentioned packages of the previous steps (no need for the steps State Migration, Include Updates and Install Updates).
    • Note: In case KB2770917 is not part of the Windows 8 image, then it is necessary to deploy it during the task sequence via an Install Updates –step.
  • Edit the new Task Sequence and add a Run Command Line –step (see picture). Now add as Command line <NameOfBatchFile>.cmd, select Package and Browse to the created Package.

Result

After all the configuring is done, it’s time to take a look at the results. In this case, I think, it’s not interesting to look at the log files, but just at the end result. So under here, on the left side is the result of a normal deployment and on the right side is the result of my custom deployment.

Default Custom
OldLockScreen NewLockScreen

Deploying Windows 8 including Optional Windows Features with ConfigMgr 2012

This week my post will be about the deployment about the deployment of Windows 8 and then including optional Windows features. I already did a post like this about Windows Server 2012, and the methods are similar, but I’m still getting, and seeing, lots of questions about how it works for Windows 8.

So what I really want to show in this post are the different options for deploying Windows 8 including some random Optional Windows Feature(s). The three most used options for this are DISM, Powershell and MDT. Well, actually, to be really correct, there is only one option to install Features in Windows 8 and that’s DISM. Both, Powershell and MDT are just different methods for calling DISM actions. In the rest of this post I will show these three methods and in all three examples I will install the same the same feature, TelnetClient. Why this feature? Well, actually just because it installs quick.

Prerequisites

Before we can start, to deploy Windows 8 we need ConfigMgr 2012 SP1, but the introduction of the RTM version of that caused serious problems with the deployment of the client on Windows 8 (also during a task sequence). Microsoft provided two solutions for this and everyone can pick the one they like the most. The most important part is that picking one of the following solutions is a prerequisite for the rest of this post:

  • Install KB2801987 on all site servers.
  • Offline service KB2756872 into the Windows 8 image.

Method 1: Dism

TSEditInstFeatDISMThe first method that I want to show, which is also the basis for the following methods, is deploying Windows 8 and optional Windows features via Dism. This can be done quickly, by performing the following global steps:

  • Add a Configuration Manager Client Package (default)
  • Add a x86/ x64 Boot Image (default)
  • Add a Operating System Image of Windows 8 (default install.wim)
  • Create a Install an existing image package –Task Sequence, with the mentioned packages of the previous steps (no need for the steps State Migration, Include Updates and Install Updates).
  • Edit the new Task Sequence and add a Run Command Line –step (see picture). Now add the command line Dism.exe /Online /Enable-Feature /FeatureName:TelnetClient.

Note: To find the name of the features that we want to install, use: Dism.exe /Online /Get-Features. Also good to know, in Dism it is necessary to specify the top-level feature before we can install a sub-level feature.

Method 2: Powershell

TSEditInstFeatPHSThe second method that I want to show is deploying Windows 8 and optional Windows features via Powershell. This can be done quickly, by performing the following global steps:

  • Add a Configuration Manager Client Package (default)
  • Add a x86/ x64 Boot Image (default)
  • Add a Operating System Image of Windows 8 (default install.wim)
  • Create a Install an existing image package –Task Sequence, with the mentioned packages of the previous steps (no need for the steps State Migration, Include Updates and Install Updates).
  • Edit the new Task Sequence and add a Run Command Line –step (see picture). Now add the command line Powershell.exe Install-WindowsOptionalFeature –Name TelnetClient –Online.

Note: To find the name of the features that we want to install, use: Powershell.exe Get-WindowsOptionalFeature –Online. Also good to know, in Powershell it is not necessary to specify the top-level feature before we can install a sub-level feature.

Method 3: MDT 2012 Update 1

TSEditInstFeatMDTThe third, and last, method that I want to show is deploying Windows 8 and optional Windows features via MDT 2012 Update 1. This can be done quickly, by performing the following global steps:

  • Install MDT 2012 Update 1
  • Run Configure ConfigMgr Integration
  • Add a Configuration Manager Client Package (default)
  • Add a x86/ x64 Boot Image (default)
  • Add a Operating System Image of Windows 8 (default install.wim)
  • Create a Microsoft Deployment Toolkit Package
  • Create a Install an existing image package –Task Sequence, with the mentioned packages of the previous steps (no need for the steps State Migration, Include Updates and Install Updates).
  • Edit the new Task Sequence, add a Use Toolkit Package –step, add a Gather –step and add a Install Roles and Features –step. Here we can select the Operating System and the Features (see picture).

Note: To deploy .NET Framework 3.5 there are extra sources needed. Create a network share with the contents of the sources\sxs –folder from the Windows 8 –media and add a Set Task Sequence Variable –step. Set as Task Sequence Variable WindowsSource and as Value <NetworkShareWithSXSFolder>.

An overview of my posts about ConfigMgr 2012 SP1

Let’s start my first post, of this new year, with an overview of my latest post about ConfigMgr 2012 Service Pack (SP) 1. Normally I’m not really the kind of person that looks back, but in this case it’s with a reason, as most of my posts where with pre-release versions of SP1. I also tried to sort all my posts per subject, even though sometimes there is some overlap. The following posts are all tested, this week, with the RTM version of SP1 and I can confirm that they are still working:

System Center Orchestrator

Windows Azure

Windows Intune

OS Deployment

Application Deployment

Client Settings

Deploying Windows 8 with the UE-V 1.0 Agent via ConfigMgr 2012

UE-VOfflFileServThis week I will do a post about deploying the recent released UE-V 1.0 Agent. Even though there is a great guide, named UE-V Deployment Guide, included with the installation files, I noticed that there is a small piece “missing” for a deployment, with Windows 8, via a task sequence. When I just added the agent to my task sequence, to deploy Windows 8, I noticed that the agent wasn’t installing during the deployment.

After looking at the Installation log file and after running the installer on a clean system, I saw that the Offline Files Service (CscService) needs to be running before the installation will run (see screenshot). It seems that the Offline Files Service on Windows 8, by default, is set to Automatic (Trigger Start), which means that it’s not running during the deployment. Of course there are multiple methods to work with this. In this post I will show one method and to be complete I will show the creation of the application and the “new” configuration of the task sequence.

Create Application

  • In the Configuration Manager Console, navigate to Software Library > Overview > Application Management > Applications.
  • In the Home tab click Create > Create Application and the Create Application Wizard will show.
  • On the General page, select Manually specify the application information and click Next.
  • On the General Information page, fill in the information about the application, select Allow this application to be installed from the Install Application task sequence action instead of deploying it manually and click Next.
  • On the Application Catalog page, click Next.
  • CAWUE-VOn the Deployment Type page, click Add and the Create Deployment Type Wizard will show.
    1. On the General page, Browse to AgentSetupx64.msi and click Next.
    2. On the Import Information page, click Next.
    3. On the General Information page, add /norestart to the Installation program and click Next.
    4. On the Requirements page, click Add and the Create Requirement will show.
      1. Select as Category Device.
      2. Select as Condition Operating System.
      3. Select as Rule Type Value.
      4. Select as Operator One of.
      5. Select the used 64-bit Operating Systems.
    5. Back on the Requirements page, click Next.
    6. On the Dependencies page, click Next.
    7. On the Summary page, click Next.
    8. On the Completion page, click Close.
  • Back on the Deployment Type page, click Add, the Create Deployment Type Wizard will show again and walk through step 1-8 again for AgentSetupx86.msi and click Next.
  • On the Summary page, click Next.
  • On the Completion page, click Close.

Distribute Content

  • In the Configuration Manager Console, navigate to Software Library > Overview > Application Management > Applications and select the new application.
  • In the Home tab click Deployment > Distribute Content and the Distribute Content Wizard will show.
  • On the General page, click Next.
  • On the Content page, click Next.
  • On the Content Destination page, Add the Distribution Point(s) and click Next.
  • On the Summary page, click Next.
  • On the Completion page, click Complete.

Edit Task Sequence

  • TSEditOfflFileIn the Configuration Manager Console, navigate to Software Library > Overview > Operating Systems > Task Sequences and select the task sequence.
  • In the Home tab, in the Task Sequence group, click Edit and the Task Sequence Editor will show.
  • Select Add > General > Run Command Line and fill in as Command line Powershell.exe Start-Service CscService.
  • Select Add > General > Install Application, or use an existing Install Application –step, click New, select the new application and click Ok.

Result

As always, now it’s time to look at the results! There are lot’s of places to look, like the Programs and Features, the SMSTS.log and the installation log of the UE-V 1.0 Agent. In this case I like to show the Offline Files Service –check in the installation log of the UE-V 1.0 Agent.InstUEV

Migrating to Windows 8 by using hard-links with ConfigMgr 2012

After the release of Windows 8 last week we can already start thinking about migrating. When I’m thinking about migrations I always like the computer-refresh scenario’s where we can use hard-links. In this post I will show a basic task sequence to capture user files and settings, either offline or online, with help of hard-links. I already showed the basics of that in an earlier post last year when ConfigMgr 2012 was still in Beta. Since then the Wizard screens have not changed so I will not show that again, but  I will show some more information about what happens.

Prerequisites

To support migrating to Windows 8 we need ConfigMgr 2012 SP1 (which is currently still CTP) in place with at least the following packages:

  • Boot Image package, of at least version 6.2.xxxx
  • ConfigMgr client package
  • USMT 5.0 package, of at least version 6.2.xxxx
  • Image package, which can be the default install.wim of Windows 8

Basic steps

To create a task sequence that can migrate to Windows 8 we can use the following steps (for screenshot see my earlier post of last year):

  • Right-click the Task Sequence node and select Create Task Sequence.
  • On the Create a New Task Sequence page, select Install an existing image package and click Next.
  • On the Task Sequence Information page, fill in a Task sequence name, Browse for the Boot image and click Next.
  • On the Install Windows page, browse for the Image package, uncheck Partition and format the target computer before installing the operating system, (optional) uncheck Configure task sequence for use with Bitlocker, (optional) fill in a Product key, (optional) select Always use the same administrator password and click Next.
  • On the Configure Network page, (optional) select Join a domain, Browse for the Domain and Domain OU, Set an Account and click Next.
  • On the Install ConfigMgr page, Browse for the ConfigMgr client Package, (optional) fill in the Installation Properties and click Next.
  • On the State Migration page, select Capture user settings, Browse for the USMT Package, select Save user settings locally, (optional) uncheck Capture network settings, (optional) uncheck Capture Microsoft Windows settings and click Next.
  • On the Install Updates page, click Next.
  • On the Install Applications page, click Next.
  • On the Summary page, click Next.
  • On the Progress page, just wait…
  • On the Confirmation page, click Close.

Advanced steps

The basic steps will create a task sequence that will only perform it’s capture while the task sequence is running online (Full OS). Also notice that the task sequence already sets the ‘extra’ task sequence variable OSDStateStorePath to the value %_SMSTSUserStatePath%. But when we also want to be able to perform an capture while the task sequence is running offline (WinPE), we need to make the following small adjustments.

  • TSEd_RemConSelect the Capture Files and Settings Group, go to the Options tab and Remove the Conditions (or remove the whole top Group).

    Explanation: This is necessary to make it possible to also capture user files and settings in WinPE.

  • Select the Capture User Files and Settings Step (optional: change the name), go to the Options tab and add the condition of _SMSTSInWinPE equals FALSE.

    TSEd_FullOSExplanation: This is necessary to make this step only run in FullOS. This step will run the following scanstate command: C:\_SMSTaskSequence\Packages\<ID>\amd64\scanstate.exe C:\_SMSTaskSequence\UserState /o /localonly /efs:copyraw /c /hardlink /nocompress /l:C:\Windows\CCM\Logs\SMSTSLog\scanstate.log /progress:C:\Windows\CCM\Logs\SMSTSLog\scanstateprogress.log /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migdocs.xml /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migapp.xml

  • TSEd_WinPEAdd an extra Capture User State Step (optional: change the name), select Copy by using file system access and check Continue if some files cannot be captured, Capture locally by using links instead of copying files and Capture in off-line mode (Windows PE only). Now go to the Options tab and add the condition of _SMSTSInWinPE equals TRUE.

    Explanation: This is necessary to make this step only run in WinPE.This step will run the following scanstate command: C:\_SMSTaskSequence\Packages\<ID>\amd64\scanstate.exe C:\_SMSTaskSequence\UserState /o /localonly /efs:copyraw /offlineWinDir:C:\WINDOWS /c /hardlink /nocompress /l:X:\WINDOWS\TEMP\SMSTSLog\scanstate.log /progress:X:\WINDOWS\TEMP\SMSTSLog\scanstateprogress.log /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migdocs.xml /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migapp.xml

  • TSEd_RestTo complete the overview, I’ll show here the default values of the restore settings. (Optional) Select Restore local computer user profiles and give in a password.

    Explanation: This step will run the following loadstate command: C:\_SMSTaskSequence\Packages\<ID>\amd64\loadstate.exe C:\_SMSTaskSequence\UserState /ue:<computername>\* /c /hardlink /nocompress /l:C:\WINDOWS\CCM\Logs\SMSTSLog\loadstate.log /progress:C:\WINDOWS\CCM\Logs\SMSTSLog\loadstateprogress.log /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migdocs.xml /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migapp.xml

I still remember creating all batch files to perform these actions. Now they are possible out of the box!

Result

Now running this task sequence from either Full OS or WinPE will result in something like the example under here. In this example I migrated some files, folders and background. This last one will show as first in the new Windows 8 machine.

Before After
Before After