Pages

Thursday, August 11, 2016

SCCM Error 1612

SCCM Error Codes: 0x654 (1620) AND (1612)

The initial problem in our scenario was trying to deploy an application via SCCM, which was showing as "Past Due - Will Be Retried" in Software Center and had a Failed status with error code 0x654(1620).

I checked the AppEnforce log at C:\Windows\CCM\Logs on the client computer, and it showed an incorrect network path on the command line being run for the application.

I checked everything that I could think of on the application itself .

I created a new deployed application as a test, making sure the Content Location contained the correct path, and the Installation Program contained the correct .msi file had for the install.
I added the machine in question to the collection for this test app, and verified the app showed up in the computer's Software Center.

However, a new problem arose - the new test app kept saying "Past Due - Will Be Retried" in Software Center.  If I tried to initiate the install from Software Center, it would fail, showing Past Due status again.  This time the failure code was 0x654(1612).  I also confirmed that the application woud install if run manually from the ccmcache folder.  After some research and looking at .msi error codes, I found a solution online suggesting removing an associated registry entry to the install file.

I navigated to the registry, opening it as administrator, and searched for the program in question's GUID.  It showed up under a SourceList key, sure enough listing the previous incorrect path for the install.

SOLUTION:

I backed up the registry just in case, and then deleted the GUID folder of the full path containing the SourceList key:

HKEY_CLASSES_ROOT\Installer\Products\

I re-initiated the install from Software Center, and the application installed successfully.

Now I just have to figure out how to delete this on a slew of machine.

Wednesday, August 10, 2016

Multicasting with MDT

Multicasting with MDT

Multicasting Notes from the field


Problem
Typically when clients access a MDT Deployment share, they access it via a File Share. The modern Windows Server File Share can handle a reasonable load. However, if you start to get a lot of clients trying to download the same large OS image file over the network, you might get some performance problems, typically with the network.
Let’s talk numbers:
  •  MDT can run quite well within a virtual Machine, 1-2 virtual processors, 2-4 GB of ram, and a Gigabit network connection.
  • MDT can easily handle 20-25 client deployments at the same time.
  • When deploying a 4-8GB image (normal), the biggest bottle neck will be the network, even on Gigabit.

Multicast

Built into the Windows Server WDS OS Role, we find the tools necessary to run Multicast. WDS Multicast is a service program running in the background that listens to WDS requests against a networking port. WDSMulticast is only designed to multicast files, and is only practical for multicasting a few large files, which in the deployment world are *.wim files.
Multicast is designed to transfer one or more large files in a “Rolling Session” to one or more clients. Downloads should be slower than a typical Unicast session, however when you have a couple of clients connected to a Mulitcast session the overall load against the network will be much less than Unicast.
Here is the overall process:
  • ClientA starts a multicast session to download Win7SP1x86.wim from the MDT/WDS Server.
  • When the broadcast session of Win7SP1x86.wim reaches 25%, ClientB joins the session in progress. ClientB knows that it missed the first ¼ of the Win7SP1x86.wim file, so it starts writing 25% into its local copy of Win7SP1x86.wim.
  • When the multicast session reaches 100% of Win7SP1x86.wim, ClientA is done and drops off. However, ClientB is still missing the first ¼ of the file, and stays on the multicast chanel as it restarts (rolls back) to zero.
  • Eventually the multicast session of Win7SP1x86.wim reaches the 25% mark where ClientB first joined. ClientB now has 100% of the file and drops off. No clients are connected, and the server stops broadcasting.

MDT Multicasting

