How to build a Profile Migration Command Line with Sample Script

Version 9

    Verified Product Versions

    Endpoint Manager 2016.x

    First, open up your command XML. The best way you want to view it is in the console's Profile Migration editor. To get to it, follow these steps;


    1. If you open up your Management Console, and go to Tools>Distribution>OS Deployment
        1. Dist.png
    2. I am going to show you how to edit the XML in the provisioning template as OSD is gone in 9.6. But the same XML can be used in either location.
    3. Go into you're "my templates" section and create a new template (or edit an existing one). Create a "Capture Profile" action.
        1. capture.png
    4. Once you have added the action, you can browse to add a new Command XML, or edit to edit one.
    5. Hit "Edit" and select the template you want and hit "Edit" again. You can place the attached SampleProfileXML in the "...\ldlogon\uma\commandxml" folder and use it, or use one you are already working with.


    Now that you are in the editor, here are some of my tips to remember when building a Profile Migration Script (Command XML);





    1. I found it best to INCLUDE all and then EXCLUDE the specific Users, Files, and Folders you do not want captured. When you look at the Command XML, you’ll notice on the User Profiles, and on Files and Folders I INCLUDE each of the top directories I want, and then EXCLUDE the lower directories I do not want captured.
        1. IncludeAll.pngFiles.png
    2. When doing either an INCLUDE or EXCLUDE, make sure to check the “Scan Sub Folders” option if it applies.
        1. scan sub.png
    3. There are some good variables that are specific to UMA\SMA, you have to look in the Documentation to find them.
    4. I found it best to have the users logged off at time of capture and deployment, but I have seen successful captures with the user logged on as well.
    5. The “My Documents” section, when you are building your script, appears to be useless, I just ignore it all together. All of you're "My Documents" can be included in the selection of "User Profiles" and in the "Files and Folders"  as shown above in rule # 1. The %Personal Directory% variable takes care of it unless the user has been added to the exclude list.
        1. docs.png
    6. When in doubt, check the documentation listed in Rule # 3, it actually has a lot of information.


    Attached is the sample XML script as listed above. If you open it up in the Profile Migration editor, you can see how I apply each of the above mentioned rules.