{"id":4,"date":"2015-04-10T15:18:37","date_gmt":"2015-04-10T15:18:37","guid":{"rendered":"http:\/\/www.osdninja.com\/?p=4"},"modified":"2015-05-13T20:51:42","modified_gmt":"2015-05-14T02:51:42","slug":"sccm-2012-r2-upgrade-0x87d00267","status":"publish","type":"post","link":"http:\/\/www.osdninja.com\/?p=4","title":{"rendered":"SCCM 2012 R2 Upgrade 0x87D00267"},"content":{"rendered":"<p>Hi everyone, Had some issues after upgrading from SCCM 2012 SP1 to SCCM 2012 R2.\u00a0 In short, the symptom was our applications were not installing during the task sequence after the upgrade to R2.\u00a0 We use an &#8220;Install Application&#8221; action in the task sequence with a dynamic variable list to install apps.<\/p>\n<p>Reviewing the smsts.log file on a machine, we see a Policy Evaluation failed, hr=0x87D00267 message for every application in the list. <a href=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543ee86d92ca.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-18 size-full\" src=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543ee86d92ca.png\" alt=\"\" width=\"1222\" height=\"346\" srcset=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543ee86d92ca.png 1222w, http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543ee86d92ca-300x85.png 300w, http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543ee86d92ca-1024x290.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a> Moving from the SMSTS.log to the DCMAgent.log, there&#8217;s nothing very interesting, so we look next to the CIAgent.log <a href=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543f0c4213f3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-20 size-full\" src=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543f0c4213f3.png\" alt=\"\" width=\"1223\" height=\"706\" srcset=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543f0c4213f3.png 1223w, http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543f0c4213f3-300x173.png 300w, http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5543f0c4213f3-1024x591.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p id=\"xypPeKW\">\u00a0So we continue following the logs and look next to the CIAgent.log, then , CIDownloader.log, and finally DataTransferService.log where the event is logged for downloading the policy data from the server.<\/p>\n<p>Here we see ErrorCodes 0x80190194 and 0x80070002 which if you do some internet searches there starts to me a lot more information and suggestions.<\/p>\n<p><a href=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5551061719032.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-34 size-full\" src=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5551061719032.png\" alt=\"\" width=\"1382\" height=\"272\" srcset=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5551061719032.png 1382w, http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5551061719032-300x59.png 300w, http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5551061719032-1024x202.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>The general meaning of these is File or Document not found, so just to double check, I try the path in a web browser.<\/p>\n<p><a href=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_555106f5179fd.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-35 size-full\" src=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_555106f5179fd.png\" alt=\"\" width=\"1301\" height=\"216\" srcset=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_555106f5179fd.png 1301w, http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_555106f5179fd-300x50.png 300w, http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_555106f5179fd-1024x170.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>Normally doing the above in a browser will get you a bunch of encrypted xml data.\u00a0 Having seen something similar in the past, I double check the &#8220;Allow this application to be installed from the Install Application task sequence action without being deployed&#8221;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"580\" height=\"62\" class=\"alignnone size-full wp-image-38 \" src=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5551147ada5dc.png\" alt=\"\" srcset=\"http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5551147ada5dc.png 580w, http:\/\/www.osdninja.com\/wp-content\/uploads\/2015\/05\/img_5551147ada5dc-300x32.png 300w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/p>\n<p>In my case, it was already checked as expected, but to force a recompile of the application policy for task sequences, I made a \u00a0small change to any of the fields, such as the comments or description.\u00a0 This essentially creates a new version of the application in SCCM which also causes the management points to create new policies for all computers that the application is targeted to, and the standalone policy file for task sequences.\u00a0 After testing the task sequence again, boom, application installed.<\/p>\n<p><strong>The Big Fix<\/strong><\/p>\n<p>Since all the applications in the environment, roughly 3000, had this issue after the upgrade to SCCM R2, and automated fix had to be found.\u00a0 I also didn&#8217;t want to change the description or comments on all the apps, so through some trial and error, I also found that simply assigning a category to an application also triggers a policy update.\u00a0 The advantage here is that multiple applications can be selected in the SCCM console, and all assigned a category at one time.\u00a0 This is probably good enough for most people, and the category can just as easily be removed the same way if desired at a later time.\u00a0 However, this is still quite slow in the SCCM console if you have a large number of apps selected, and there&#8217;s a limit somewhere around 300 that can be done at once before console errors out.<\/p>\n<p><strong>Let&#8217;s automate it!\u00a0 <\/strong><\/p>\n<p>Below is some VB.NET code to loop through every application instance on the server and add a category if it doesn&#8217;t already exist.\u00a0 This leverages WMI through the Configuration Manager SDK libraries.\u00a0 Could easily be done in VBscript, Powershell, or anything else that talks to WMI, but this is my current interface of choice.<\/p>\n<pre class=\"lang:default decode:true \">    colApplications = _Connection.QueryProcessor.ExecuteQuery(\"SELECT * FROM SMS_Application where IsLatest=1\")\r\n\r\n    colCategories = _Connection.QueryProcessor.ExecuteQuery(\"select * from SMS_CategoryInstance where CategoryTypeName='AppCategories' And LocalizedCategoryInstanceName='\" &amp; CategoryName &amp; \"'\")\r\n    For Each Category As WqlQueryEngine.WqlResultObject In colCategories\r\n      'Should only be one\r\n      strCategoryID = Category(\"CategoryInstance_UniqueID\").StringValue\r\n    Next\r\n    If strCategoryID = \"\" Then\r\n      Return -1\r\n    End If\r\n\r\n    For Each resApplication As WqlQueryEngine.WqlResultObject In colApplications\r\n      Dim arrCategories() As String\r\n      Dim resApplicationCategories As New List(Of IResultObject)\r\n\r\n      arrCategories = resApplication(\"CategoryInstance_UniqueIDs\").StringArrayValue\r\n      Dim lstCategories As List(Of String) = arrCategories.ToList\r\n      If lstCategories.Contains(strCategoryID) = False Then\r\n        lstCategories.Add(strCategoryID)\r\n\r\n        resApplication(\"CategoryInstance_UniqueIDs\").StringArrayValue = lstCategories.ToArray\r\n        Try\r\n          resApplication.Put()\r\n          intUpdated += 1\r\n        Catch ex As Exception\r\n\r\n        End Try\r\n      End If\r\n    Next<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi everyone, Had some issues after upgrading from SCCM 2012 SP1 to SCCM 2012 R2.\u00a0 In short, the symptom was our applications were not installing during the task sequence after the upgrade to R2.\u00a0 We use an &#8220;Install Application&#8221; action in the task sequence with a dynamic variable list to install apps. Reviewing the smsts.log &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.osdninja.com\/?p=4\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;SCCM 2012 R2 Upgrade 0x87D00267&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.osdninja.com\/index.php?rest_route=\/wp\/v2\/posts\/4"}],"collection":[{"href":"http:\/\/www.osdninja.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.osdninja.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.osdninja.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.osdninja.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4"}],"version-history":[{"count":14,"href":"http:\/\/www.osdninja.com\/index.php?rest_route=\/wp\/v2\/posts\/4\/revisions"}],"predecessor-version":[{"id":50,"href":"http:\/\/www.osdninja.com\/index.php?rest_route=\/wp\/v2\/posts\/4\/revisions\/50"}],"wp:attachment":[{"href":"http:\/\/www.osdninja.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.osdninja.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.osdninja.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}