I’ve already mentioned the WDS Multicast Service component, now let’s talk the client side. MDT clients manage WDS Multicasting through the WDSMCast.exe program, this program is distributed in the AIK, and is designed to run on WinPE only.
The LTIApply.wsf script that downloads and installs OS WIM files is designed to use WDSMCast.exe if available. There is really nothing to setup on the client, all WDS Multicasting setup steps are performed on the WDS Server.
Let’s take a look at the WDS Command being called:
"%FullPath%\WDSMCast.exe" /UseSparseFile:No /verbose /progress
   /transfer-file /server:%ServerName% /namespace:"%Share%" 
   /SourceFile:"%SourceFile%" /DestinationFile:"%DestFile%" 
   /Username:%UserDomain%\%UserID% /password:"%UserPassword%"
The LTIApply.wsf script will automatically fill in the Server Name, Credentials, Source and Target files. But what is this about NameSpace? NameSpaces are just a logical grouping of similar WDS Multicasting Sessions on a server. For MDT we will use the Share name on the UNC path for the DeployRoot. For my machine \\MDT1\DeploymentShare$ the NameSpace would be “DeploymentShare$” (Note the Dollar sign at the end).
It’s important to note that if the Multicast session fails on the client for whatever reason, then the LTIApply.wsf script will automatically fall back to Unicast file transfer (access the file over a UNC \\server\deploymentshare$\Operaing Systems\Win7\Win7x86.wim path ).

Configuring the server

After you have enabled MDT on your server with the appropriate shares and files, and you have fully tested it out with a sample deployment, we can now enable WDS. Of course, your MDT Deployment Server needs to be on a Windows Server (2008 or 2012) machine that has the WDS OS Role enabled. If you are replicating your Deployment Share out to multiple servers, ensure that the WDS OS Role is enabled on all servers.
First off we need to enable the WDS “Namespace”, remember that from above? That’s easy to do using the WDSUtil.exe command on each server. I liked to use the WDSUtil.exe command because it was easy to execute the command on dozens of machines across the corporate network.
wdsutil.exe /new-namespace /FriendlyName:"Microsoft Deployment Server" 
  /NameSpace:DeploymentShare$ /ContentProvider:WDS 
  /ConfigString:c:\DeploymentShare /NameSpaceType:AutoCast
/FriendlyName can be anything
/NameSpace should be the share name of your DeploymentShare
/ConfigString should be the local file path of your DeploymentShare (not Network path)
When done, there is one final switch to set on the MDT Server to enable Multicast on the clients. Go to the properties of your Deployment Share. At the bottom of the page you will see a check box: “Enable multicast for this deployment share[…]”. Check the item, ready to go. This setting is found within the %DeployRoot%\control\settings.xml file.

Performance notes

Remember, Multicast is about performance. We are trying to get as many simultaneous client installations running as we can for a single server. Unfortunately there is no “magic” setting here for WDS to make it go fast. It could all depend on your individual scenario.
Do all machines have a Gigabit connection to the server? Do you multicast a single file, or several dozen *.wim files from a single MDT/WDS server? Also note that Muilticast is slower than Unicast for single files. So I would not configure Multicast in my MDT Capture Lab. Since I’m only imaging/capturing a couple machines at a time.
It also sucks that in some cases you might not have a test lab big enough to test Multicast under full load. The only testing you get is in production! So there is little time for testing and performance tuning.
Sometimes it’s a good idea to keep your *.wim image files at “thin” as possible, however, note that Multicast works best when it can download a small number of large *.wim files. If your MDT installation process also downloads large files like Office, Drivers, and other applications from the same MDT server during state restore, you won’t get the multicast benefit. You might consider putting other large components in the image to improve download performance. Sure it bloats up the Wim file, but it may improve the overall performance under heavy load.
During multicast downloads check the WDS Console on the server to monitor performance. The WDS Server tool will show each session in progress, and show the speed it’s running at. Early in the production process I might monitor the sessions looking for slow connections. Perhaps killing any multicast session that is going too slow.









