[{"data":1,"prerenderedAt":152},["ShallowReactive",2],{"post:\u002F2008\u002F03\u002F02\u002Fpreparing-for-sccm-enabling-secure-key-exchange\u002F":3},{"post":4,"newer":98,"older":108,"related":116,"series":150},{"id":5,"title":6,"body":7,"canonical":78,"categories":79,"date":80,"description":13,"extension":81,"featured":82,"hero":83,"image":83,"meta":84,"navigation":85,"path":86,"readingTime":87,"seo":88,"series":83,"seriesOrder":83,"sites":89,"source":91,"stem":92,"tags":93,"updated":80,"url":96,"__hash__":97},"blog\u002Fblog\u002F2008\u002F03\u002F02\u002Fpreparing-for-sccm-enabling-secure-key-exchange.md","Preparing for SCCM – enabling Secure Key Exchange",{"type":8,"value":9,"toc":74},"minimark",[10,14,23,29,34,39,44,49,54,59,64,69],[11,12,13],"p",{},"I found this interesting forum post on the msft forums. This code will help you change all your sites to require secure key exchange.",[11,15,16,17],{},"here’s the post: ",[18,19,20],"a",{"href":20,"rel":21},"http:\u002F\u002Fforums.microsoft.com\u002FTechNet\u002FShowPost.aspx?PostID=2796017&SiteID=17",[22],"nofollow",[11,24,25],{},[26,27,28],"code",{},"on error resume next   ' Setup a connection to the local provider.   Set swbemLocator = CreateObject(\"WbemScripting.SWbemLocator\")   Set swbemServices= swbemLocator.ConnectServer(\".\", \"rootsms\")   Set providerLoc = swbemServices.InstancesOf(\"SMS_ProviderLocation\")   For Each Location In providerLoc   If location.ProviderForLocalSite = True Then   Set swbemServices = swbemLocator.ConnectServer(Location.Machine, \"rootsmssite_\" + Location.SiteCode)   siteCode = Location.SiteCode   Exit For   End If   Next",[11,30,31],{},[26,32,33],{},"Set swbemContext = CreateObject(\"WbemScripting.SWbemNamedValueSet\")   swbemContext.Add \"SessionHandle\", swbemServices.ExecMethod(\"SMS_SiteControlFile\", \"GetSessionHandle\").SessionHandle",[11,35,36],{},[26,37,38],{},"' How to list the site security mode from the site control file.   Call SetSecureKeyExchange(swbemServices, swbemContext, siteCode, 0)   Sub SetSecureKeyExchange(swbemServices, _   swbemContext, _   siteCode, _   enableDisableFlag)",[11,40,41],{},[26,42,43],{},"' Load site control file and get the SMS_SCI_SiteDefinition section.   swbemServices.ExecMethod \"SMS_SiteControlFile.Filetype=1,Sitecode=\"\"\" & siteCode & \"\"\"\", \"Refresh\", , , swbemContext Query = \"SELECT * FROM SMS_SCI_SiteDefinition \" & _   \"WHERE ItemName = 'Site Definition' \" & _   \"AND SiteCode = '\" & siteCode & \"'\"",[11,45,46],{},[26,47,48],{},"' Get the Site Definition properties.   Set SCIComponentSet = swbemServices.ExecQuery(Query, ,wbemFlagForwardOnly Or wbemFlagReturnImmediately, swbemContext)",[11,50,51],{},[26,52,53],{},"'Only one instance is returned from the query.   For Each SCIComponent In SCIComponentSet   'Loop through the array of embedded SMS_EmbeddedProperty instances.   For Each vProperty In SCIComponent.Props   ' Setting: Allow unknown child sites aka check the box   ' require secure key exchange   If vProperty.PropertyName = \"Allow unknown child sites\" Then   wscript.echo \"Site Code: \" & SiteCode   wscript.echo vProperty.PropertyName   wscript.echo \"Current value: \" & vProperty.Value   wscript.echo \"Resetting value to: \" & enableDisableFlag",[11,55,56],{},[26,57,58],{},"' modify the value   vProperty.Value = enableDisableFlag",[11,60,61],{},[26,62,63],{},"' Save the properties   SCIComponent.Put_ , swbemContext   End If   Next   Next",[11,65,66],{},[26,67,68],{},"'Commit any changes to the actual site control file.   Set InParams = swbemServices.Get(\"SMS_SiteControlFile\").Methods_(\"CommitSCF\").InParameters.SpawnInstance_   InParams.SiteCode = siteCode   swbemServices.ExecMethod \"SMS_SiteControlFile\", \"CommitSCF\", InParams, , swbemContext",[11,70,71],{},[26,72,73],{},"' Release the copy of the site control file.   swbemServices.Get(\"SMS_SiteControlFile\").ReleaseSessionHandle swbemContext.Item(\"SessionHandle\").Value   End Sub",{"title":75,"searchDepth":76,"depth":76,"links":77},"",2,[],"techcolumnist",[],"2008-03-02T19:21:59Z","md",false,null,{},true,"\u002Fblog\u002F2008\u002F03\u002F02\u002Fpreparing-for-sccm-enabling-secure-key-exchange",1,{"title":6,"description":13},[90,78],"lasswell","both","blog\u002F2008\u002F03\u002F02\u002Fpreparing-for-sccm-enabling-secure-key-exchange",[94,95],"configmgr","script","\u002F2008\u002F03\u002F02\u002Fpreparing-for-sccm-enabling-secure-key-exchange\u002F","U5BMMmCalu9YKCxqiKHva7ueP-7sy7J5wlJ4TCt6zr4",{"title":99,"description":100,"date":101,"url":102,"categories":103,"tags":104,"image":83,"readingTime":87,"canonical":78,"sites":107,"series":83,"seriesOrder":83},"Datacenter Storage","How does your datacenter storage look? We built a “storage aisle” of 20 racks that seemed like plenty during the datacenter build.","2008-05-22T21:52:17Z","\u002F2008\u002F05\u002F22\u002Fdatacenter-storage\u002F",[],[105,106],"datacenter","san",[90,78],{"title":109,"description":110,"date":111,"url":112,"categories":113,"tags":114,"image":83,"readingTime":87,"canonical":78,"sites":115,"series":83,"seriesOrder":83},"datacenter build","Here’s some pictures of a new datacenter I helped design. In future posts I’ll show a before and after!","2008-02-04T01:03:43Z","\u002F2008\u002F02\u002F04\u002Fdatacenter-build\u002F",[],[105],[90,78],[117,130,140],{"title":118,"description":119,"date":120,"url":121,"categories":122,"tags":126,"image":83,"readingTime":87,"canonical":78,"sites":129,"series":83,"seriesOrder":83},"PowerShell: NetApp – Gather Volume Information","This is a simple script to gather volume information including dedupe schedule and autogrow settings.","2014-04-28T12:57:58Z","\u002F2014\u002F04\u002F28\u002Fpowershell-netapp-gather-volume-information\u002F",[123,124,125],"dotps","ps","scripts",[127,128,95],"netapp","powershell",[90,78],{"title":131,"description":132,"date":133,"url":134,"categories":135,"tags":136,"image":83,"readingTime":87,"canonical":78,"sites":139,"series":83,"seriesOrder":83},"ISY Python Script for controlling media lights via xbmc","com) to control devices that are linked. I’m designing this script to be used inside a script for xbmc. here’s the first part of it.","2010-07-16T07:55:36Z","\u002F2010\u002F07\u002F16\u002Fisy-python-script-for-controlling-media-lights-via-xbmc\u002F",[125],[137,95,138],"isy","xbmc",[90,78],{"title":141,"description":142,"date":143,"url":144,"categories":145,"tags":147,"image":83,"readingTime":87,"canonical":78,"sites":149,"series":83,"seriesOrder":83},"PowerShell: Schedule a URL into Maintenance Mode","Found a nice article about how to script a URL (or web application) into maintenance mode.","2010-07-07T14:53:54Z","\u002F2010\u002F07\u002F07\u002Fschedule-a-url-into-maintenance-mode\u002F",[146,124,125],"engineering",[148,95,128],"scom",[90,78],{"doc":83,"posts":151},[],1790223951808]