Task Sequence Variables are not applied in SCCM 2012 R2 OSD RRS feed

  • Question

  • Hi everybody!

    I am experiencing a problem during OS deployment when using SCCM 2012 R2.

    I am used to set variables on my computers so they can be used by my task sequence in order to ínstall applications, set keyboard layout etc.

    After I upgraded my SCCM SP1 CU3 to R2 all of a sudden my variables are not applied anymore. I checked using a dump variable vbscript and sure enough, my variables are not listed.

    I even tried installing a fresh SCCM 2012 R2 on a new server to check if the issue was not something cause by the upgrade but the issue is there as well.

    Is anyone else experiencing this? and If so has anybody been able to solve this? Being able to use variables on my computer objects is crucial for my OS deployment...



    Friday, October 25, 2013 12:08 PM

All replies

  • If you are confident that you are configuring the variables correctly and that you are deploying to the correct system, then you should open a case with Microsoft as this sounds like a bug.

    Are these system refreshes?

    Did you upgrade/update your boot images after the upgrade?

    What happens if you run a single task ts that simply pauses so you can dump the variables? Is the variable set then?

    Jason |

    Friday, October 25, 2013 1:34 PM
  • Hi Jason!

    Thanks for taking some time to answer me.

    I am 100% confident that the variables on the computer object are configured correctly. I used the exact same method as I did when on SCCM 2012 SP1 where it was working.

    I tested with a Collection variable and that variable is applied correctly!

    I dump the variables in a text document using a script so that is good enough, I believe. I was just hoping other people have observed the same behaviour.. If so then it is probably a bug and we can open a case with Microsoft

    Friday, October 25, 2013 1:44 PM
  • Hi,

    I have the same problem after the upgrade to R2. I've found out that in the CM database in the table MEP_MachinePolicies an entry does not exist.

    select * from  MEP_MachinePolicies

    where MachineID = '33554536'

    The variables are displayed correctly in the database:

    select * from MEP_MachineVariables

    where MachineID = '33554536'

    But without the entry in the table MEP_MachinePolicies the variable will never be requested during the staging process.

    I found this in my SMSTS.log:

    Retrieving collection variable policy. 
    Parsing Policy Body. Found 3 collection variables. 
    Retrieving machine variable policy. 
    Found 0 machine variables.

    It really looks like a bug!

    Friday, October 25, 2013 2:08 PM
  • Hi Again!

    I can see the variables in the database as well, so they must be applied correctly.

    Seems like a bug, yes....

    Friday, October 25, 2013 2:17 PM
  • Same exact behaviour here I am afraid, after upgrade to R2 from CU3.   

    Confirmed when using brand new WinPE disk from ADK 8.1 (recompiled).

    Confirmed occurs for both x86 and x64 disks.

    Looks like PSS call needs to be logged, will do so tomorrow.

    • Edited by dr_heathcliff Sunday, October 27, 2013 2:38 PM More Info
    Sunday, October 27, 2013 1:03 PM
  • To my knowledge, this is a confirmed issue (regression from SP1). Please do contact CSS as only they can truly help at this point.

    Jason |

    Sunday, October 27, 2013 2:01 PM
  • I had a very similar issue until I created (from definition) a new package for "Configuration Manager Client Upgrade" version 6 and updated this step within my task sequences?

    Is it possible your still using version 5 in your TS?



    Monday, October 28, 2013 3:07 AM
  • Hi SysAdam,

    Machine variables are read before the Config Manager Client is installed.

    So I can't see how an update of the Config Manager Client Upgrade package can fix this issue.

    I will try and contact Customer Service and Support today.

    Monday, October 28, 2013 7:39 AM
  • Any updates on this bug? I've heard Microsoft is working on a hotfix.
    Wednesday, October 30, 2013 11:41 AM
  • I've heard Microsoft is working on a hotfix.
    ... and that's the current status.

    Torsten Meringer |

    Wednesday, October 30, 2013 12:54 PM
  • same issue here, interessting fact: Clients which were importet before upgrading to R2, are still working. Every new object is strugling reading the variables during OSD / OSB. It's very frustrating, we are weeks away from a big rollout and this is issue is killing our concepts :-(
    Thursday, October 31, 2013 8:48 AM
  • Same issue here. I can see the variables with the following powershell command:

    Get-CMDeviceVariable -DeviceName VDI001 -VariableName ClientType
    IsMasked : False
    Name     : ClientType
    Value    : Standard

    Martin Schneeberger

    Thursday, October 31, 2013 11:51 AM
  • After a successful task sequence OS deployment, the variables are available. (Active-Yes, Client=Yes, Approved=Approved, Blocked=No, ...)

    Only when a device is "fresh" imported the variables in the device properties are not available in the OS deployment task sequence.


    Martin Schneeberger

    Thursday, October 31, 2013 12:30 PM
  • Hi all!

    I have an open support case with Microsoft CSS on this. The escalation team is currently researching it.

    I am waiting for their response.

    Thursday, October 31, 2013 2:02 PM
  • me too :-) let's see what they figure out...

    Thursday, October 31, 2013 2:05 PM
  • As mentioned above, this is a confirmed bug. You should contact CSS if you are experiencing this issue.

    Jason |

    Thursday, October 31, 2013 2:38 PM
  • Try the workaround mentioned here:

    Reinstall wimgapi.msi  (it might require a reboot)

    Saturday, November 2, 2013 10:11 PM
  • Thanks for the good idea. I have the wimgapi.msi reinstalled. Unfortunately, the problem persists.

    Martin Schneeberger

    Sunday, November 3, 2013 8:35 AM
  • Hi Holger

    I am using your companys Software Central, and it Works now after reinstall of wimgapi.msi. I can now deploy my images and software through SWC version Unfortunately it didnt help Martin, but its worth a try.



    Sunday, November 3, 2013 6:52 PM
  • I also had reinstalled wimgapi.msi, but without success. Any other idea? Thanks!
    Monday, November 4, 2013 3:33 PM
  • wimgapi has nothing to do with variables if I am not mistaken. It (wimgapi) comes into play when dealing with wim images.

    Torsten Meringer |

    Monday, November 4, 2013 4:11 PM
  • ho is the correct procedure to reinstall the WIMGAPI ? I have a similar issue on one machine and on a second machien the WDS service cannto be start anymore...



    Thursday, November 7, 2013 3:42 PM
  • Hi Markus

    I had done an in-place upgrade from System Center 2012 SP1 CU3 to System Center 2012 R2. After the upgrade, the WDS service does not start anymore.

    - Uninstall \sms\wim\wimgapi.msi
    - Install \sms\wim\wimgapi.msi
    - Reboot

    The "wimgapi.msi"-reinstall doesn't resolve the "variable"-problem described by Holger


    Martin Schneeberger

    Thursday, November 7, 2013 4:30 PM
  • Hi Markus

    A HotFix for the "WDS / PXE"-Problem is now available:

    "An update is available for the "Operating System Deployment" feature of System Center 2012 R2 Configuration Manager"

    The HotFix kb2905002 doesn't resolve the "variable"-problem described by Holger

    Martin Schneeberger

    Sunday, November 10, 2013 12:15 PM
  • Hello, we face the same issue with the Variables here.

    Did the Upgrade to R2 just one week ago. Any news on the feedback from Microsoft (if available) would be appreciated...

    Thanks Swen

    Wednesday, November 13, 2013 8:02 AM
  • Hi Swen,

    MS gave us a VBScript which you can run as a prestart command in WinPE, the script reads all variables from your DB and write in down in TSEnv.dat. This is working well, meanwhile we are looking Forward to get a "real" fix for this (not officially confirmed) bug...



    Wednesday, November 13, 2013 8:04 AM
  • Hi everybody,

    we are also facing the same problem. How can we request that script from Microsoft or can someone else provide it? It is quiet urgent.
    Thank you very much in advance!


    Wednesday, November 13, 2013 9:04 AM
  • we got it from our Support contact after we opened up the case. i'll ask him if we can share it, gues this would be interessting fro some other guys too...
    Wednesday, November 13, 2013 3:57 PM
  • I would also appreciate if the script could be shared.

    Please remember to click "Mark as Answer" or "Vote as Helpful" on the post that answers your question (or click "Unmark as Answer" if a marked post does not actually answer your question). This can be beneficial to other community members reading the thread.

    This forum post is my own opinion and does not necessarily reflect the opinion or view of my employer, Microsoft, its employees, or MVPs.

    Twitter: @alexverboon | Blog: Anything About IT

    Wednesday, November 13, 2013 9:40 PM
  • Call CSS and open a case.

    Jason |

    Thursday, November 14, 2013 12:30 AM
  • I have been working with CSS on this very issue.  The support engineer I am working with says he is unaware of any script to work around this problem; however, he did tell me they have a private hotfix which is currently under testing by the product group.  They expect a public release very soon.


    Tuesday, November 19, 2013 1:53 PM
  • Hello All,

    I got a Fix by Microsoft today. Hotfix KB2907591 

    Hope it will work. I have not tested this as of yet.

    Regards Swen

    Wednesday, November 20, 2013 2:37 PM
  • Does the hotfix have a page yet so we can read what it is and what it changes?
    Wednesday, November 20, 2013 5:33 PM
  • I have just tested the hotfix KB2907591. Unfortunately, the device variables are still not available. A reboot of the site server after install the hotfix did not help.


    Martin Schneeberger

    Wednesday, November 20, 2013 6:54 PM
  • it may be possible that boot media\image needs to be rebuilt for it to apply if the hotfix includes a client side change.

    Documentation on the hotfix is what I was after to better understand what it is changing.

    Wednesday, November 20, 2013 7:14 PM
  • Rebuild the boot images without success. The device variables are still not available.

    Martin Schneeberger

    Wednesday, November 20, 2013 8:24 PM
  • Hmmm,

         Anyone have new info on this or the potential hotfix?  I spend enough time talking to Microsoft to get through the R2 upgrade (corrupted TS deployments were causing failures).  I would love to avoid another call for the hotfix\script.

    Thursday, November 21, 2013 8:34 PM
  • Hi Keith,

    I just got off the phone with CSS and was told the hotfix mentioned above is not guaranteed to work as it is still in testing at Microsoft.  All of my MDT based task sequences fail to run, including newer MDT TS's with updated toolkits from ADK 8.1 and MDT 2013.  The support engineer suggested I try to limp by with SCCM task sequences until such a fix is provided for MDT Integrated TS's.  Sorry I could not deliver any better new.


    Thursday, November 21, 2013 8:38 PM
  • Well, that is interesting.  I believe the IT pros here use SCCM task sequences instead of MDT ones but I have had a few complaints.  Is the machine variable issue isolated to only MDT based task sequences?
    Thursday, November 21, 2013 8:41 PM
  • This has nothing to do with MDT; the issue discussed in this thread is an OSD task sequence variable issue.

    Note that for those of reporting issues even after the update is installed, please contact CSS.

    Finally, the associated KB article for this hotfix is live as of noon (or so -- Pacific time) today, just search for the kb number.

    Jason |

    Thursday, November 21, 2013 11:05 PM
  • Thank you Jason.  I did not say this was a MDT issue; I simply stated my experience, which is all MDT related task sequences fail after the R2 upgrade. 

    To clarify the task sequences of which I spoke are OSD task sequences, which are MDT integrated (   I have built an OSD task sequence today without any variables and NOT using the MDT integration and have had success. 

    Sorry if I wasn't clear.


    Friday, November 22, 2013 1:19 AM
  • thats strange at all, because we have also upgraded to R2 and MDT 2013. The only Problem which we had was the crahsing of the WDS/PXE Service. This is fixed since the Installation of the Hotfix.

    What I did also was to create new Boot Images, MDT Setting Packages and a new  Package for the MDT Toolkit.

    Then I've modified only the Task Sequences created with MDT 2012 to use the new Packages and Boot Images for MDT 2013. By now everything is working but I haven't tested all the parts by now. Multilanguage ZTI OS Deployment Windows 7 and 8.1 with Applications and User State Migration is working by now, so it seems that all TS Variables that we need are working.

    The Environment is running on Server 2012 for the Primary site and a mix of 2008R2 and Server 2012 for all secondary sites.



    Friday, November 22, 2013 8:48 AM
  • Now everything works fine. Thanks CSS!

    Steps to success:

    1. Download and install Hotfix 
    2. Site Server reboot
    3. Rebuild the boot images
    4. Re-created the Per-computer variables if they were created after System Center 2012 R2 Configuration Manager was installed but before this update is applied


    Martin Schneeberger

    Friday, November 22, 2013 5:31 PM
  • I guess you're missing the substance of the issue being reported and fixed by the hotfix -- it only affected task sequence variables directly set on computer resources within the console and not task sequence variables in general. If you were setting and/or using task sequence variables in any other way, then the issue was/is completely N/A for you.

    Jason |

    Friday, November 22, 2013 9:21 PM
  • Yes, you're right Jason. The Hotfix  only affects the computer variables, originally described in the issue by Holger.

    Solution: "Per-computer variables for imported computers are not read in System Center 2012 R2 Configuration Manager"

    Martin Schneeberger

    Saturday, November 23, 2013 11:31 AM
  • Yes Jason, I just had a moment of clarity!  I was equating devices with the MDT and NOT the collection device variables.  I would like some whipped cream with that serving of humble pie!


    Sunday, November 24, 2013 6:24 PM
  • How about pumpkin since it's close to Turkey Day?

    Jason |

    Sunday, November 24, 2013 6:28 PM
  • Ha! Sounds good!  Have a great holiday!


    Sunday, November 24, 2013 6:33 PM