Remember from above, if at any time during a Multicast Session, the connection drops. MDT Client scripts will automatically fall back to a Unicast session, which is just a normal file read over the network share. SO it’s OK to kill slow sessions from the server console.
It’s also important to note that during a single WDS Multicast session, the server will slow the speed down to accommodate the slowest client. If you have a Gigabit network though out your company, but just one user who has a Fast Ethernet switch in their office, the entire multicast session will slow down for that one Fast Ethernet switch. Yikes!
There are ways to manage how slow machines are handled by the WDS Server, within the properties.










For Microsoft’s own IT department we worked on several settings trying to find the best solution. For whatever reason we couldn’t get the Slow/Med/Fast settings to download fast enough on the high end. And the slow sessions were just *too* slow. Finally we settled on “Automatically Disconnect […]” and set the cut off speed at 1024 KBps. for our 7GB file, that would mean any session taking longer than ( 7GB at 1024KBps yields 7k Seconds or 120 Minutes or 2 Hours ). We figured that if any individual session was slower than 2 hrs then that client *should* be bumped off to it’s own Unicast session, and not slow down the rest.




Thanks to Keith Garner for this post.

MDT 2013 Update 2 Migration

The following steps will guide you to duplicate a MDT 2013 Update 2 deployment server from one machine to another with a different name.
This document assumes you currently have a working MDT 2013 Update 2 solution and only need to copy the configuration from another known working server to make a duplicate.
  1. Open your Deployment Console
    1. Right click on ‘MDT Deployment Share’
      1. Choose ‘Close Deployment Share’
    2. Right click on ‘MDT Deployment Share’ again
      1. Choose ‘Open Deployment Share’
      2. Select ‘Upgrade the content of the deployment share(if required)
      3. Make sure the ‘Deployment share path:’ points to the directory of your deployment share.
      4. Click ‘Next’ until you are finished the wizard.
    1. Right click on ‘MDT Deployment Share’
      1. Select ‘Properties’
      2. One the following tabs you will need to change the appropriate settings to customize for your particular machine.
        1. General Tab
          1. Make sure the highlighted information is changed to match your machine:
            1. Network (UNC) Path: Your machine name goes here
            2. Local Path: Enter the correct path to your deployment share location
          2. Ensure the other checks are selected for
            1. Platforms Supported
            2. Enable Multicast…

        1. Rules Tab
          1. Make sure the highlighted information is changed to match your machine:
            1. Replace 8669MDT01 with your machine name
            2. Click ‘Apply’
          2. Click ‘Edit Bootstrap.ini’
            1. Replace 8669MDT01 with your machine name
            2. Save the file and exit it.
        1. Windows PE Tab
          1. Click the ‘Drivers and Patches’ tab
            1. Ensure that for:
              1. Platform: x86 and x64
              2. Selection profile: WinPE10 Drivers (This is the selection profile I have saved my WINPE drivers to)
              3. Click ‘Apply’ for each platform
        2. Monitoring Tab
            1. Replace 8669MDT01 with your machine name
            2. Click ‘Apply’
            3. Click ‘OK’

    1. Browse to your deployment share folder
      1. Open the Boot folder
        1. Delete all the contents of the Boot folder
    2. Right click on ‘MDT Deployment Share’
      1. Choose ‘Update Deployment Share’
        1. Choose ‘Completely regenerate the boot images’
        2. Click ‘Next’ until you are finished the dialog wizard.
        3. This process will take 5-20 minutes.

    1. Open WDS ‘Windows Deployment Services’
      1. Expand ‘Servers’
      2. Expand your server name
      3. Click ‘Boot Images’
        1. Select the boot image on the right
        2. Right click the selection
        3. Choose ‘Replace Image’
        4. Browse to the deployment share ‘Boot’ folder that you deleted the files from in the previous steps.
        5. Select ‘LiteTouchPE_x64.wim’ file
        6. Select ‘Next’ until you are finished the dialog wizard
      4. Expand ‘Mulitcast Transmissions’
        1. If you see ‘MDT Share DeploymentShare$’ you are all done.
        2. If you do not see this then you need to run the following command from an administrative command prompt.
          1. wdsutil.exe /new-namespace /FriendlyName:"Microsoft Deployment Server" /NameSpace:DeploymentShare$ /ContentProvider:WDS  /ConfigString:c:\DeploymentShare /NameSpaceType:AutoCast

               

