The actual process of migrating applications is performed during an OS deployment task sequence in Configuration Manager.

Application Migration uses a custom task sequence step that calls an Application Migration API to get a list of Configuration Manager Applications and Packages that need to be installed on the device based on the software titles previous installed (determined through inventory) and the migration rules that apply to those titles.

Testing the API and getting device details

You can test the API and observe the results for a specific device from a browser with the following by replacing <SLAPlatformServer>, <Port>, <domain>, and <MachineName> with relevant names:

http://<SLAPlatformServer>:<Port>/platform/api/
     applicationmigration/getApplicationsToBeInstalled/
     ?domainName=<domain>&machineName=<MachineName>

The URL is broken down for clarity; run it as a single line. It returns a JSON file with a  list of Applications and Packages that will be installed on the specified device when the task sequence executes.

This list is defined in two task sequence variables (one for Applications and the other for Packages) that can be used by the standard Configuration Manager Install Application and Install Package steps to dynamically install each application and package returned by the API.

On this page:

Configuring the 1E Application Migration Task Sequence step

The 1E Application Migration Task Sequence step has the following properties:

  • Web Service Base URL – the base URL for the Application Migration API. For example: http://SLASERVER:8080 
  • Credentials (for Web service call) – the username and password used to call the Application Migration API – this account must already exist as user on the SLA platform. If the domain user name and password are left empty, the Configuration Manager Network Access Account is used to fetch data from Application Migration (to use this option the Network Access Account must be added as an SLA Platform user
  • Source Computer Domain – in most cases the source computer domain will be the same domain that the OS is being deployed in. If you are migrating computers from one domain to another through the OS deployment process, you must select the Specify Domain option and enter the Fully Qualified Domain Name of the originating domain, as this will be the domain that the computer belongs to in the SLA Platform from previous inventory.
  • Source Computer Name Variable – the name of the task sequence variable which is used to store the source computer name (the computer from which applications are being migrated).

    By default, the Source Computer Name Variable property is set to SourceComputerName. If the specified variable does not exist, the 1E Application Migration step uses the current computer name as the source computer name.

    If you are using 1E Nomad (included in the Windows Servicing Suite) and have included the Get Migration Settings step in the task sequence, that step will set the SourceComputerName variable as follows:

    • In a Computer Replace scenario:
      • When the restore Task Sequence executes on the new computer Get Migration Settings sets the SourceComputerName variable to the source computer defined in the Computer Association in Configuration Manager.
      • If the Task Sequence is initiated through the Windows Servicing Assistant you do not need to create a Computer Association. Get Migration Settings sets the SourceComputerName variable to the name of the source computer selected by the user in the Windows Servicing Assistant.
    • In a Computer Refresh scenario the SourceComputerName variable is set to the current computer name.

    If you are adding the 1E Application Migration step to an In-place Upgrade Task Sequence, set the Source Computer Name Variable to _SMSTSMachineName and do not use Get Migration Settings.

  • Application Variable – the base variable this task sequence step uses to define the Applications to be installed. For example, if Application Variable is set to APPMIG, this step will set variables APPMIG01APPMIG02 etc. corresponding to the applications to be installed dictated by the application migration rules applied to the specified source computer. This is used to define the base variable in a later Install Application step that is configured to install applications according to a dynamic variable list.
  • Package Variable – the base variable that this task sequence step uses to define the Packages to be installed. For example, if Package Variable is set to PKGMIG, this step will set variables PKGMIG001PKGMIG002 etc. corresponding to the packages to be installed dictated by the application migration rules applied to the specified source computer. This is used to define the base variable in a later Install Package step that is configured to install packages according to a dynamic variable list.

The example below illustrates how to add the Application Migration step to an existing OS Deployment task sequence. Your own task sequence may differ, but the general positioning of these steps is where Install Application steps would normally be placed (after Install Updates and before the Restore User Files).


Properties for the Application Migration task sequence step

Example

The example below demonstrates how to configure an existing OS Deployment task sequence to use Application Migration.

  1. From the Configuration Manager console, select the Software Library workspace.
  2. Expand the Operating Systems folder and select Task Sequences.
  3. Right-click the task sequence that Application Migration is to be added to and from the context menu, select Edit.

1E Application Migration step

Choose Add > 1E OSD > AppMigration.

On the Properties tab, enter the following details:

  1. In Web Service Base URL, enter the location for your SLA platform, for example http://slaserver.acme.local:8080
  2. Under Credentials (for Web service call), enter the domain\username and password for the SLA platform user you want to use.
  3. Source Computer Domain – in most cases the source computer domain will be the same domain that the OS is being deployed in. If you are migrating computers from one domain to another through the OS deployment process, you must select the Specify Domain option and enter the Fully Qualified Domain Name of the originating domain, as this will be the domain that the computer belongs to in the SLA Platform from previous inventory.
  4. In Source Computer Name Variable, leave the value at its default SourceComputerName.
  5. In Application Variable, choose the base variable that is used to define the dynamic applications. In our example, it is AppMig.
  6. In Package Variable, choose the base variable that is used to define the dynamic packages. In our example, it is PkgMig.
  7. Click Apply.

 

Adding the Application Migration step

Install Application step

Choose Add > Software > Install Application.

On the Properties tab:

  1. Select the Install applications according the dynamic variable list option.
  2. In Base variable name, enter the application variable. In our example, it is AppMig (see step 4e above).
  3. If you want the task sequence to continue installing other applications in the event if an application install fails, select the If an application installation fails, continue installing other applications in the list option.

On the Options tab:

  1. Click Add Condition and enter condition to check if Task Sequence Variable APPMIG01 exists (or the application variable you defined in the 1E Application Migration step with 01 appended). 
  2. Click Apply.

Install Package step 

Choose Add > Software > Install Package.


On the Properties tab:

  1. Select the Install software packages according to dynamic variable list option.
  2. In Base variable name, enter the package variable name used in the 1E Application Migration step. In our example, it is PkgMig (see step 4f above).
  3. If you want the task sequence to continue installing other applications in the event if an application install fails, select the If installation of a software package fails, continue installing other packages in the list option.

On the Options tab:

  1. Click Add Condition and enter the condition to check if the task Sequence Variable PKGMIG001 exists (or the package variable you defined in the 1E Application Migration step and append 001 to it).
  2. Click Apply.

Installing applications

Adding a condition to the task sequence

Task sequence variables used by Application Migration

In addition to the two base variable names used for Applications and Packages described above, the Application Migration step uses the DeploymentType task sequence variable with the following possible values (which must be set prior to the Application Migration step).

  • Refresh (also known as Wipe-and-Load) – data on the machine is backed up, the disk is wiped, a new OS is installed and applications are installed subject to their respective migration rules. If no application migration rule exists for an application, it will not be installed.
  • Replace – data and applications are migrated from one machine to another. Applications that are migrated to the new computer are subject to the application migration rules for the source computer. If no application rule exists for an application, it will not be installed on the new computer.
  • InPlace – Windows setup is executed on an existing machine to upgrade the OS. The disk is not wiped, so existing data and installed applications are preserved. In this instance, Application Migration will install only applications that are subject to a replace or upgrade migration rules. Retain rules are ignored.
  • NewComputer (also known as bare-metal) – this is a new build machine where no applications or data are being migrated. However, you can use the Role-based application sets feature to install applications on new machines.

Using migration rules and role-based application sets

You can also use Role-based application sets in conjunction with deployments such as:

  • a Computer Refresh
  • an In-place Upgrade

A Role-based Application Set defines a set of applications that should be installed on a computer for a user performing a particular role, or perhaps working in a particular location. For example, everyone in the Project Management Office requires Microsoft Project. Role-based Application Sets are primarily designed to be used when building a new computer, where there are no applications to be migrated but there is a base set of applications that the new user will need. They can also optionally be applied when rebuilding, upgrading or replacing a computer, so the user gets the applications defined for their role plus any applications migrated as a result of migration rules.

For this to work, the task sequence must contain the variable IncludeRoleBasedAppsForExistingPC set to a value of true, as shown in the picture opposite.

When using IncludeRoleBasedAppsForExistingPC with a value of true for role-based application sets, the DeploymentType variable must be set appropriately in the task sequence before the 1E Application Migration step.

Support for Computer Replacement scenario

If you intend to use Application Migration to migrate applications from an old PC to a new PC (Computer Replacement scenario), you may need to include the Get migration settings step in your Task Sequences. The Get Migration Settings Task Sequence step retrieves information from a Computer Association in Configuration Manager so it can determine the source device when installing applications on the new device. It is currently distributed with Nomad and is added to the Task Sequence Editor by installing NomadBranchTools.msi. Refer to Installing Nomad tools for operating system deployment for more information.