Step by Step Setup of MDT 2013 Update 2 Server




SCENARIO

You want a quick walk through on how to setup MDT 2013 Update 2 so that you can get started using it in your environment.


WHAT YOU WILL NEED

A server OS - Server 2008 R2 or higher.  We will be using Server 2012 R2 in this scenario.

  1. Windows Deployment Services role installed on our server.
  2. Download MDT 2013 Update 2. You can find it here.
  3. Download Windows ADK for Windows 10. You can find that here.
  4. Client OS (Win7, Win8, Win10) - whatever you plan on deploying.
  5. Drivers for the machines you are deploying to.

Driver Packs

Manufactures make driver packs for their various models.  Use these!!!







 Step 1: Install WDS role


Open Server Manager, go to Manage and then select Add Roles and Features.  You can do this through PowerShell as well if you know how to install server roles that way.

Go through the wizard and install Windows Deployment Services.





After you select Windows Deployment Services, you will be prompted to install additional features.  Click Add Features.



You will eventually be asked what Role Services you want installed.  Select both Deployment Server and Transport Server.



Finish the install and then reboot your server.

Step 2: Install Windows 10 ADK


Install the Windows 10 ADK.  When you get to the following screen, select Deployment Tools, Windows Preinstallation Environment (Windows PE), and User State Migration Tool (USMT).



This install may take a while.  Finish the install and then install MDT.

Step 3: Install MDT 2013 Update 2


Install Microsoft Deployment Toolkit.  You should have downloaded the correct version (x86 / x64) onto your server.  Begin the install.  You can just accept all of the defaults during the installation wizard.  After this, you are ready to get started with the configuration of WDS and MDT.

Step 4: Initial Configuration of WDS


Before continuing, I would recommend placing the shortcuts to the Deployment Workbench and Windows Deployment Services on your desktop or taskbar.

When you first open Windows Deployment Services, you should see something like the following:




You will want to right click on your server and select Configure Server.  For our purposes, we will just setup a Standalone server.



After this, you will be asked where you want to put the remote installation folder.  By default, it is placed here: C:\RemoteInstall

If you have two drives, you should place this on your second drive.  if you only have one drive, you can accept the default and select Next.  If you save it on the volume / drive that has your OS on it, you will get the following message:



After you select Yes, you will be asked about how your WDS server should handle PXE requests. When clients PXE boot, how do you want your WDS server to respond to those requests.  For our purposes, we will select Respond to all client computers (known and unknown).





When you get to the last screen, uncheck Add images to the server now.



Go ahead and finish the wizard.  When you look in your WDS console now,  you should see something like this:



For now, we will leave WDS, and work in MDT to create our boot.wim.  But when we finish that, we will come back and import our newly created boot.wim.

Step 5: Initial Configuration of MDT


Open the Deployment Workbench.  You should see something like this:



We will now create our deployment share.  This will be where MDT stores all of its stuff (boot files, application files, driver files, task sequences, etc.)

The default location will be C:\DeploymentShare and the default share name will be DeploymentShare$.  This share should be on it's own disk if possible.  Additionally, the share should be a hidden share ($).

You then have the option to give the share a description.

On the next screen, you have various options.  You can select what you like here.  For our purposes I am going to uncheck everything, but these options are your choice.



Go ahead and finish up the wizard.

Step 6: Create Boot.wim in MDT


While we are still in MDT, we will need to do the following:

  1. Download and import the WinPE drivers
  2. Create a selection profile for the WinPE drivers.
  3. Create the boot files.


In this example, I am going to download the WinPE drivers for Windows 10 (we used Windows 10 ADK so we need the WinPE 10 drivers) from HP.  This is the case even if you are deploying Windows 7 or 8 to your clients.  These drivers are for the WinPE environment, not for your desktop / laptop images.

So let's go to: 
http://ftp.hp.com/pub/caps-softpaq/cmit/HP_WinPE_DriverPack.html



Download the Softpaq.Exe and extract the files.  If you look at the extracted files, you will see network and storage drivers.  We need to inject these drivers into the WinPE boot image so that when it loads on your machines, it has the appropriate network and storage drivers.

Now that we have them downloaded and extracted, we want to create a folder for those drivers and them import them into that folder.


Right click on Out-of-Box Drivers and select New Folder.



In the wizard, give the folder the name: WinPE Win10x64


Complete the wizard.

Now right click on the newly created folder and select Import Drivers.



Navigate to the folder where you extracted the WinPE drivers to.  You don't need to check the Import drivers even if they are duplicates of an existing driver box as this is the first set of drivers we are importing.



Finish the wizard.  You should now see the drivers in the middle pane.



Now we will create a Selection Profile and then we will select these drivers to be part of that selection profile.  What this lets us to is to select different drivers to be used for different purposes.  If you have used SCCM, then you can think of the Selection Profile almost like a driver package.  We create it and then tell MDT to use only drivers in this Selection Profile when injecting drivers into the WinPE WIM.

Under Advanced Configuration, right click on Selection Profiles and select New Selection Profile.



Give your Selection Profile a meaningful name.



Next select the imported drivers that you just setup.



Finally, go ahead and finish up the wizard.  You should now see the Selection Profile that you created.



Now let's configure out Deployment Share properties.  So right click on MDT Deployment Share and select Properties.

On the first tab, the General tab, place a check by Enable multicast......



Now go to the Windows PE tab.  Under the Windows PE tab go to the Drivers and Patches tab. You should see "Selection Profile" under that tab. Use the pull down menu to select the WinPE Selection Profile that we created earlier.



IMPORTANT: Notice that next to Platform it says x86.  Depending on your WinPE driver situation you will need to make the change here, and then pull down the menu select x64 and then select the WinPE Selection Profile again. I only have x64 bit drivers and will only be using the x64 boot.wim. If you are going to use the x86 boot.wim, you should inject the x86 drivers into that .wim. You would do this by importing your x86 drivers, creating a selection profile, and then selecting that x86 selection profile here.



You are going to be creating two boot.wim files.  This properties dialogue box helps you configure both of those files.  So be sure to select options for both .wim files under Drivers and Patches.



Now let's go to the Monitoring tab to enable monitoring.



Now click OK to apply all of the settings we just made to the Deployment Share Properties.

We are now ready to create our boot.wim files.  Right click on MDT Deployment Share and select Update Deployment Share.



When the wizard opens, just accept all of the defaults and finish the wizard.  During the wizard, you should see MDT making updates to the WinPE wim file.  It will inject drivers, add needed feature packages (components) and configuration information into the .wim files.


Step 7: Add Boot Image to WDS


We will now go back to WDS to add the boot image that we just created.  So open up your Windows Deployment Services console and right click on Boot Images and select Add Boot Image.



In the wizard, select the LiteTouchPE_x64.wim file from the .\DeploymentShare\Boot directory.



Finish up the wizard. You should now be able to see the added boot image.



Finally, if you check in WDS and you don't see anything under Multicast Transmissions (see image below) then you can run a command to fix this.





If you don't see anything here, run this command from an administrative command prompt:

wdsutil.exe /new-namespace /FriendlyName:"Microsoft Deployment Server" /NameSpace:DeploymentShare$ /ContentProvider:WDS  /ConfigString:c:\DeploymentShare /NameSpaceType:AutoCast


This concludes the basic setup of MDT 2013 Update 2.  There are lots of features you can mess with as you go along, but this should get you up and running.

The next thing to do is to add your operating systems, drivers, applications, and task sequences.

Additional External Resources