<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Ken Brumfield's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ken_brumfield/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 01 Nov 2016 02:53:56 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Deltas Between Windows Server 2016 “Desktop Experience” and “Core”</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/deltas-between-windows-server-2016-desktop-experience-and-core</link>
      <pubDate>Tue, 25 Oct 2016 16:43:22 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/?p=505</guid>
      <description><![CDATA[Context In working with customers building migration plans for Windows Server 'X' to Windows Server...]]></description>
      <content:encoded><![CDATA[<h1>Context</h1> <p><span style="font-size: 12pt;font-family: times new roman"><span style="font-size: small;font-family: segoe ui">In working with customers building migration plans for Windows Server 'X' to Windows Server 2016, one of the new things to be aware of is that you can no longer "move" between a "Core" install and a "Full"/"Desktop Experience" install.&nbsp; Even further is that Core now only supports a subset of features of "Desktop Experience" version.&nbsp; This is identified on Technet where supported workloads for Core are documented.&nbsp; However, I found that that said detail was not enough to interrogate the environment to determine which servers could vs. could not be upgraded to Core (preferred).<br></span></span></p> <p><a href="https://technet.microsoft.com/en-us/windows-server-docs/get-started/getting-started-with-server-core"><span style="font-size: 12pt;font-family: times new roman"><span style="font-size: small;font-family: segoe ui">https://technet.microsoft.com/en-us/windows-server-docs/get-started/getting-started-with-server-core</span></span></a><span style="font-size: 12pt;font-family: times new roman"><br></span></p> <h1>Discovery</h1> <p><span style="font-size: 12pt;font-family: times new roman"><span style="font-size: small;font-family: segoe ui">I wrote a PowerShell script that exported the list of Windows Server 2016 features from both Core and Desktop Experience.&nbsp; The script is attached to the blog entry should you be curious.&nbsp; It requires an online Desktop Experience and Core version, as well as the "WIM" for the install of each.&nbsp; I <span style="text-decoration: underline">know</span> there are more elegant ways to do this:<br></span></span></p> <ul> <li><span style="font-size: small">(Invoke-command for the Get-WindowsOptionalFeature) so all that is needed are the online installs.</span>  <li><span style="font-size: small">All of this could be done with the Get-WindowsOptionalFeature, but that gave me a raw list with none of the parent/child relationships that Get-WindowsFeature provided so it was a little rough to understand.<br></span></li></ul> <p><span style="font-size: 12pt;font-family: times new roman"><span style="font-size: small;font-family: segoe ui">However, this got the job done and was not worth a re-write.</span><br></span></p> <p>Script:&nbsp; <a href="https://msdnshared.blob.core.windows.net/media/2016/10/Compare-Windows-Server-2016-Desktop-Experience-and-Core.ps1_.txt">Compare Windows Server 2016 Desktop Experience and Core.ps1</a></p> <h1>Results</h1> <p><span style="font-size: 12pt;font-family: times new roman"><span style="font-size: small;font-family: segoe ui">Here is a table of the Windows Features missing from core (see full spreadsheet <a href="https://msdnshared.blob.core.windows.net/media/2016/10/Features-Missing-from-Windows-Server-2016-Core.xlsx">Features Missing from Windows Server 2016 Core</a>, includes insight into subfeature for which there is partial support of the top level feature):</span><br></span></p> <div> <table style="border-collapse: collapse" border="0"> <colgroup> <col style="width: 96px"> <col style="width: 314px"> <col style="width: 233px"> <col style="width: 113px"></colgroup> <tbody valign="top"> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black"><strong>IsNotInCore</strong></span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black"><strong>DisplayName</strong></span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black"><strong>Name</strong></span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black"><strong>IsRSATSubFeature</strong></span></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Fax Server</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Fax</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">MultiPoint Services</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">MultiPointServerRole</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Network Policy and Access Services</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">NPAS</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-Distributed Scan Server</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Print-Scan-Server</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-Internet Printing</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Print-Internet</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-Remote Desktop Gateway</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">RDS-Gateway</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-Remote Desktop Session Host</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">RDS-RD-Server</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-Remote Desktop Web Access</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">RDS-Web-Access</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-|-IIS Management Console</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Web-Mgmt-Console</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-|-|-IIS 6 Management Console</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Web-Lgcy-Mgmt-Console</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Windows Deployment Services</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">WDS</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-Deployment Server</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">WDS-Deployment</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-Transport Server</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">WDS-Transport</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-IIS Server Extension</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">BITS-IIS-Ext</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">BitLocker Network Unlock</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">BitLocker-NetworkUnlock</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Direct Play</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Direct-Play</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Internet Printing Client</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Internet-Print-Client</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">LPR Port Monitor</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">LPR-Port-Monitor</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-|-Multicasting Support</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">MSMQ-Multicasting</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">RAS Connection Manager Administration Kit (CMAK)</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">CMAK</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Remote Assistance</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Remote-Assistance</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Simple TCP/IP Services</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Simple-TCPIP</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">SMTP Server</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">SMTP-Server</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">TFTP Client</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">TFTP-Client</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Windows Biometric Framework</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Biometric-Framework</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-GUI for Windows Defender</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Windows-Defender-Gui</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Windows Identity Foundation 3.5</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Windows-Identity-Foundation</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">|-Windows PowerShell ISE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">PowerShell-ISE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Windows Search Service</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Search-Service</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Windows TIFF IFilter</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Windows-TIFF-IFilter</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Wireless LAN Service</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">Wireless-Networking</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr> <tr style="height: 20px"> <td style="border-top-style: none;border-left-style: none;background: #ffc7ce;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: #9c0006">TRUE</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">XPS Viewer</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"><span style="color: black">XPS-Viewer</span></td> <td style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none;padding-left: 7px;padding-right: 7px" valign="bottom"> <p style="text-align: center"><span style="color: black">FALSE</span></p></td></tr></tbody></table></div> <p>NOTE:&nbsp; You will notice that there is a column about whether or not this is an RSAT SubFeature.&nbsp; For functional purposes we do not care when upgrading whether or not someone has installed administration tools that are dependent on the GUI.&nbsp; Since we don’t want admins logging on to the boxes to do administration.</p> <h1>Building on top of this information</h1> <p>I used this information in System Center Configuration Manager to create two collections, one of systems that can be upgraded to Core and one of systems that <u>must</u> be upgraded to Desktop Experience.</p> <p>Here are the respective SCCM Collection Queries (note that there may be better/performing ways to write these):</p> <ul> <li>Servers that <u>can not</u> be upgraded to core based on features installed<br>select distinct SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SERVER_FEATURE on SMS_G_System_SERVER_FEATURE.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SERVER_FEATURE.Name in ("Fax Server","MultiPoint Services","Network Policy and Access Services","Distributed Scan Server","Internet Printing","Remote Desktop Gateway","Remote Desktop Session Host","Remote Desktop Web Access","IIS Management Console","IIS 6 Management Console","Windows Deployment Services","Deployment Server","Transport Server","IIS Server Extension","BitLocker Network Unlock","Direct Play","Internet Printing Client","LPR Port Monitor","Multicasting Support","RAS Connection Manager Administration Kit (CMAK)","Remote Assistance","Simple TCP/IP Services","SMTP Server","TFTP Client","Windows Biometric Framework","GUI for Windows Defender","Windows Identity Foundation 3.5","Windows PowerShell ISE","Windows Search Service","Windows TIFF IFilter","Wireless LAN Service","XPS Viewer") and SMS_G_System_SYSTEM.SystemRole = "Server"  <li>Servers that <u>can</u> be upgraded to core based on features installed (excluding RSAT features):<br>select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.SystemRole = "Server"&nbsp; AND SMS_R_System.Name NOT IN (select distinct SMS_R_System.Name from&nbsp; SMS_R_System inner join SMS_G_System_SERVER_FEATURE on SMS_G_System_SERVER_FEATURE.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SERVER_FEATURE.Name in ("Fax Server","MultiPoint Services","Network Policy and Access Services","Distributed Scan Server","Internet Printing","Remote Desktop Gateway","Remote Desktop Session Host","Remote Desktop Web Access","IIS Management Console","IIS 6 Management Console","Windows Deployment Services","Deployment Server","Transport Server","IIS Server Extension","BitLocker Network Unlock","Direct Play","Internet Printing Client","LPR Port Monitor","Multicasting Support","RAS Connection Manager Administration Kit (CMAK)","Remote Assistance","Simple TCP/IP Services","SMTP Server","TFTP Client","Windows Biometric Framework","GUI for Windows Defender","Windows Identity Foundation 3.5","Windows PowerShell ISE","Windows Search Service","Windows TIFF IFilter","Wireless LAN Service","XPS Viewer") and SMS_G_System_SYSTEM.SystemRole = "Server") </li></ul> <p>&nbsp;</p> <p>(Update) PowerShell command string to determine which roles prevent a system from being core:</p> <p>Get-WindowsFeature|Where-Object {$_.Installed -and ($_.DisplayName -EQ “Fax Server" -or $_.DisplayName -EQ "MultiPoint Services" -or $_.DisplayName -EQ "Network Policy and Access Services" -or $_.DisplayName -EQ "Distributed Scan Server" -or $_.DisplayName -EQ "Internet Printing" -or $_.DisplayName -EQ "Remote Desktop Gateway" -or $_.DisplayName -EQ "Remote Desktop Session Host" -or $_.DisplayName -EQ "Remote Desktop Web Access" -or $_.DisplayName -EQ "IIS Management Console" -or $_.DisplayName -EQ "IIS 6 Management Console" -or $_.DisplayName -EQ "Windows Deployment Services" -or $_.DisplayName -EQ "Deployment Server" -or $_.DisplayName -EQ "Transport Server" -or $_.DisplayName -EQ "IIS Server Extension" -or $_.DisplayName -EQ "BitLocker Network Unlock" -or $_.DisplayName -EQ "Direct Play" -or $_.DisplayName -EQ "Internet Printing Client" -or $_.DisplayName -EQ "LPR Port Monitor" -or $_.DisplayName -EQ "Multicasting Support" -or $_.DisplayName -EQ "Multicasting Support" -or $_.DisplayName -EQ "RAS Connection Manager Administration Kit (CMAK)" -or $_.DisplayName -EQ "Remote Assistance" -or $_.DisplayName -EQ "Simple TCP/IP Services" -or $_.DisplayName -EQ "SMTP Server" -or $_.DisplayName -EQ "TFTP Client" -or $_.DisplayName -EQ "Windows Biometric Framework" -or $_.DisplayName -EQ "GUI for Windows Defender" -or $_.DisplayName -EQ "Windows Identity Foundation 3.5" -or $_.DisplayName -EQ "Windows PowerShell ISE" -or $_.DisplayName -EQ "Windows Search Service" -or $_.DisplayName -EQ "Windows TIFF IFilter" -or $_.DisplayName -EQ "Wireless LAN Service" -or $_.DisplayName -EQ "XPS Viewer")}]]></content:encoded>
    </item>
    <item>
      <title>Handy SCCM (Updates) Queries</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/handy-sccm-updates-queries</link>
      <pubDate>Thu, 09 Apr 2015 22:44:54 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/2015/04/09/handy-sccm-updates-queries/</guid>
      <description><![CDATA[Context Recently , while still basically focusing on platforms related technologies, I’ve been doing...]]></description>
      <content:encoded><![CDATA[<h1>Context</h1> <p>Recently , while still basically focusing on platforms related technologies, I’ve been doing more and more work focusing on datacenter/cloud automation.&nbsp; This obviously involves a lot more focus on integrating to accommodate business processes.&nbsp; In short this is a collection of SCCM queries which I’m going to be maintaining as much for my own reference as anything else.</p> <p>Note:&nbsp; This will be updated as I come across new queries and or optimize the queries.</p> <p>My thanks to all the many folks out there who had similar samples for me to build off of.</p> <h1>References</h1> <h2>Systems needing updates which are included in baselines</h2> <p>Get a list of systems that need updates in the Software Update Groups, regardless of whether or not the update is actually deployed to the system.</p> <h3>Excluding unknown status</h3> <p>SELECT s.Name0, sn.StateName<br />&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN 402<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE 500<br />&nbsp;&nbsp;&nbsp; END As StateType<br />&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN uss.LastEnforcementMessageID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE uss.[Status]<br />&nbsp;&nbsp;&nbsp; END As StateID<br />&nbsp;&nbsp;&nbsp; , MAX(CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN uss.LastEnforcementMessageTime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE uss.LastStatusCheckTime<br />&nbsp;&nbsp;&nbsp; END) As StateTime<br />FROM v_R_System s <br />INNER JOIN v_UpdateComplianceStatus uss ON s.ResourceID = uss.ResourceID <br />INNER JOIN v_CIRelation cr ON uss.CI_ID = cr.ToCIID <br />INNER JOIN v_AuthListInfo ali ON cr.FromCIID = ali.CI_ID<br />INNER JOIN v_StateNames sn ON<br />&nbsp; CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN 402<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE 500<br />&nbsp;&nbsp;&nbsp; END = sn.TopicType<br />&nbsp;&nbsp;&nbsp; AND<br />&nbsp;&nbsp;&nbsp; CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN uss.LastEnforcementMessageID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE uss.[Status]<br />&nbsp;&nbsp;&nbsp; END = sn.StateID<br />WHERE NOT ( NOT (uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0) AND (uss.[Status] = 1 OR uss.[Status] = 3))<br />GROUP BY s.Name0, sn.StateName<br />&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN 402<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE 500<br />&nbsp;&nbsp;&nbsp; END<br />&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN uss.LastEnforcementMessageID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE uss.[Status]<br />&nbsp;&nbsp;&nbsp; END</p> <h3>Including unknown status</h3> <p>SELECT s.Name0, sn.StateName, MAX(uss.StateTime) As StateTime<br />FROM v_R_System s <br />INNER JOIN v_UpdateState_Combined uss ON s.ResourceID = uss.ResourceID <br />INNER JOIN v_CIRelation cr ON uss.CI_ID = cr.ToCIID <br />INNER JOIN v_AuthListInfo ali ON cr.FromCIID = ali.CI_ID<br />INNER JOIN v_StateNames sn ON uss.StateType = sn.TopicType AND uss.StateID = sn.StateID<br />WHERE NOT (uss.StateType = 500 AND (uss.StateID = 1 or uss.StateiD=3))<br />GROUP BY s.Name0, sn.StateName</p> <p>Note:&nbsp; The WHERE clause excludes ”Update Not Required” (StateID = 1) and “Update Installed” (StateID = 3)</p> <h2>Information About Updates Needed Per Computer (For which there are baselines)</h2> <p>This gives pretty much all the information needed about the patch state for all needed, unknown, error, and in process statuses.&nbsp; This will also tell if the computer is in a collection that the update is deployed to.</p> <p>Note:&nbsp; At the database level, Software Update Group deployments get deployed on a per update basis (Assignments).&nbsp; This means that by joining of v_CIAssignmentToCI and v_AuthListInfo to the CI_ID of the update will duplicate the rows.</p> <h3>All Needed Updates Excluding Unknown Status:&nbsp; Simplified Version</h3> <p>SELECT s.Name0, ali.Title As [SoftwareUpdateGroup], ui.ArticleID, ui.BulletinID, ui.Title As UpdateTitle, ui.InfoURL, sn.StateName<br />&nbsp;&nbsp;&nbsp; , MAX(CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN uss.LastEnforcementMessageTime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE uss.LastStatusCheckTime<br />&nbsp;&nbsp;&nbsp; END) As StateTime, CAST(MAX(CASE WHEN tm.ResourceID IS NOT NULL THEN 1 ELSE 0 END) AS BIT) AS IsDeployedToThisComputer<br />FROM v_R_System s<br />INNER JOIN v_UpdateComplianceStatus uss ON s.ResourceID = uss.ResourceID<br />INNER JOIN v_CIRelation cr ON uss.CI_ID = cr.ToCIID <br />INNER JOIN v_AuthListInfo ali ON cr.FromCIID = ali.CI_ID <br />INNER JOIN v_StateNames sn ON<br />&nbsp;&nbsp;&nbsp; CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN 402<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE 500<br />&nbsp;&nbsp;&nbsp; END = sn.TopicType<br />&nbsp;&nbsp;&nbsp; AND<br />&nbsp;&nbsp;&nbsp; CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0 THEN uss.LastEnforcementMessageID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE uss.[Status]<br />&nbsp;&nbsp;&nbsp; END = sn.StateID<br />INNER JOIN v_CIAssignmentToCI atci ON uss.CI_ID = atci.CI_ID<br />INNER JOIN v_CIAssignment a ON atci.AssignmentID = a.AssignmentID<br />LEFT JOIN v_CITargetedMachines tm ON uss.CI_ID = tm.CI_ID AND s.ResourceID = tm.ResourceID<br />INNER JOIN v_UpdateInfo ui ON uss.CI_ID = ui.CI_ID<br />WHERE NOT ( NOT (uss.[Status] = 2 AND uss.LastEnforcementMessageID &gt; 0) AND (uss.[Status] = 1 OR uss.[Status] = 3))<br />GROUP BY s.Name0, ali.Title, ui.BulletinID, ui.ArticleID, ui.Title, sn.StateName, ui.InfoURL</p> <h3>All Needed Updates Excluding Unknown Status:&nbsp; Performance Optimized Version (about 8x faster)</h3> <p>SELECT uss.Name0, aliloc.[DisplayName] As SoftwareUpdateGroup, uss.BulletinID, uss.ArticleID, loc.[DisplayName] AS [UpdateTitle], loc.CIInformativeURL As InfoURL, sn.StateName, uss.LastErrorCode<br />&nbsp;&nbsp;&nbsp; , MAX(uss.StateTime) As StateTime, CAST(MAX(CASE WHEN cm.MachineID IS NOT NULL THEN 1 ELSE 0 END) AS BIT) AS IsDeployedToThisComputer<br />FROM<br />(<br />&nbsp;&nbsp;&nbsp; SELECT uci.CI_ID, s.ResourceID, uci.ArticleID, uci.BulletinID, s.Name0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN cs.[Status] = 2 AND LastEnforcementMessageID &gt; 0 THEN 402<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN ISNULL(cs.Status, case when ss.ScanPackageVersion&gt;=uci.MinSourceVersion then 1 else 0 end) != 2 OR LastEnforcementMessageID IS NULL or LastEnforcementMessageID = 0 THEN 500<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END As StateType<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN cs.[Status] = 2 AND LastEnforcementMessageID &gt; 0 THEN LastEnforcementMessageID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN ISNULL(cs.Status, case when ss.ScanPackageVersion&gt;=uci.MinSourceVersion then 1 else 0 end) != 2 OR LastEnforcementMessageID IS NULL or LastEnforcementMessageID = 0 THEN ISNULL(cs.Status, case when ss.ScanPackageVersion&gt;=uci.MinSourceVersion then 1 else 0 end)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END As StateId<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN cs.[Status] = 2 AND LastEnforcementMessageID &gt; 0 THEN LastEnforcementMessageTime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN ISNULL(cs.Status, case when ss.ScanPackageVersion&gt;=uci.MinSourceVersion then 1 else 0 end) != 2 OR LastEnforcementMessageID IS NULL or LastEnforcementMessageID = 0 THEN ISNULL(cs.LastStatusCheckTime, ss.ScanTime)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END As StateTime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , cs.LastErrorCode<br />&nbsp;&nbsp;&nbsp; FROM CI_UpdateCIs uci<br />&nbsp;&nbsp;&nbsp; INNER JOIN CI_ConfigurationItems (NOLOCK) AS ci ON uci.CI_ID = ci.CI_ID AND ci.CIType_ID IN (1, 8) AND ci.IsHidden = 0 AND ci.IsTombstoned = 0<br />&nbsp;&nbsp;&nbsp; INNER JOIN Update_ComplianceStatus cs ON uci.CI_ID = cs.CI_ID AND cs.[Status] &gt; 0<br />&nbsp;&nbsp;&nbsp; LEFT JOIN v_R_System s ON cs.MachineID = s.ResourceID<br />&nbsp;&nbsp;&nbsp; INNER JOIN Update_ScanStatus ss ON uci.UpdateSource_ID = ss.UpdateSource_ID AND s.ResourceID = ss.MachineID<br />) As uss<br />INNER JOIN v_CIRelation cr ON uss.CI_ID = cr.ToCIID <br />INNER JOIN CI_ConfigurationItems ali ON cr.FromCIID = ali.CI_ID AND ali.IsHidden=0 AND ali.CIType_ID=9<br />INNER JOIN v_LocalizedCIProperties_SiteLoc aliloc on ali.CI_ID = aliloc.CI_ID<br />INNER JOIN v_StateNames sn ON uss.StateType = sn.TopicType AND uss.StateID = sn.StateID<br />INNER JOIN CI_AssignmentTargetedCIs (NOLOCK) atci ON uss.CI_ID = atci.CI_ID<br />INNER JOIN CI_CIAssignments (NOLOCK) a ON atci.AssignmentID = a.AssignmentID<br />INNER JOIN Collections_G (NOLOCK) c ON a.TargetCollectionID = c.CollectionID<br />LEFT JOIN CollectionMembers (NOLOCK) cm ON c.SiteID = cm.SiteID AND cm.MachineID = uss.ResourceID<br />INNER JOIN v_LocalizedCIProperties_SiteLoc loc ON uss.CI_ID = loc.CI_ID<br />WHERE NOT (uss.StateType = 500 AND (uss.StateId = 1 OR uss.StateId = 3))<br />GROUP BY uss.Name0, aliloc.[DisplayName], uss.BulletinID, uss.ArticleID, loc.[DisplayName], loc.CIInformativeURL, sn.StateName, uss.LastErrorCode</p> <h3>All Updates Including Unknown Status:&nbsp; Simplified Version</h3> <p>SELECT s.Name0, ali.Title As [SoftwareUpdateGroup], ui.ArticleID, ui.BulletinID, ui.Title As UpdateTitle, ui.InfoURL, sn.StateName<br />&nbsp;&nbsp;&nbsp; , MAX(uss.StateTime) As StateTime, CAST(MAX(CASE WHEN tm.ResourceID IS NOT NULL THEN 1 ELSE 0 END) AS BIT) AS IsDeployedToThisComputer<br />FROM v_R_System s<br />INNER JOIN v_UpdateState_Combined uss ON s.ResourceID = uss.ResourceID AND NOT (uss.StateType = 500 AND (uss.StateID = 1 OR uss.StateID = 3))<br />INNER JOIN v_CIRelation cr ON uss.CI_ID = cr.ToCIID <br />INNER JOIN v_AuthListInfo ali ON cr.FromCIID = ali.CI_ID <br />INNER JOIN v_StateNames sn ON uss.StateType = sn.TopicType AND uss.StateID = sn.StateID<br />INNER JOIN v_CIAssignmentToCI atci ON uss.CI_ID = atci.CI_ID<br />INNER JOIN v_CIAssignment a ON atci.AssignmentID = a.AssignmentID<br />LEFT JOIN v_CITargetedMachines tm ON uss.CI_ID = tm.CI_ID AND s.ResourceID = tm.ResourceID<br />INNER JOIN v_UpdateInfo ui ON uss.CI_ID = ui.CI_ID<br />GROUP BY s.Name0, ali.Title, ui.BulletinID, ui.ArticleID, ui.Title, sn.StateName, ui.InfoURL</p> <h3>All Updates Including Unknown Status:&nbsp; Performance Optimized Version (My testing shows a 45x improvement in query times):</h3> <p>SELECT s.Name0, aliloc.[DisplayName] As SoftwareUpdateGroup, uss.BulletinID, uss.ArticleID, loc.[DisplayName] AS [UpdateTitle], loc.CIInformativeURL As InfoURL, sn.StateName, uss.LastErrorCode<br />&nbsp;&nbsp;&nbsp; , MAX(uss.StateTime) As StateTime, CAST(MAX(CASE WHEN cm.MachineID IS NOT NULL THEN 1 ELSE 0 END) AS BIT) AS IsDeployedToThisComputer<br />FROM v_R_System s<br />INNER JOIN<br />(<br />&nbsp;&nbsp;&nbsp; SELECT uci.CI_ID, cm.ResourceID, uci.ArticleID, uci.BulletinID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN cs.[Status] = 2 AND LastEnforcementMessageID &gt; 0 THEN 402<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN ISNULL(cs.Status, case when ss.ScanPackageVersion&gt;=uci.MinSourceVersion then 1 else 0 end) != 2 OR LastEnforcementMessageID IS NULL or LastEnforcementMessageID = 0 THEN 500<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END As StateType<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN cs.[Status] = 2 AND LastEnforcementMessageID &gt; 0 THEN LastEnforcementMessageID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN ISNULL(cs.Status, case when ss.ScanPackageVersion&gt;=uci.MinSourceVersion then 1 else 0 end) != 2 OR LastEnforcementMessageID IS NULL or LastEnforcementMessageID = 0 THEN ISNULL(cs.Status, case when ss.ScanPackageVersion&gt;=uci.MinSourceVersion then 1 else 0 end)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END As StateId<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , CASE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN cs.[Status] = 2 AND LastEnforcementMessageID &gt; 0 THEN LastEnforcementMessageTime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN ISNULL(cs.Status, case when ss.ScanPackageVersion&gt;=uci.MinSourceVersion then 1 else 0 end) != 2 OR LastEnforcementMessageID IS NULL or LastEnforcementMessageID = 0 THEN ISNULL(cs.LastStatusCheckTime, ss.ScanTime)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END As StateTime<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , cs.LastErrorCode<br />&nbsp;&nbsp;&nbsp; FROM CI_UpdateCIs (NOLOCK) uci<br />&nbsp;&nbsp;&nbsp; INNER JOIN CI_ConfigurationItems (NOLOCK) AS ci ON uci.CI_ID = ci.CI_ID AND ci.CIType_ID IN (1, 8) AND ci.IsHidden = 0 AND ci.IsTombstoned = 0<br />&nbsp;&nbsp;&nbsp; CROSS JOIN v_ClientMachines cm <br />&nbsp;&nbsp;&nbsp; LEFT JOIN Update_ComplianceStatus (NOLOCK) cs on cs.CI_ID=uci.CI_ID and cs.MachineID=cm.ResourceID and cs.[Status] &gt; 0<br />&nbsp;&nbsp;&nbsp; LEFT JOIN Update_ScanStatus (NOLOCK) ss on ss.MachineID=cm.ResourceID and ss.UpdateSource_ID=uci.UpdateSource_ID<br />) uss ON s.ResourceID = uss.ResourceID AND NOT (uss.StateType = 500 AND (uss.StateId = 1 OR uss.StateId = 3))<br />INNER JOIN v_StateNames sn ON uss.StateType = sn.TopicType AND uss.StateID = sn.StateID<br />INNER JOIN v_CIRelation cr ON uss.CI_ID = cr.ToCIID<br />INNER JOIN CI_ConfigurationItems ali ON cr.FromCIID = ali.CI_ID AND ali.IsHidden=0 AND ali.CIType_ID=9<br />INNER JOIN v_LocalizedCIProperties_SiteLoc aliloc on ali.CI_ID = aliloc.CI_ID<br />INNER JOIN CI_AssignmentTargetedCIs (NOLOCK) atci ON uss.CI_ID = atci.CI_ID<br />INNER JOIN CI_CIAssignments (NOLOCK) a ON atci.AssignmentID = a.AssignmentID<br />INNER JOIN Collections_G (NOLOCK) c ON a.TargetCollectionID = c.CollectionID<br />LEFT JOIN CollectionMembers (NOLOCK) cm ON c.SiteID = cm.SiteID AND cm.MachineID = s.ResourceID<br />INNER JOIN v_LocalizedCIProperties_SiteLoc loc ON uss.CI_ID = loc.CI_ID<br />GROUP BY s.Name0, aliloc.[DisplayName], uss.BulletinID, uss.ArticleID, loc.[DisplayName], loc.CIInformativeURL, sn.StateName, uss.LastErrorCode</p> <p>&nbsp;</p> <h2>Determine Service Windows for Machines</h2> <p>Parse the binary field that stores the details of the schedule token and also what collection the service window comes from.</p> <p>Reference:&nbsp; <a title="http://myitforum.com/cs2/blogs/jhuston/archive/2007/07/30/sms-schedule-token-strings.aspx" href="http://myitforum.com/cs2/blogs/jhuston/archive/2007/07/30/sms-schedule-token-strings.aspx">http://myitforum.com/cs2/blogs/jhuston/archive/2007/07/30/sms-schedule-token-strings.aspx</a></p> <p>SELECT<br />&nbsp;&nbsp;&nbsp; s.Name0<br />&nbsp;&nbsp;&nbsp; , c.CollectionName<br />&nbsp;&nbsp;&nbsp; , CASE (sw.rawSchedules / POWER(CAST(2 AS BIGINT), 19)) &amp; (POWER(CAST(2 AS BIGINT), 3) - 1)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 1 THEN &#39;Effective only&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 2 THEN &#39;Every &#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + CAST((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 3)) &amp; (POWER(CAST(2 AS BIGINT), 5) - 1) AS VARCHAR)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &#39; day&#39; + CASE WHEN ((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 3)) &amp; (POWER(CAST(2 AS BIGINT), 5) - 1)) &gt; 1 THEN &#39;s&#39; ELSE &#39;&#39; END<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 3 THEN &#39;Every &#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + CAST((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 13)) &amp; (POWER(CAST(2 AS BIGINT), 3) - 1) AS VARCHAR) + &#39; week&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + CASE WHEN ((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 13)) &amp; (POWER(CAST(2 AS BIGINT), 3) - 1)) &gt; 1 THEN &#39;s&#39; ELSE &#39;&#39; END + &#39; on &#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + CASE (sw.rawSchedules / POWER(CAST(2 AS BIGINT), 16)) &amp; (POWER(CAST(2 AS BIGINT), 3) - 1)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 1 THEN &#39;Sunday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 2 THEN &#39;Monday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 3 THEN &#39;Tuesday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 4 THEN &#39;Wednesday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 5 THEN &#39;Thursday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 6 THEN &#39;Friday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 7 THEN &#39;Saturday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 4 THEN &#39;Every &#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + CAST((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 12)) &amp; (POWER(CAST(2 AS BIGINT), 3) - 1) AS VARCHAR)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &#39; month&#39; + CASE WHEN ((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 12)) &amp; (POWER(CAST(2 AS BIGINT), 3) - 1)) &gt; 1 THEN &#39;s&#39; ELSE &#39;&#39; END<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &#39; on the &#39; + CASE CAST((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 8)) &amp; (POWER(CAST(2 AS BIGINT), 3) - 1) - 1 AS VARCHAR)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 1 THEN &#39;first&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 2 THEN &#39;second&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 3 THEN &#39;third&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 4 THEN &#39;fourth&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END + &#39; &#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + CASE CAST((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 16)) &amp; (POWER(CAST(2 AS BIGINT), 3) - 1) AS VARCHAR)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 1 THEN &#39;Sunday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 2 THEN &#39;Monday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 3 THEN &#39;Tuesday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 4 THEN &#39;Wednesday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 5 THEN &#39;Thursday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 6 THEN &#39;Friday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 7 THEN &#39;Saturday&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHEN 5 THEN &#39;Every &#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + CAST((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 10)) &amp; (POWER(CAST(2 AS BIGINT), 4) - 1) AS VARCHAR)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &#39; month&#39; + CASE WHEN ((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 10)) &amp; (POWER(CAST(2 AS BIGINT), 4) - 1)) &gt; 1 THEN &#39;s&#39; ELSE &#39;&#39; END<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + CASE WHEN (sw.rawSchedules / POWER(CAST(2 AS BIGINT), 14)) &amp; (POWER(CAST(2 AS BIGINT), 4) - 1)&gt; 0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; THEN &#39; on day &#39; + CAST((sw.rawSchedules / POWER(CAST(2 AS BIGINT), 14)) &amp; (POWER(CAST(2 AS BIGINT), 4) - 1) AS VARCHAR)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE &#39; on the last day of the month&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br />&nbsp;&nbsp;&nbsp; END + &#39; starting on &#39; + CONVERT(VARCHAR, sw.StartTime, 120) + CASE WHEN sw.UseGMTTimes = 1THEN &#39; (UTC) &#39; ELSE &#39; (System Local) &#39; END<br />&nbsp;&nbsp;&nbsp; + &#39; for &#39; + CAST(sw.Duration AS VARCHAR) + &#39; minutes&#39;<br />&nbsp;&nbsp;&nbsp; As [Description]<br />FROM<br />(<br />&nbsp;&nbsp;&nbsp; SELECT CollectionID, CAST(CONVERT(BINARY(8),&#39;0x&#39;+ Schedules, 1) AS BIGINT) As RawSchedules, StartTime, UseGMTTimes, Duration<br />&nbsp;&nbsp;&nbsp; FROM CEP_ServiceWindows<br />) as sw<br />INNER JOIN [dbo].[Collections] c ON sw.CollectionID = c.CollectionID<br />INNER JOIN [dbo].[CollectionMembers] cm ON c.SiteID = cm.SiteID<br />INNER JOIN [dbo].[System_DATA] s ON cm.MachineID = s.MachineID</p> <h2>Get a comma delimited list of CI_IDs for each Bulletin and Article</h2> <p>Useful for automating approval of the updates and much faster than WMI queries.</p> <p>SELECT<br />DISTINCT uci2.BulletinID, uci2.ArticleID,<br />STUFF<br />(<br />&nbsp;&nbsp;&nbsp; (<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT N&#39;,&#39;+&nbsp; CAST(uci.CI_ID As NVARCHAR(MAX))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM [dbo].[CI_UpdateCIs] uci<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INNER JOIN CI_ConfigurationItems (NOLOCK) AS ci ON uci.CI_ID = ci.CI_ID AND ci.CIType_ID IN (1, 8) AND ci.IsHidden = 0 AND ci.IsTombstoned = 0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE (uci.BulletinID = uci2.BulletinId AND uci.ArticleID = uci2.ArticleID)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY uci.CI_ID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FOR XML PATH(&#39;&#39;)<br />&nbsp;&nbsp;&nbsp; ), 1, 1, &#39;&#39;<br />) AS CI_IDs<br />FROM<br />(<br />&nbsp;&nbsp;&nbsp; SELECT DISTINCT uci.BulletinID, uci.ArticleID FROM [dbo].[CI_UpdateCIs] uci<br />&nbsp;&nbsp;&nbsp; INNER JOIN CI_ConfigurationItems (NOLOCK) AS ci ON uci.CI_ID = ci.CI_ID AND ci.CIType_ID IN (1, 8) AND ci.IsHidden = 0 AND ci.IsTombstoned = 0<br />) AS uci2</p>]]></content:encoded>
    </item>
    <item>
      <title>Whoa WUAU! What the heck is with the circular references (0x8024000F)?</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/whoa-wuau-what-the-heck-is-with-the-circular-references-0x8024000f</link>
      <pubDate>Sun, 24 Aug 2014 08:55:24 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/2014/08/24/whoa-wuau-what-the-heck-is-with-the-circular-references-0x8024000f/</guid>
      <description><![CDATA[Context  Using SCCM for patch deployment, all of sudden no status updates were getting posted by the...]]></description>
      <content:encoded><![CDATA[<h1>Context </h1> <p>Using SCCM for patch deployment, all of sudden no status updates were getting posted by the clients. </p> <h1>Discovery </h1> <p>Reviewing WUAHandler.log showed the following error: </p> <p><span style="font-size:12pt;"><span style="font-family:courier new;"><font size="2">OnSearchComplete - Failed to end search job. Error = 0x8024000f.&nbsp;&nbsp;&nbsp; WUAHandler&nbsp;&nbsp;&nbsp; 08/23/2014 1:53:10 PM&nbsp;&nbsp;&nbsp; 1104 (0x0450)<br />Scan failed with error = 0x8024000f.&nbsp;&nbsp;&nbsp; WUAHandler&nbsp;&nbsp;&nbsp; 08/23/2014 1:53:10 PM&nbsp;&nbsp;&nbsp; 1104 (0x0450)</font> </span><span style="font-family:times new roman;"></span></span></p> <p>Now the question became why is the search job not ending?&nbsp; Since SCCM uses WUAU to determine which updates are applicable, the next step was to see if there were any errors in the WindowsUpdate.log.&nbsp; Reviewing the WindowsUpdate.log provided the following insight (trimmed for brevity): </p> <p><span style="font-size:12pt;"><span style="font-family:courier new;"><font size="2">2014-08-24&nbsp;&nbsp;&nbsp; 05:42:18:502&nbsp;&nbsp;&nbsp;&nbsp; 584&nbsp;&nbsp;&nbsp; 1a38&nbsp;&nbsp;&nbsp; Agent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * WARNING: Exit code = 0x8024000F<br />2014-08-24&nbsp;&nbsp;&nbsp; 05:42:18:502&nbsp;&nbsp;&nbsp;&nbsp; 584&nbsp;&nbsp;&nbsp; 1a38&nbsp;&nbsp;&nbsp; Agent&nbsp;&nbsp;&nbsp; WARNING: WU client failed Searching for update with error 0x8024000f<br />2014-08-24&nbsp;&nbsp;&nbsp; 05:42:18:502&nbsp;&nbsp;&nbsp;&nbsp; 584&nbsp;&nbsp;&nbsp; 14e8&nbsp;&nbsp;&nbsp; AU&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # WARNING: Search callback failed, result = 0x8024000F<br />2014-08-24&nbsp;&nbsp;&nbsp; 05:42:18:502&nbsp;&nbsp;&nbsp;&nbsp; 584&nbsp;&nbsp;&nbsp; 14e8&nbsp;&nbsp;&nbsp; AU&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #</font> WARNING: Failed to find updates with error code 8024000f </span><span style="font-family:times new roman;"></span></span></p> <p>A quick review of <a href="http://technet.microsoft.com/en-us/library/cc720442(v=ws.10).aspx">Appendix G: Windows Update Agent Result Codes</a> translated this to WU_E_CYCLE_DETECTED, &quot;Circular update relationships were detected in the metadata.&quot; </p> <p>Ahh, now I understand…&nbsp; NOT!&nbsp; Next step, as usual, is a quick internet search to see if someone figured this out for me.&nbsp; Alas, no useful information came up, which is also why this makes it worthwhile to post (and so I&#39;ll be able to remember what I did the next time this happens). </p> <p>Having spent some time in the WSUS database before I know there are a couple of tables building relationships between the various updates and/or update bundles.&nbsp; For those who haven&#39;t spent a lot of time in here, the table that seems to be at the center of everything is [dbo].[tbRevision] which is linked to [dbo].[tbUpdate] via the [LocalUpdateID] column (did not design this, so just sharing what I&#39;ve learned).&nbsp; [RevisionId] from [dbo].[tbRevision] and [UpdateId] from [dbo].[tbUpdate] are used pervasively throughout the database and form the relationship between the abstract concept of the Update and the individual components that constitute said update. </p> <p><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb.png" /><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/3301.image_thumb_1.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/3301.image_5F00_thumb_5F00_1.png" /><span style="font-size:12pt;font-family:times new roman;"> </span></p> <p>What does &quot;abstract concept of the update&quot; mean?&nbsp; For certain updates it there are multiple revisions of the&nbsp; update in the database.&nbsp; (again, don&#39;t ask me why, I didn&#39;t design this, just sharing what I&#39;ve learned)&nbsp; Note:&nbsp; Digging deeper, both use the same files, so I suspect this may have something to do with metadata,&nbsp; supersedence, expiration, etc. </p> <p><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/0118.image_thumb_2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/0118.image_5F00_thumb_5F00_2.png" /> </p> <p>Expanding on these two base tables via the Foreign Keys, and a little bit of intelligent discrimination (eliminating localized descriptions, etc. that I guessed a client wouldn&#39;t care about), I scoped this to the following potential loops: </p> <ul> <li>[tbRevision] –&gt; [tbBundleAtLeastOne] –&gt; [tbBundleAll] –&gt; [tbRevision] – multiple revisions roll up into a parent revision (but don&#39;t necessarily need to).&nbsp; Think ITIL concept of Configuration Item (CI), where a parent CI can contain multiple child CIs.&nbsp; Brief review looks like this accommodates multiple binaries for scenarios where there are different OS languages that need to be patched.  </li><li>[tbRevision] –&gt; [tbPrerequisite] –&gt; [tbInstalledUpdateSufficientForPrerequsite] –&gt; [tbUpdate] –&gt; [tbRevision] – Self-explanatory, are the pre-requisites on the system?&nbsp; I.e. for an update which covers multiple Service Pack, this would make sure the appropriate update is applied depending on which Service Pack revision is deployed.  </li><li>[tbRevision –&gt; [tbRevisionSupersedesUpdate] –&gt; [tbUpdate] –&gt; [tbRevision] –&nbsp; Save some time in by not installing the updates for which a later update covers the (security) fix and addresses the new issue. </li></ul> <p><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_3.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_3.png" /><span style="font-size:12pt;font-family:times new roman;"> </span></p> <p>Note that the above loops can theoretically also be combined, i.e. [tbRevision] –&gt; [tbRevisionSupersedesUpdate] –&gt; [tbUpdate] –&gt; [tbRevsion] (different RevisionID –&gt; [tbBundleAtLeastOne] –&gt; [tbBundleAll] –&gt; [tbRevsion] (pointing back to original RevisionID). </p> <p>This allowed me to start putting together some SQL queries to figure out what might be going on. </p> <p><span style="font-size:9pt;font-family:consolas;"><span style="color:blue;">SELECT</span> <span style="color:gray;">*</span> <br /><span style="color:blue;">FROM</span> [dbo]<span style="color:gray;">.</span>[tbBundleAtLeastOne] balo <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbBundleAll] ba <span style="color:blue;">ON</span> balo<span style="color:gray;">.</span>BundledID <span style="color:gray;">=</span> ba<span style="color:gray;">.</span>BundledID <br /><span style="color:blue;">WHERE</span> balo<span style="color:gray;">.</span>RevisionID <span style="color:gray;">=</span> ba<span style="color:gray;">.</span>RevisionID </span><span style="font-size:12pt;font-family:times new roman;"></span></p> <p>No results… </p> <p><span style="font-size:9pt;font-family:consolas;"><span style="color:blue;">SELECT</span> <span style="color:gray;">*</span> <br /><span style="color:blue;">FROM</span> [dbo]<span style="color:gray;">.</span>[tbPrerequisite] p <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbInstalledUpdateSufficientForPrerequisite] iusfp <span style="color:blue;">ON</span> p<span style="color:gray;">.</span>PrerequisiteID <span style="color:gray;">=</span> iusfp<span style="color:gray;">.</span>PrerequisiteID <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbRevision] r <span style="color:blue;">ON</span> iusfp<span style="color:gray;">.</span>LocalUpdateID <span style="color:gray;">=</span> r<span style="color:gray;">.</span>LocalUpdateID <br /><span style="color:blue;">WHERE</span> p<span style="color:gray;">.</span>RevisionID <span style="color:gray;">=</span> r<span style="color:gray;">.</span>RevisionID </span><span style="font-size:12pt;font-family:times new roman;"></span></p> <p>Still No… </p> <p><span style="font-size:9pt;font-family:consolas;"><span style="color:blue;">SELECT</span> <span style="background-color:yellow;">u<span style="color:gray;">.</span>UpdateID</span> <br /><span style="color:blue;">FROM</span> [dbo]<span style="color:gray;">.</span>[tbRevisionSupersedesUpdate] rsu <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbUpdate] u <span style="color:blue;">ON</span> rsu<span style="color:gray;">.</span>SupersededUpdateID <span style="color:gray;">=</span> u<span style="color:gray;">.</span>UpdateID <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbRevision] r <span style="color:blue;">ON</span> u<span style="color:gray;">.</span>LocalUpdateID <span style="color:gray;">=</span> r<span style="color:gray;">.</span>LocalUpdateID <br /><span style="color:blue;">WHERE</span> rsu<span style="color:gray;">.</span>RevisionID <span style="color:gray;">=</span> r<span style="color:gray;">.</span>RevisionID </span><span style="font-size:12pt;font-family:times new roman;"></span></p> <p><span style="text-decoration:underline;"><strong><em>Bingo!!! </em></strong></span></p> <p>&nbsp;&nbsp;&nbsp; </p> <p>A little more SQL assuages my curiosity of where this came from: </p> <p><span style="font-size:9pt;font-family:consolas;"><span style="color:blue;">SELECT</span> r<span style="color:gray;">.</span>RevisionID<span style="color:gray;">,</span> vu<span style="color:gray;">.</span>UpdateId<span style="color:gray;">,</span> r<span style="color:gray;">.</span>RevisionNumber<span style="color:gray;">,</span> <span style="color:fuchsia;">CAST<span style="color:gray;">(<span style="color:blue;">CASE</span> <span style="color:blue;">WHEN</span> rsu.</span>revisionID <span style="color:gray;">IS</span> <span style="color:gray;">NULL</span> <span style="color:blue;">THEN</span> 0 <span style="color:blue;">ELSE</span> 1 <span style="color:blue;">END</span> <span style="color:blue;">AS</span> <span style="color:blue;">BIT<span style="color:gray;">)</span> AS</span> IsSuperseded</span><br />&nbsp;&nbsp;&nbsp; <span style="color:gray;">,</span> lp<span style="color:gray;">.</span>Title <span style="color:blue;">AS</span> <span style="color:red;">&#39;Company&#39;<span style="color:gray;">,</span> vu<span style="color:gray;">.</span>DefaultTitle<span style="color:gray;">,</span> vu<span style="color:gray;">.</span>DefaultDescription </span><br /><span style="color:gray;">,</span> vu<span style="color:gray;">.</span>ArrivalDate<span style="color:gray;">,</span> vu<span style="color:gray;">.</span>CreationDate<span style="color:gray;">,</span> vu<span style="color:gray;">.</span>IsDeclined<span style="color:gray;">,</span> vu<span style="color:gray;">.</span>PublicationState<span style="color:gray;">,</span> vu<span style="color:gray;">.</span>UpdateType <br /><span style="color:gray;">,</span> vu<span style="color:gray;">.</span>UpdateSource<span style="color:gray;">,</span> vu<span style="color:gray;">.</span>KnowledgebaseArticle<span style="color:gray;">,</span> vu<span style="color:gray;">.</span>SecurityBulletin <br /><span style="color:blue;">FROM</span> [dbo]<span style="color:gray;">.</span>[tbUpdate] u<br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [PUBLIC_VIEWS]<span style="color:gray;">.</span>[vUpdate] vu <span style="color:blue;">ON</span> u<span style="color:gray;">.</span>UpdateId <span style="color:gray;">=</span> vu<span style="color:gray;">.</span>UpdateID <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbRevision] r <span style="color:blue;">ON</span> u<span style="color:gray;">.</span>LocalUpdateID <span style="color:gray;">=</span> r<span style="color:gray;">.</span>LocalUpdateID <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbFlattenedRevisionInCategory] fric <span style="color:blue;">ON</span> r<span style="color:gray;">.</span>RevisionID <span style="color:gray;">=</span> fric<span style="color:gray;">.</span>RevisionID <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbRevision] rCompany <span style="color:blue;">ON</span> fric<span style="color:gray;">.</span>CategoryID <span style="color:gray;">=</span> rCompany<span style="color:gray;">.</span>LocalUpdateID <span style="color:gray;">AND</span> rCompany<span style="color:gray;">.</span>IsLatestRevision <span style="color:gray;">=</span> 1 <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbCategory] c <span style="color:blue;">ON</span> fric<span style="color:gray;">.</span>CategoryID <span style="color:gray;">=</span> c<span style="color:gray;">.</span>CategoryID <span style="color:gray;">AND</span> c<span style="color:gray;">.</span>CategoryType <span style="color:gray;">=</span> <span style="color:red;">&#39;Company&#39;</span> <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbProperty] p <span style="color:blue;">ON</span> rCompany<span style="color:gray;">.</span>RevisionID <span style="color:gray;">=</span> p<span style="color:gray;">.</span>RevisionID <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbLocalizedPropertyForRevision] lpr <span style="color:blue;">ON</span> rCompany<span style="color:gray;">.</span>RevisionID <span style="color:gray;">=</span> lpr<span style="color:gray;">.</span>RevisionID <span style="color:gray;">AND</span> lpr<span style="color:gray;">.</span>LanguageID <span style="color:gray;">=</span> p<span style="color:gray;">.</span>DefaultPropertiesLanguageID <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbLocalizedProperty] lp <span style="color:blue;">ON</span> lpr<span style="color:gray;">.</span>LocalizedPropertyID <span style="color:gray;">=</span> lp<span style="color:gray;">.</span>LocalizedPropertyID <br /><span style="color:gray;">LEFT</span> <span style="color:gray;">JOIN</span> [dbo]<span style="color:gray;">.</span>[tbRevisionSupersedesUpdate] rsu <span style="color:blue;">ON</span> r<span style="color:gray;">.</span>RevisionId <span style="color:gray;">=</span> rsu<span style="color:gray;">.</span>RevisionID<br /><span style="color:blue;">WHERE</span> vu<span style="color:gray;">.</span>UpdateId <span style="color:gray;">IN</span> <br /><span style="color:gray;">(</span> <br /><span style="color:blue;">SELECT</span> u<span style="color:gray;">.</span>UpdateID <br /><span style="color:blue;">FROM</span> [SUSDB]<span style="color:gray;">.</span>[dbo]<span style="color:gray;">.</span>[tbRevisionSupersedesUpdate] rsu <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> dbo<span style="color:gray;">.</span>tbUpdate u <span style="color:blue;">on</span> rsu<span style="color:gray;">.</span>SupersededUpdateID <span style="color:gray;">=</span> u<span style="color:gray;">.</span>UpdateID <br /><span style="color:gray;">INNER</span> <span style="color:gray;">JOIN</span> dbo<span style="color:gray;">.</span>tbRevision r <span style="color:blue;">ON</span> u<span style="color:gray;">.</span>LocalUpdateID <span style="color:gray;">=</span> r<span style="color:gray;">.</span>LocalUpdateID <br /><span style="color:blue;">WHERE</span> rsu<span style="color:gray;">.</span>RevisionID <span style="color:gray;">=</span> r<span style="color:gray;">.</span>RevisionID <br /><span style="color:gray;">)</span> </span></p> <h1>Resolution </h1> <p>Which now explains why this started right after I pushed some updates from SCUP. Note that SCUP was not the problem, it was the vendor who put the circular reference in the updated metadata. </p> <ol> <li> <div>Find the update in SCUP (search on the UpdateID).<br /><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_4.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_4.png" />&nbsp; <br />The two UpdateIDs I found: </div></li> </ol><ul> <li>06366964-77F9-4A48-9BAF-DBF9851BBAFF  </li><li>9F4B59BC-E73C-4E02-A5E5-2B3B40A23D73 </li></ul> <ul><li>Select the &quot;Supersedes&quot; Tab and confirm that it is Superseding itself.<br /><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_5.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_5.png" />  </li><li>Select the update (under the &quot;Superseded Updates&quot; item) and select &quot;Remove Update&quot;.<br /><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_7.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_7.png" />&nbsp; </li><li>Confirm that it is deleted.<br /><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_8.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_8.png" />&nbsp; </li><li>Re-Publish the update.<br />This will “retire” the old revision and replace it with the new revision that is not superseded by itself.&nbsp; Run the “big” query above to see how this happens.<br /><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_9.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_9.png" /></li></ul>]]></content:encoded>
    </item>
    <item>
      <title>One-liner PowerShell to set IP Address, DNS Servers, and Default Gateway</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/one-liner-powershell-to-set-ip-address-dns-servers-and-default-gateway</link>
      <pubDate>Mon, 23 Jun 2014 23:23:00 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/2014/06/23/one-liner-powershell-to-set-ip-address-dns-servers-and-default-gateway/</guid>
      <description><![CDATA[A fun part about configuring servers is that many servers still have static IP addresses.&nbsp; The...]]></description>
      <content:encoded><![CDATA[<p>A fun part about configuring servers is that many servers still have static IP addresses.&nbsp; The challenge is losing connectivity to the server when the configuration change is made.&nbsp; Even with remote console access, this is an irksome task as it requires clicking through so many screens it&rsquo;s just grrr&hellip;&nbsp; (never mind that many of the remote console experiences are somewhat, shall we say, not on par with an RDP session).</p>
<p>Enter the PowerShell one liner:</p>
<p><span style="font-family:Courier New;">&amp;{$adapter = Get-NetAdapter -Name <span style="color:#ff00ff;">Ethernet</span>;New-NetIPAddress -InterfaceAlias $adapter.Name -AddressFamily IPv4 -IPAddress 192.168.1.55 -PrefixLength 24 -DefaultGateway 192.168.1.1; Set-DnsClientServerAddress -InterfaceAlias $adapter.Name -ServerAddresses (&quot;192.168.1.2&quot;,&quot;192.168.1.3&quot;)}</span></p>
<p>Using this, at least gets the server configured and dynamic DNS configured (if using it), so all you have to do is run an ipconfig /flushdns on your client and your remote PowerShell session should reconnect.</p>
<p>Key things to know:</p>
<ul>
<li>Requires PowerShell 3.0 &ndash; there are other examples out there for how to use PowerShell to invoke WMI to manage this for systems not yet on PowerShell 3.0.</li>
<li>&ldquo;;&rdquo; indicates separate commands.&nbsp;&nbsp;This is&nbsp;not piping data from one command to the other here, it is running 3 separate commands using the variable defined in the first.</li>
<li>This isn&#39;t a script so there aren&#39;t any ExecutionPolicy considerations.</li>
<li>Specify the adapter name, in this case &ldquo;Ethernet&rdquo; as appropriate for your system.</li>
<li>Other commands to manage the TCP/IP settings are here:&nbsp; <a href="http://technet.microsoft.com/en-us/library/hh826123.aspx">Net TCP/IP Cmdlets in Windows PowerShell</a></li>
</ul>
<p style="padding:0;margin:0;"></p>]]></content:encoded>
    </item>
    <item>
      <title>Managing Windows Server Role Settings via System Center Configuration Manager</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/managing-windows-server-role-settings-via-system-center-configuration-manager</link>
      <pubDate>Thu, 27 Mar 2014 13:18:27 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/2014/03/27/managing-windows-server-role-settings-via-system-center-configuration-manager/</guid>
      <description><![CDATA[Context Even though I exclusively work on the infrastructure side, I operate under the theory that...]]></description>
      <content:encoded><![CDATA[<h1>Context</h1> <p>Even though I exclusively work on the infrastructure side, I operate under the theory that if I do something more than once, I need to automate it.&nbsp; As can be seen from the blog, I am spending more and more time exploring how to use System Center to minimize the amount of repetitive work I have to do.&nbsp; Or at least do the same task in new ways to relieve the tedium.</p> <p>Spending a lot of time in a lab, one of the challenges I have that scales to real world scenarios is that I constantly have to redeploy servers.&nbsp; Since I have a wide variety of server configurations that I have to redeploy, I am continually looking for ways to reduce the amount of time I spend re-building.&nbsp; For scenarios where I couldn’t find scripts that someone else was nice enough to share, my previous posts include links to some scripts I’ve built to help with these tasks.</p> <p>Realizing that managing the library of scripts, trying to remember what I named the scripts in the past, manually&nbsp; kick of the scripts, wasn’t the most efficient use of my time.&nbsp; Meaning I needed to expand my knowledge of the tools available to for managing infrastructure.</p> <p>My post “<a href="http://blogs.technet.com/b/ken_brumfield/archive/2014/01/06/momcertimport-is-it-all-it-s-cracked-up-to-be.aspx">MOMCertImport – Is it all it’s cracked up to be?</a>”, which included steps for configuring the servers via Application Management wasn’t quite as clean as I desired.&nbsp; Specifically, I had to manage the script in multiple locations which meant updating multiple locations each and every time I updated the script.</p> <h1>Discovery</h1> <p>Goals:</p> <ul> <li>Validation that the system was properly configured prior to beginning any work efforts.</li> <li>Minimize the amount of time invested so that I could perform other tasks while the system was rebuilt.</li> <li>Increase the modularity of the script in order to minimize time and effort of future updates.<br />Note:&nbsp; I’ve seen some massive post build configuration scripts out there that are a nightmare to try and figure out what they do.&nbsp; (my MOMCertImport script definitely falls into this category)</li> <li>Total build time is not a priority!&nbsp; Total build involvement IS!</li></ul> <p>Research:</p> <ul> <li>PowerShell now has some really cool functionality for configuration management.&nbsp; Unfortunately, this doesn’t come with a “platform” to deploy AND report on the configuration to the build servers.</li> </ul><ul> <li>Here is a way to use DSC to automatically configure the system at boot:&nbsp; <a title="http://blogs.msdn.com/b/powershell/archive/2014/02/28/want-to-automatically-configure-your-machines-using-dsc-at-initial-boot-up.aspx" href="http://blogs.msdn.com/b/powershell/archive/2014/02/28/want-to-automatically-configure-your-machines-using-dsc-at-initial-boot-up.aspx">http://blogs.msdn.com/b/powershell/archive/2014/02/28/want-to-automatically-configure-your-machines-using-dsc-at-initial-boot-up.aspx</a><br />Note:&nbsp; SCCM can also be used to deploy the configurations after the agent is installed.</li> <li>I did play around with this a little and it is really easy to work with.</li></ul> <ul><li>SCOM – I could have created a rule/monitor and response combination.&nbsp; When it comes to managing groups of systems to scope rules, it is a little harder than SCCM.&nbsp; Primarily that it is all bundled in MPs and the ability to delegate the group membership management has limited flexibility.</li> <li>SCCM Application Management – been there done that, see above.</li> <li>SCCM Compliance Management – simple, flexible interface that allows granular modularity of both compliance settings AND scope management.</li></ul> <h1>Automation</h1> <blockquote> <p>There are 4 steps to doing this:</p> <ol> <li>Create the script to detect and remediate the missing components.</li> <li>Create the Configuration Item</li> <li>Add the Configuration Item to a Configuration Baseline</li> <li>Deploy the Configuration Baseline</li></ol></blockquote> <h1></h1> <h2>1. The script</h2> <p>The script used is posted over on the TechNet Gallery:&nbsp; <a href="http://gallery.technet.microsoft.com/Configure-Exchange-2013-195a2f65">Configure Exchange 2013 Server Role and Feature Dependencies</a>.</p> <p>As a basic explanation, there are 3 main sections:</p> <ul> <li>The list of Roles/Features required – This is the only portion that needs to be edited.&nbsp; Just edit the list of features required here.<br />Note:&nbsp; If using the PowerShell Desired State Configuration use this reference:&nbsp; <a href="http://technet.microsoft.com/en-us/library/dn282127.aspx">Windows PowerShell Desired State Configuration Role Resource</a></li> <li>A comparison of the required list and how the machine is configured – shouldn’t need to edit</li> <li>Export of missing Roles/Features – shouldn’t need to edit</li></ul> <h2>2.&nbsp; Create the Configuration Item</h2> <ul> <li>Setting type = “Script”</li> <li>Data type = “String”</li></ul> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_7BFE29FC.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_7BFE29FC.png"><img title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_74754B40.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_74754B40.png" width="576" height="680" /></a> </p> <p></p> <h3>Discovery Script</h3> <p>Make sure the remediate parameter is set to “False”</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_33D58F82.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_33D58F82.png"><img title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_50DE3E4A.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_50DE3E4A.png" width="573" height="578" /></a> </p> <h3>Remediation Script</h3> <p>Make sure the remediate parameter is set to “True”</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_293A52D1.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_293A52D1.png"><img title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_74305451.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_74305451.png" width="577" height="582" /></a> </p> <h3>Set the compliance rules</h3> <ul> <li>Set “Rule type” to “value”.&nbsp; Existential rules don’t allow for remediation.</li> <li>Set the operator to “Equals” and the value to (blank).&nbsp; The current script design returns a null value if everything is installed.&nbsp; This is my design, feel free to change it so the script outputs OK, 0, or something like that when the server is compliant.</li> <li>To automatically remediate “Check the box to “Run the specified remediation script when this setting is noncompliant.”&nbsp; If it isn’t apparent, checking this box runs the script configured immediately preceeding this.</li></ul> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_4F352489.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_4F352489.png"><img title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_5ED7C04B.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_5ED7C04B.png" width="570" height="731" /></a> </p> <h2>3. Add it to the Configuration Baseline</h2> <p>Note the revision column.&nbsp; It’s kind of handy for managing the Configuration Items.&nbsp; There can be one “Production” baseline that deploys a SPECIFIC version of the script and a “Development” baseline that deploys the latest/testing version.&nbsp; That way trying to manage multiple, identically purposed Configuration Items can be avoided.<br />Why is this handy?&nbsp; Have you ever gone into your script directory and tried to figure out which version of script.ps1, script.ps1.old, script-quicktest.ps1, etc. was the most recent tested version of what you were working with?&nbsp; Now you have version control AND that means just by fiddling with the Revision the ability to roll back is provided.</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_54A625DE.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_54A625DE.png"><img title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_40236711.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_40236711.png" width="570" height="502" /></a> </p> <h2>4.&nbsp; Deploy the Configuration Baseline</h2> <ul> <li>Observe the setting “Remediate noncompliant rules when supported”.&nbsp; To actually remediate, remediation needs to be enabled under the “Compliance Settings” AND the deployment configuration.&nbsp; Meaning, only one Configuration Item needs to be created and actual remediation can be controlled.</li> <li>Remediation respects maintenance windows.<br />Note:&nbsp; Since all my servers “in production” should already be configured properly, I want this configuration baseline to remediate the servers as soon as possible after (re)installation.</li> <li>Schedule – there is a global client setting that controls how often Compliance Management is run, that can be overridden on a per deployment basis.</li></ul> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_01BDA35E.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_01BDA35E.png"><img title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_78646EDA.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_78646EDA.png" width="572" height="703" /></a> </p> <h2>Other flexibility:</h2> <p>In a broader sense, if there is a scenario where the detection/remediation has to occur after an application is installed, there is an option to define that the application must be installed BEFORE the Configuration Item will start complaining.</p> <p>In terms of Exchange, think of scenarios where you might want to have a member of the DAG rejoin the DAG after a reinstall.</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_6A28869B.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_6A28869B.png"><img title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image_thumb_731818DA.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image_5F00_thumb_5F00_731818DA.png" width="577" height="739" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>WSUS Installation Script</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/wsus-installation-script</link>
      <pubDate>Sun, 19 Jan 2014 15:35:44 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/2014/01/19/wsus-installation-script/</guid>
      <description><![CDATA[For a number of reasons I have to stand up WSUS servers relatively frequently, including that I keep...]]></description>
      <content:encoded><![CDATA[<p>For a number of reasons I have to stand up WSUS servers relatively frequently, including that I keep breaking my Web Server.&nbsp; Since I couldn’t find anything handy that did a good job of automating the install and configuration of WSUS, I created a script and posted it over on the Script Gallery for anyone who wants something to work off of.</p> <p><a href="http://gallery.technet.microsoft.com/WSUS-Install-and-90babe89">WSUS Install and Configuration Script</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Simple way to temporarily bypass PowerShell execution policy</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/simple-way-to-temporarily-bypass-powershell-execution-policy</link>
      <pubDate>Sun, 19 Jan 2014 15:04:41 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/2014/01/19/simple-way-to-temporarily-bypass-powershell-execution-policy/</guid>
      <description><![CDATA[One of the PowerShell challenges challenges I am constantly confronted with is dealing with running...]]></description>
      <content:encoded><![CDATA[<p>One of the PowerShell challenges challenges I am constantly confronted with is dealing with running scripts on systems is blocked due to the security policy.&nbsp; This is particularly cumbersome while writing or debugging new scripts.&nbsp; Normally it is prudent to avoid lowering the overall security of the system by using the Set-ExecutionPolicy cmdlet and I often forget to return the system to the default state when done.&nbsp; There is a simple way to solve this problem.</p>
<p>From the run dialog (or command prompt) just execute &ldquo;powershell &ndash;ExecutionPolicy Bypass&rdquo; and it will start a PowerShell session that allows for running scripts and keeps the lowered permissions isolated to just the current running process.</p>]]></content:encoded>
    </item>
    <item>
      <title>MOMCertImport – Is it all it’s cracked up to be?</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/momcertimport-is-it-all-its-cracked-up-to-be</link>
      <pubDate>Mon, 06 Jan 2014 23:04:00 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/2014/01/06/momcertimport-is-it-all-its-cracked-up-to-be/</guid>
      <description><![CDATA[Context
Core Reference:&nbsp; Authentication and Data Encryption for Windows Computers in...]]></description>
      <content:encoded><![CDATA[<h1>Context</h1>
<p>Core Reference:&nbsp; <a href="http://technet.microsoft.com/en-us/library/bb735408.aspx">Authentication and Data Encryption for Windows Computers in Operations Manager 2007</a><br />Link to the script:&nbsp; <a title="http://gallery.technet.microsoft.com/MOMCertImport-c3e7093b" href="http://gallery.technet.microsoft.com/MOMCertImport-c3e7093b">http://gallery.technet.microsoft.com/MOMCertImport-c3e7093b</a></p>
<p>Note:&nbsp; While the below does work, it isn&rsquo;t the Windows Server and System Center Product Groups official solution so if you can&rsquo;t get it to work or have problems, please use the steps in the above reference.&nbsp; That said, at the end of the day all MOMCertImport seems to do is import one <span style="text-decoration:underline;">used</span> registry value.</p>
<p>Even though I tend to focus on platforms/OS related stuff, I&rsquo;ve long since come to the realization that I can&rsquo;t exclude tools such as System Center suite to help maintain and run a datacenter with high availability.&nbsp; As such, I am constantly looking for how to leverage System Center to accomplish my platforms needs.&nbsp; With things tending to be a little less hectic around the holidays I was able to spend some time solving some of those problems.</p>
<p>Not surprisingly the lab machines are frequently rebuilt.&nbsp; In addition, having become utterly dependent on System Center for making sure the lab is relatively stable on a day to day basis and configured according to best practices.&nbsp; This includes the use of both System Center Configuration Manager and System Center Operations Manager to deploy patches, deploy the monitoring agents, some other basic utilities, as well as basic monitoring.&nbsp; The challenge in this lab are that there are 2 forests that do not have a trust.&nbsp; While deploying the System Center Configuration Manager Client across the two un-trusted forests is a relatively easy exercise, getting the SCOM agents deployed to systems in the &ldquo;remote&rdquo; forest <span style="text-decoration:underline;">and talking</span> to the Management Server has been a very painful exercise.</p>
<p>As many are aware, MOMCertImport is the officially provided tool to do this and there is plenty of content out there on how to use it.&nbsp; The beef was that this process seems to have some rough edges and was very cumbersome every time a lab machine was flattened and redeployed.&nbsp; The following are the sources of frustration every time there was rebuild:</p>
<ol>
<li>Both of the forests have Certificate Authorities and use auto-enrollment for all systems in the forest.&nbsp; Why can&rsquo;t it just use the certificate that the machine automatically picked up on domain join?</li>
<li>Why is in necessary to create a <span style="text-decoration:underline;">custom</span> template that had the exact same OIDs as the &ldquo;Computer Template&rdquo; that auto-enrollment used?</li>
<li>Why is it necessary to create a certificate with the Private Key marked as exportable and ship it around to get it installed?&nbsp; Not only a hassle, but also has potential security and manageability implications.</li>
<li>Why is certificate enrollment such a cumbersome process?</li>
<li>Why is it necessary to have to have two certificates on each machine thus confusing every other application (and me when troubleshooting) on the systems that didn&rsquo;t know how to handle two certificates with identical OIDs, subjects, etc?</li>
<li>In all fairness, a couple of the above challenges can be bypassed using the &ldquo;/SubjectName&rdquo; switch, however on a machine with multiple certificates with the same subject name MOMCertImport doesn&rsquo;t always select the certificate that supports all the requirements for the SCOM agent.<br />Note:&nbsp; This wasn&rsquo;t tested rigorously, but it seems to select the certificate with the SubjectName that was imported into the local machine store first.</li>
</ol>
<h1>Discovery</h1>
<p>With those questions in mind it was time to start digging to understand what was going on when MOMCertImport is run.&nbsp; This is what I found:</p>
<p>First, in just trying to dig up the instructions (for the umpteenth time) as well as troubleshooting the automation for importing the code below, the following were useful references as I proceeded:</p>
<ul>
<li><a href="https://blogs.technet.com/b/momteam/archive/2013/09/17/troubleshooting-opsmgr-2007-and-opsmgr-2012-certificate-issues-with-powershell.aspx">Troubleshooting OpsMgr 2007 and OpsMgr 2012 certificate issues with PowerShell</a></li>
<li><a title="http://thoughtsonopsmgr.blogspot.com/2009/09/momcertimportexe-tool-error-application.html" href="http://thoughtsonopsmgr.blogspot.com/2009/09/momcertimportexe-tool-error-application.html">http://thoughtsonopsmgr.blogspot.com/2009/09/momcertimportexe-tool-error-application.html</a></li>
</ul>
<p>Being cautious with information, I looked to validate what I found.&nbsp; I started investigating where I always do when it comes to trying to figure out what is happening on a system, good ol&rsquo; <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx">Process Monitor</a>.&nbsp; After setting the filter on Process Monitor as follows, here is what MOMCertImport.exe did:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image3.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image3.png"><img width="589" height="370" title="image" style="display:inline;border-width:0px;" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image3_thumb.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image3_5F00_thumb.png" border="0" /></a></p>
<p>The results were as follows:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image6.png"><img width="585" height="135" title="image" style="display:inline;border-width:0px;" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/image6_thumb.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/image6_5F00_thumb.png" border="0" /></a></p>
<p>Note:&nbsp; I looked to see if any files were changed (filter on Operation &ldquo;CreateFile&rdquo; and &ldquo;WriteFile&rdquo;) and there were not any changes outside of MOMCertImport re-importing the certificate into to the store.</p>
<p>With remained was that MomCertImport created/changed two registry values:</p>
<ul>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Machine Settings
<ul>
<li>ChannelCertificateHash (REG_SZ)</li>
<li>ChannelCertificateSerialNumber (REG_BINARY)</li>
</ul>
</li>
</ul>
<p>The above blog entries focused on the ChannelCertificateSerialNumber registry value.&nbsp; However, since there was a minor divergence between what was found in those reference and what Process Monitor uncovered, and I don&rsquo;t know why MOMCertImport sets 2 keys but will work with only one, I decided to just copy the behavior of MOMCertImport.</p>
<h1>Analysis</h1>
<p>Looking more closely at the registry values unveiled the following:</p>
<ul>
<li>ChannelCertificateHash &ndash; This is the &ldquo;Thumbprint&rdquo; of the certificate.</li>
<li>ChannelCertificateSerialNumber &ndash; This is the &ldquo;Serial Number&rdquo; of the certificate.&nbsp; As the references above illuminated, this is a REG_BINARY value and has the byte values stored in the reverse order they are stored in the certificate.</li>
</ul>
<p>This also solved all the problems I outlined above:</p>
<ol>
<li>The certificates the computer gained through auto-enrollment can be used for the SCOM Agent.</li>
<li>No custom template needs to be created.</li>
<li>There is no need to have the Private Key be exportable or manually copy it around the environment.</li>
<li>This can be simplified by using pre-existing certificate enrollment automation.&nbsp; Reference &ldquo;<a href="http://technet.microsoft.com/en-us/library/cc731522.aspx">Configure Certificate Autoenrollment</a>&rdquo; to enable</li>
<li>This can all be done with one certificate.</li>
<li>The Serial Number is what stored in the registry allowing for very precise selection of the certificate.</li>
</ol>
<p>Furthermore, I found that MOMCertImport does <span style="text-decoration:underline;">no</span> validation to determine if the certificate being imported meets the requirements of the SCOM agent.&nbsp; In the automation below, it heavily leverages the content in the <a href="https://blogs.technet.com/b/momteam/archive/2013/09/17/troubleshooting-opsmgr-2007-and-opsmgr-2012-certificate-issues-with-powershell.aspx">Troubleshooting OpsMgr 2007 and OpsMgr 2012 certificate issues with PowerShell</a> article to institute validation <span style="text-decoration:underline;">before</span> attempting to import the certificate.</p>
<p>Note:&nbsp; There are a plethora of copies of articles out there how to do create/validate the certificates.&nbsp; A large variance in the values for KeyUsage were found.&nbsp; While I was able to get this to work with a KeyUsage value of 0xA0, as per the reference PowerShell troubleshooting script, the PG&rsquo;s content on TechNet states 0xF0:&nbsp; <a href="http://technet.microsoft.com/en-us/library/dd362553.aspx">How to Obtain a Certificate Using Windows Server 2008 Enterprise CA in Operations Manager 2007</a>.&nbsp; I don&rsquo;t know if this is a supported scenario, thus if using the PG reference, the &ldquo;Computer&rdquo; certificate template will need to be updated.&nbsp; Also, I could use a smaller &ldquo;KeyLength&rdquo; than specified in the PG article, thus it seems the agent doesn&rsquo;t care about the KeyLength.</p>
<h1>Automation</h1>
<p>There were several things that were necessary to automate:</p>
<ul>
<li>Validating existing configurations via SCCM.&nbsp; Is there a certificate configured, installed, and valid for the SCOM Agent.&nbsp; This <span style="text-decoration:underline;">IS</span> SCCM&rsquo;s detection method for the Application to configure the certificate.</li>
<li>Select a valid certificate from the local store and configure the SCOM Agent to use it.</li>
<li>Validating one or more certificates.</li>
</ul>
<p>The first step towards doing this was to ensure that the above 3 tasks could be repeated on a per machine basis consistently.&nbsp; To that end a PowerShell script seemed to be the best approach.&nbsp; As can be seen from the comments on some of the previous blog posts, this blog platform doesn&rsquo;t handle code and code formatting very well, plus the script is over 750 lines.&nbsp; As such, the resulting script is uploaded on Technet&rsquo;s ScriptCenter.&nbsp; Go here to download it:&nbsp; <a href="http://gallery.technet.microsoft.com/MOMCertImport-c3e7093b">MOMCertImport</a>.</p>
<p>The second step in the automation is to consistently get all the appropriate lab machines to run the scripted tasks.&nbsp; Enter SCCM.</p>
<h2>Creating the Application Deployment Type</h2>
<h3>Configuring Programs Properties</h3>
<ul>
<li>Installation Program - powershell -ExecutionPolicy Unrestricted -File .\MOMCertImport.ps1 &ndash;InstallBestFitFromLocalStore</li>
<li>Uninstall Program - powershell -ExecutionPolicy Unrestricted -File .\MOMCertImport.ps1 &ndash;Remove</li>
</ul>
<blockquote>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/Programs_2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/Programs_5F00_2.png"><img width="522" height="449" title="Programs" style="display:inline;border-width:0px;" alt="Programs" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/Programs_thumb.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/Programs_5F00_thumb.png" border="0" /></a></p>
</blockquote>
<h3>Configuring Detection Method</h3>
<ul>
<li>Set the Script Type to PowerShell</li>
<li>Paste in the text of script above</li>
</ul>
<blockquote>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/Detection%20Method_2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/Detection-Method_5F00_2.png"><img width="522" height="449" title="Detection Method" style="display:inline;border-width:0px;" alt="Detection Method" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/Detection%20Method_thumb.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/Detection-Method_5F00_thumb.png" border="0" /></a></p>
</blockquote>
<h3>Configuring Dependencies</h3>
<ul>
<li>Obviously, configuring the certificate for the SCOM agent does no good if the agent isn&rsquo;t installed.&nbsp; Configure the deployment of the SCOM agent as a dependency of this Deployment Type.</li>
</ul>
<blockquote>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/Dependencies_2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/Dependencies_5F00_2.png"><img width="527" height="453" title="Dependencies" style="display:inline;border-width:0px;" alt="Dependencies" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/Dependencies_thumb.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/Dependencies_5F00_thumb.png" border="0" /></a></p>
</blockquote>
<p>That&rsquo;s it!&nbsp; Now just deploy the Application.</p>
<p>Note:&nbsp; Initially I tried signing the script.&nbsp; However it appears that when importing the script into the Detection Method SCCM does some reformatting.&nbsp; As can be seen from the screenshot the script length is 658 lines whereas the script uploaded to TechNet ScriptCenter is 757 lines.&nbsp; This reformatting breaks the signature.</p>
<ul>
<li>The line counts are for the initial posting, I&rsquo;m sure there will be input on the script and the line counts will change over time.</li>
<li>This has been filed as a bug on Microsoft Connect.&nbsp; Reference:&nbsp; <a href="https://connect.microsoft.com/ConfigurationManagervnext/feedback/details/790019/css-configmgr-2012-sp1-app-evaluation-fails-when-using-a-signed-powershell-script-as-detection-method-when-ps-execution-policy-is-set-to-allsigned">CSS: ConfigMgr 2012 SP1 | App Evaluation fails when using a Signed Powershell Script as Detection Method when PS Execution Policy is set to AllSigned</a></li>
<li>Workaround is to set the policy for the client settings to Bypass for the PowerShell execution policy.</li>
</ul>
<blockquote>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/client%20policy_2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/client-policy_5F00_2.png"><img width="537" height="415" title="client policy" style="display:inline;border-width:0px;" alt="client policy" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/client%20policy_thumb.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/client-policy_5F00_thumb.png" border="0" /></a>&nbsp;</p>
</blockquote>
<p>Updates:</p>
<ul>
<li>1/18/2014 &ndash; Fixed a bug in the Enhanced Key Usage Extension check.&nbsp; It was passing everything if $EnableDiagnostics switch was used.</li>
<li>1/18/2014 &ndash; Added the ability to request a certificate from Microsoft Enterprise and Standalone CAs (untested against non-Microsoft CAs, but give it a try and let me know how it goes).</li>
<li>1/18/2014 - Now the file is so large it won&rsquo;t cut and paste into the SCCM script validation.&nbsp; However, if the &ldquo;Open&rdquo; option is selected and the script is loaded from a file it works fine.&nbsp; This can also be solved by deleting the help content, the constants at the start, and everything in the #region Certificate/Request Install, as well as the labels in the &ldquo;Main&rdquo; switch statement for CreateCertificateRequest and GetCertificateResponse.&nbsp; Yes, there is now some broken code in Main that references the certificate request functios, but it works.</li>
<li>1/18/2014 &ndash; This script WILL work against the SCOM server, but since the SCOM agent shouldn&rsquo;t/can&rsquo;t be installed on the SCOM server, the dependencies will prevent the script from running and will set the deployment state to &ldquo;Not Applicable&rdquo;.</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting SCCM Software Update Deployment Package distribution due to missing directories</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/troubleshooting-sccm-software-update-deployment-package-distribution-due-to-missing-directories</link>
      <pubDate>Thu, 10 Jan 2013 04:24:00 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/2013/01/10/troubleshooting-sccm-software-update-deployment-package-distribution-due-to-missing-directories/</guid>
      <description><![CDATA[I have SCCM running in my lab and ran into an issue on several occasions where the Deployment...]]></description>
      <content:encoded><![CDATA[<p><span style="color:black; font-family:Arial; font-size:9pt">I have SCCM running in my lab and ran into an issue on several occasions where the Deployment Package I created for the Software Updates started to error out on when updating the Distribution Points.  In reviewing the package distribution manager log I would see the following message: </span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p><span style="color:black; font-family:Arial; font-size:9pt">Severity Type Site code Date / Time System Component Message ID Description<br/>Error Milestone 002 01/09/2013 7:40:04 PM CM01.contoso.com SMS_DISTRIBUTION_MANAGER 2306 The source directory "\\contoso.com\SoftwareUpdates\<span style="background-color:yellow">c34e2458-681f-4a8b-8941-a460c2de314a</span>" for package "<span style="background-color:aqua">0020000D</span>" does not exist. The operating system reported error 2: The system cannot find the file specified.     Solution: Make sure you have specified a valid package source directory on the Data Source tab in the Package Properties dialog box in the Configuration Manager Console. If you specify a local path, it must be a local path on the site server. If you specify a path on a network drive, verify that the path exists and that the path is typed correctly. </span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p><span style="color:black; font-family:Arial; font-size:9pt">I read the above message and said to myself, "Now, where'd it go?  Wait a sec... What is "it"?" </span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p><span style="color:black; font-family:Arial; font-size:9pt">The challenge is that SCCM was tracking that the update had been download, but for some reason it wasn't in the location it was supposed to be.  When going into the console, setting the search criteria for "All Software Updates" to "Required &gt;= 1" and "Installed &gt;= 1" showed everything was downloaded according to SCCM.  Thus it took a little bit more digging for me to get this sorted out.  Since answers were sparse in regards to how to troubleshooting this outside of "review the logs", I figured I would share my solution. </span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p><span style="color:black; font-family:Arial; font-size:9pt">While I still don't know WHY SCCM thought the update had been downloaded and yet the files were missing from the package source, I could at least figure out how to find the updates in the console to re-download them. </span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p><span style="color:black; font-family:Arial; font-size:9pt">In the SQL query below just paste the highlighted (match the colors) from the above error message into the highlighted spots below. </span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">DECLARE</span>
			<span style="color:teal">@MissingSourceDirectory</span>
			<span style="color:blue">NVARCHAR<span style="color:gray">(<span style="color:blue">512<span style="color:gray">)<br/><span style="color:blue">DECLARE<span style="color:gray">
									<span style="color:teal">@PackageId<span style="color:gray">
											<span style="color:blue">NVARCHAR<span style="color:gray">(<span style="color:blue">8<span style="color:gray">)<br/><span style="color:blue">SET<span style="color:gray">
																	<span style="color:teal">@MissingSourceDirectory<span style="color:gray"> =<span style="color:blue">
																				<span style="color:red">'<span style="background-color:yellow">c34e2458-681f-4a8b-8941-a460c2de314a</span>'<br/><span style="color:blue">SET<span style="color:red">
																							<span style="color:teal">@PackageId<span style="color:red">
																									<span style="color:gray">=<span style="color:red"> '<span style="background-color:aqua">0020000D</span>'</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">SELECT</span>
			<span style="color:blue">CASE<br/></span>        <span style="color:blue">WHEN</span>
			<span style="color:teal">ci<span style="color:gray">.<span style="color:teal">BulletinID<span style="color:gray"> LIKE<span style="color:teal">
								<span style="color:red">''<span style="color:teal">
										<span style="color:gray">OR<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">BulletinID<span style="color:gray"> IS<span style="color:teal">
																<span style="color:gray">NULL<span style="color:teal">
																		<span style="color:blue">THEN<span style="color:teal">
																				<span style="color:red">'Non Security Update'<br/><span style="color:teal">        <span style="color:blue">ELSE<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">BulletinID<br/><span style="color:gray">        <span style="color:blue">END<span style="color:gray">
																													<span style="color:blue">As<span style="color:gray">
																															<span style="color:teal">BulletinID<br/><span style="color:gray">    ,<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">ArticleID<br/><span style="color:gray">    ,<span style="color:teal"> loc<span style="color:gray">.<span style="color:teal">DisplayName<br/><span style="color:gray">    ,<span style="color:teal"> loc<span style="color:gray">.<span style="color:blue">Description<br/><span style="color:gray">    ,<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">IsExpired<br/><span style="color:gray">    ,<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">DatePosted<br/><span style="color:gray">    ,<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">DateRevised<br/><span style="color:gray">    ,<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">Severity<br/><span style="color:gray">    ,<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">RevisionNumber<br/><span style="color:gray">    ,<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">CI_ID<br/><span style="color:blue">FROM<span style="color:teal"> dbo<span style="color:gray">.<span style="color:teal">v_UpdateCIs<span style="color:gray">
																																																																									<span style="color:blue">AS<span style="color:gray">
																																																																											<span style="color:teal">ci<br/><span style="color:gray">LEFT<span style="color:teal">
																																																																														<span style="color:gray">OUTER<span style="color:teal">
																																																																																<span style="color:gray">JOIN<span style="color:teal"> dbo<span style="color:gray">.<span style="color:teal">v_LocalizedCIProperties_SiteLoc<span style="color:gray">
																																																																																					<span style="color:blue">AS<span style="color:gray">
																																																																																							<span style="color:teal">loc<span style="color:gray">
																																																																																									<span style="color:blue">ON<span style="color:gray">
																																																																																											<span style="color:teal">loc<span style="color:gray">.<span style="color:teal">CI_ID<span style="color:gray"> =<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">CI_ID<br/><span style="color:blue">WHERE<span style="color:teal"> ci<span style="color:gray">.<span style="color:teal">CI_ID<span style="color:gray"> IN<br/>(<br/><span style="color:teal">    <span style="color:blue">SELECT<span style="color:teal"> [FromCI_ID]<br/><span style="color:gray">    <span style="color:blue">FROM<span style="color:gray">
																																																																																																													<span style="color:teal">[dbo]<span style="color:gray">.<span style="color:teal">[CI_ConfigurationItemRelations]<span style="color:gray">
																																																																																																																	<span style="color:teal">cir<br/><span style="color:gray">    INNER<span style="color:teal">
																																																																																																																				<span style="color:gray">JOIN<span style="color:teal"> [dbo]<span style="color:gray">.<span style="color:teal">[CI_RelationTypes]<span style="color:gray">
																																																																																																																									<span style="color:teal">rt<span style="color:gray">
																																																																																																																											<span style="color:blue">ON<span style="color:gray">
																																																																																																																													<span style="color:teal">cir<span style="color:gray">.<span style="color:teal">RelationType<span style="color:gray"> =<span style="color:teal"> rt<span style="color:gray">.<span style="color:teal">RelationType<br/><span style="color:gray">    <span style="color:blue">WHERE<span style="color:gray">
																																																																																																																																							<span style="color:teal">cir<span style="color:gray">.<span style="color:teal">ToCI_ID<span style="color:gray"> IN<br/><span style="color:blue">    <span style="color:gray">(<br/><span style="color:blue">        SELECT<span style="color:gray">
																																																																																																																																															<span style="color:teal">CI_ID<br/><span style="color:gray">        <span style="color:blue">FROM<span style="color:gray">
																																																																																																																																																			<span style="color:teal">[dbo]<span style="color:gray">.<span style="color:teal">[CI_ContentPackages]<span style="color:gray">
																																																																																																																																																							<span style="color:teal">cp<br/><span style="color:gray">        INNER<span style="color:teal">
																																																																																																																																																										<span style="color:gray">JOIN<span style="color:teal"> [dbo]<span style="color:gray">.<span style="color:teal">[CI_ConfigurationItemContents]<span style="color:gray">
																																																																																																																																																															<span style="color:teal">cic<span style="color:gray">
																																																																																																																																																																	<span style="color:blue">ON<span style="color:gray">
																																																																																																																																																																			<span style="color:teal">cp<span style="color:gray">.<span style="color:teal">Content_ID<span style="color:gray"> =<span style="color:teal"> cic<span style="color:gray">.<span style="color:teal">Content_ID<br/><span style="color:gray">        <span style="color:blue">WHERE<span style="color:gray">
																																																																																																																																																																													<span style="color:teal">cp<span style="color:gray">.<span style="color:teal">ContentSubFolder<span style="color:gray"> =<span style="color:teal"> @MissingSourceDirectory<span style="color:gray"> AND<span style="color:teal"> cp<span style="color:gray">.<span style="color:teal">PkgID<span style="color:gray"> =<span style="color:teal"> @PackageId<br/><span style="color:gray">    )<br/>)</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span style="font-family:Times New Roman; font-size:12pt">
		</span></p><p><span style="font-family:Arial; font-size:9pt">Qualification (Added 1/13/2013):  It is important to be aware that the table CI_ConfigurationItemRelations can have multiple levels of relationships and there are different types of relationships.  The above query worked well enough for me, so I didn't investigate further.  I would suggest this reference for more details the CI_ConfigurationItemRelations table:  Steve Rachui - <a href="http://blogs.msdn.com/b/steverac/archive/2012/07/08/configmgr-2012-application-model-internals-part-i.aspx">ConfigMgr 2012–Application Model–Internals–Part I</a>
		</span></p><p><span style="font-family:Arial; font-size:9pt">Note: As a tip, I had several items missing from my source. I noticed in this case they were all from this month (January 2013), so after the third item month, I just went and changed the query in the console to show all "Downloaded" updates with "Date Released Or Revised" within the last month and downloaded them all as a batch.
</span></p><p><span style="font-family:Arial; font-size:9pt">Update 1/13/2013:
</span></p><p><span style="font-family:Arial; font-size:9pt">I realized I had a completely unnecessary piece of information in the original query.  I had reused another query I had for which I needed the original date the update was released, not the date the most current revision was released.  Below is the old query in case someone still wants to know the date the update was originally released.
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">DECLARE</span>
			<span style="color:teal">@MissingSourceDirectory</span>
			<span style="color:blue">NVARCHAR<span style="color:gray">(</span>512<span style="color:gray">)<br/><span style="color:blue">DECLARE</span>
					<span style="color:teal">@PackageId</span>
					<span style="color:blue">NVARCHAR<span style="color:gray">(</span>8<span style="color:gray">)<br/><span style="color:blue">SET</span>
							<span style="color:teal">@MissingSourceDirectory</span> =</span>
						<span style="color:red">'c34e2458-681f-4a8b-8941-a460c2de314a'<br/><span style="color:blue">SET</span>
							<span style="color:teal">@PackageId</span>
							<span style="color:gray">=</span> '0020000D'<br/></span>
					</span></span></span></span></p><p style="margin-left: 36pt"><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">SELECT</span>
			<span style="color:blue">CASE<br/></span>        <span style="color:blue">WHEN</span>
			<span style="color:teal">ci<span style="color:gray">.<span style="color:teal">BulletinID</span> LIKE</span>
				<span style="color:red">''</span>
				<span style="color:gray">OR</span> ci<span style="color:gray">.<span style="color:teal">BulletinID</span> IS</span>
				<span style="color:gray">NULL</span>
				<span style="color:blue">THEN</span>
				<span style="color:red">'Non Security Update'<br/></span>        <span style="color:blue">ELSE</span> ci<span style="color:gray">.<span style="color:teal">BulletinID<br/></span>        <span style="color:blue">END</span>
					<span style="color:blue">As</span>
					<span style="color:teal">BulletinID<br/></span>    ,</span> ci<span style="color:gray">.<span style="color:teal">ArticleID<br/></span>    ,</span> loc<span style="color:gray">.<span style="color:teal">DisplayName<br/></span>    ,</span> loc<span style="color:gray">.<span style="color:blue">Description<br/></span>    ,</span> ci<span style="color:gray">.<span style="color:teal">IsExpired<br/></span>    <span style="background-color:silver">,</span></span><span style="background-color:silver"> orig_postdate<span style="color:gray">.<span style="color:teal">DatePosted</span>
						<span style="color:blue">as</span>
						<span style="color:teal">origDatePosted</span></span></span><br/></span>    <span style="color:gray">,</span>
			<span style="color:teal">ci<span style="color:gray">.<span style="color:teal">DatePosted<br/></span>    ,</span> ci<span style="color:gray">.<span style="color:teal">DateRevised<br/></span>    ,</span> ci<span style="color:gray">.<span style="color:teal">Severity<br/></span>    ,</span> ci<span style="color:gray">.<span style="color:teal">RevisionNumber<br/></span>    ,</span> ci<span style="color:gray">.<span style="color:teal">CI_ID<br/><span style="color:blue">FROM</span> dbo<span style="color:gray">.<span style="color:teal">v_UpdateCIs</span>
							<span style="color:blue">AS</span>
							<span style="color:teal">ci<br/><span style="color:gray">LEFT</span>
								<span style="color:gray">OUTER</span>
								<span style="color:gray">JOIN</span> dbo<span style="color:gray">.<span style="color:teal">v_LocalizedCIProperties_SiteLoc</span>
									<span style="color:blue">AS</span>
									<span style="color:teal">loc</span>
									<span style="color:blue">ON</span>
									<span style="color:teal">loc<span style="color:gray">.<span style="color:teal">CI_ID</span> =</span> ci<span style="color:gray">.<span style="color:teal">CI_ID<br/><span style="color:gray; background-color:silver">LEFT</span><span style="background-color:silver">
													<span style="color:gray">OUTER</span>
													<span style="color:gray">JOIN<br/>(<br/></span>    <span style="color:blue">SELECT</span> BulletinId<span style="color:gray">,</span>
													<span style="color:fuchsia">MIN<span style="color:gray">(<span style="color:teal">articles<span style="color:gray">.<span style="color:teal">DatePosted<span style="color:gray">)</span>
																		<span style="color:blue">As</span> DatePosted</span>
																	<span style="color:blue">FROM<br/>    <span style="color:gray">(<br/></span>        SELECT</span>
																	<span style="color:teal">ArticleId<span style="color:gray">,</span>
																		<span style="color:fuchsia">MIN<span style="color:gray">(<span style="color:teal">DatePosted<span style="color:gray">)</span>
																					<span style="color:blue">As</span> DatePosted<br/></span>        <span style="color:blue">FROM</span> .<span style="color:teal">[dbo]<span style="color:gray">.<span style="color:teal">[v_UpdateCIs]<br/></span>        <span style="color:blue">GROUP</span>
																						<span style="color:blue">BY</span>
																						<span style="color:teal">ArticleId<br/></span>    )</span>
																					<span style="color:blue">as</span> articles<br/></span>    INNER</span>
																			<span style="color:gray">JOIN</span>
																			<span style="color:teal">[dbo]<span style="color:gray">.<span style="color:teal">[v_UpdateCIs]</span>
																					<span style="color:teal">ci</span>
																					<span style="color:blue">ON</span>
																					<span style="color:teal">articles<span style="color:gray">.<span style="color:teal">ArticleID</span> =</span> ci<span style="color:gray">.<span style="color:teal">ArticleId<br/></span>    <span style="color:blue">GROUP</span>
																							<span style="color:blue">BY</span>
																							<span style="color:teal">BulletinId<br/><span style="color:gray">)</span>
																								<span style="color:blue">As</span> orig_postdate</span>
																							<span style="color:blue">ON</span>
																							<span style="color:teal">ci<span style="color:gray">.<span style="color:teal">BulletinId</span> =</span> orig_postDate<span style="color:gray">.<span style="color:teal">BulletinId</span></span></span></span></span></span></span></span></span></span></span></span></span></span><br/><span style="color:blue">WHERE</span> ci<span style="color:gray">.<span style="color:teal">CI_ID</span> IN<br/>(<br/></span>    <span style="color:blue">SELECT</span> [FromCI_ID]<br/></span>    <span style="color:blue">FROM</span>
											<span style="color:teal">[dbo]<span style="color:gray">.<span style="color:teal">[CI_ConfigurationItemRelations]</span>
													<span style="color:teal">cir<br/></span>    INNER</span>
												<span style="color:gray">JOIN</span> [dbo]<span style="color:gray">.<span style="color:teal">[CI_RelationTypes]</span>
													<span style="color:teal">rt</span>
													<span style="color:blue">ON</span>
													<span style="color:teal">cir<span style="color:gray">.<span style="color:teal">RelationType</span> =</span> rt<span style="color:gray">.<span style="color:teal">RelationType<br/></span>    <span style="color:blue">WHERE</span>
															<span style="color:teal">cir<span style="color:gray">.<span style="color:teal">ToCI_ID</span> IN<br/><span style="color:blue">    <span style="color:gray">(<br/></span>        SELECT</span>
																	<span style="color:teal">CI_ID<br/></span>        <span style="color:blue">FROM</span>
																	<span style="color:teal">[dbo]<span style="color:gray">.<span style="color:teal">[CI_ContentPackages]</span>
																			<span style="color:teal">cp<br/></span>        INNER</span>
																		<span style="color:gray">JOIN</span> [dbo]<span style="color:gray">.<span style="color:teal">[CI_ConfigurationItemContents]</span>
																			<span style="color:teal">cic</span>
																			<span style="color:blue">ON</span>
																			<span style="color:teal">cp<span style="color:gray">.<span style="color:teal">Content_ID</span> =</span> cic<span style="color:gray">.<span style="color:teal">Content_ID<br/></span>        <span style="color:blue">WHERE</span>
																					<span style="color:teal">cp<span style="color:gray">.<span style="color:teal">ContentSubFolder</span> =</span> @MissingSourceDirectory</span> AND</span> cp<span style="color:gray">.<span style="color:teal">PkgID</span> =</span> @PackageId<br/></span>    )<br/>)
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>My Latencies Are Too High!</title>
      <link>https://docs.microsoft.com/archive/blogs/ken_brumfield/my-latencies-are-too-high</link>
      <pubDate>Tue, 05 Jun 2012 21:48:04 GMT</pubDate>
      <dc:creator><![CDATA[Ken Brumfield]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ken_brumfield/2012/06/05/my-latencies-are-too-high/</guid>
      <description><![CDATA[Yes it has been a VERY long while since I posted.&#160; The list of what I want to post keeps...]]></description>
      <content:encoded><![CDATA[<p>Yes it has been a VERY long while since I posted.&#160; The list of what I want to post keeps getting longer and longer, as does the queue of pending requests waiting for access to me.&#160; As a result of the long queue wait times the average access times for anything I want to do are unacceptably high.&#160; I need to figure out how to better parallelize what I need to do.</p>  <p>What I choose to post here is information where I had a lot of difficulty getting the answers too.&#160; I.e., it isn't floating around out there at all or doesn't answer some of the specific questions I needed answers too.&#160; The challenge is that the format the answer will often work for me in is not necessarily something I can just cut and paste here.&#160; So it has to wait until I have time to polish it, as I don't have Ralph Macchio hanging around to help (wax on, wax off).</p>  <p>Moving on to the topic of the post, if you didn't catch the double entendre in the title and the first paragraph, this post is about storage performance and design options.&#160; This is from a scenario where there was fault tolerance was on each individual LUN and for capacity management they storage was being allocated in multiple small LUNs and concatenated at the server.&#160; This was as a result of production outages due to poorly performing storage.&#160; In working with the storage and SQL teams, this was a test that was run in response to the argument that “we don’t see performance improvements in striping over spanning”.&#160; Which was absolutely true as in the test environment they were measuring only response times as a measurement of “performance”, not total throughput needed.&#160; All us storage aficionados know that it is throughput (IOPS) demanded vs. the ability of the storage to deliver it which drives response times.</p>  <p>As an analogy, think of trying to get the high school football team to a game.&#160; Let’s say it takes an hour to drive to the game.&#160; Whether 1 mom/dad/coach takes a car with 3 of the players or one bus is taken with all the players, it still takes an hour to drive to the game.&#160; This means multiple trips be made or multiple drivers have to drive.&#160; Saying that the “trip” isn’t any faster doesn’t negate selection of the bus as the best option.</p>  <p>In short the conclusions below are really a reiteration of what we already know, more spindles exercised equals more throughput.&#160; Spanning was essentially throttling full performance throughput of the storage to just the LUN which the active data was on.</p>  <p>&#160;</p>  <p>For the critics out there, I know this isn’t real world and read/write ratios and higher costs of writes as well as aggregation of writes at the array controller impact total throughput.&#160; The goal here is to explore the relationship between load driven, response times, where throughput maximizes while minimizing complexity of the test harness.&#160; The relationship is what is important and will be consistent even if the storage configurations change.&#160; (Note:&#160; This is in the comments at the end, I put it here for all those who won’t read all the way to the end before posting feedback).   <br />    <hr /></p>  <p><span style="color: rgb(23, 54, 93); font-size: 26pt;">Striping vs. Spanning</span></p>  <p>&#160;</p>  <h1>Winner </h1>  <p>Striping!!! </p>  <h1>Return Of The Analysis </h1>  <h2>Overview </h2>  <p>In a spanned set, data is only read to or written from the sub set of disks which hold the data needed. If all data is consumed all the time, this will eventually balance Input/Output (IO) as the storage fills. In the meantime, and for scenarios where only a subset of data is (think most recent month of 5 years of historical data in a database) only the spindles containing that data will be used. </p>  <p>For reference, minimal load to a fully loaded, but not overloaded disk, should respond to the operating system in 4 to 6 milliseconds (ms) on average, depending on the disk speed. Disk speeds will not go below 4 to 6 milliseconds due to physical limitations of the mechanical device. Therefore, as the IO requests from the Operating System and Application arrive at a rate greater than the storage can service the requests, said IO requests begin to wait in the queue. Thus the more requests that can not be serviced immediately, the greater the wait times. Degraded is considered to be in the 15 ms range, Critical in the 20 ms range.    <br />NOTE: Cache will lower disk times, but caches WILL become saturated under sustained load in excess of what the storage can support and as such should not be included in planning for overall support load. Instead they should be looked at as an accelerator under normal load conditions and a buffer for transient load conditions. These tests were done WITH a cache on the SAN, so even if the belief that caches magically fix all evils, it can be observed here that there are still limits even on SAN and cache. </p>  <p>Note: ALL data below was configured on the same server on the same 3 LUNs, only the partition type was changed. </p>  <h2>Legend </h2>  <ul>   <li>Red Line is the disk latency discussed previously. (Avg sec/Read, Avg sec/Transfer, Avg sec/Write from PhysicalDisk or LogicalDisk performance counters) </li>    <li>Blue Line is the number of operations per second performed by the storage (Reads/sec, Transfers/sec, Writes/sec from PhysicalDisk or LogicalDisk performance counters) </li>    <li>Green Line is the number of operations outstanding. This is the independent variable and is controlled by the test harness (iometer). (&quot;Current Disk Queue Length&quot; from PhysicalDisk or LogicalDisk performance counters) </li> </ul>  <h2>Spanning</h2>  <p>Below (Figure 1) is the overall performance picture of the performance of the spanned system. As it is quite small, as specific areas are called out there will be a zoomed version near said text.</p>  <h2><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/1588.060612_0448_MyLatencies1.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/1588.060612_5F00_0448_5F00_MyLatencies1.png" /> </h2>  <p><span style="color: rgb(79, 129, 189); font-size: 9pt;"><strong>Figure 1 </strong></span></p>  <h3>Observation #1 </h3>  <ul>   <li>Red line (latency) and green line (load generated) increase at the same rate. </li>    <li>This supports the previous statement that disk wait times are correlated with the amount of IO being asked of the underlying storage. </li>    <li>     <div>Real world application and idiosyncrasies: <img alt="" align="right" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/4718.060612_0448_MyLatencies2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/4718.060612_5F00_0448_5F00_MyLatencies2.png" /></div>   </li>    <ul>     <li>This is why &quot;Current Disk Queue Length&quot; is suggested as a counter to gauge whether or not storage is performing well. &quot;Current Disk Queue Length&quot; fails in that it is a point in time counter and can not accurately represent the median load over a given time period. Thus, when processing hundreds of IO per second (IOPS), one sample every second or greater it doesn't give a very good picture of the aggregate trend.        <br />NOTE: This problem scenario can be observed in the drops in the green line. Even under structured loads this data is skewed. </li>      <li>One idiosyncrasy is that certain scenarios can cause the IO to be delayed &quot;in flight&quot; (somewhere between it exiting the queue and returning from the underlying storage). Low &quot;Current Disk Queue Lengths&quot; and high latencies can hint at this scenario. Due to the inaccuracies in &quot;Current Disk Queue Length&quot;, the correct tools to confirm this scenario are native ETW tracing and tools, such as XPerf, that consume said data.</li>   </ul> </ul>  <h3>Observation #2</h3>  <ul>   <li>Blue Line (IOPS serviced) peaks and stays flat regardless of how much more load the test harness attempts to push. </li>    <li>     <div>Real world application: </div>      <ul>       <li>Once you're done, you're done. </li>        <li>Can't squeeze blood from a stone. </li>     </ul>   </li> </ul>  <h3>Observation #3 </h3>  <ul>   <li>The Red Line (latency) in picture to the right (Figure 2) is scaled differently (1000x) so the actual values can be seen more clearly. </li>    <li>As the latencies approach 20 ms, the maximum throughput approaches the absolute maximum. </li>    <li>Reference the previous picture where the Blue Line (throughput) maxes out pretty close to the left hand side of the chart at about 800 IOPS. </li> </ul>  <h3>Observation #4 </h3>  <ul>   <li>From the pictures (Figure 1 and Figure 3) below, performance maximizes at an average of about 800 IOPS </li> </ul>  <p><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/4237.060612_0448_MyLatencies3.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/4237.060612_5F00_0448_5F00_MyLatencies3.png" /> </p>  <p><span style="color: rgb(79, 129, 189); font-size: 9pt;"><strong>Figure 3 </strong></span></p>  <p>&#160;</p>  <h2>Striping </h2>  <p>This is the same 3 LUNS reconfigured as a stripe. </p>  <p><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/2555.060612_0448_MyLatencies4.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/2555.060612_5F00_0448_5F00_MyLatencies4.png" /> </p>  <p><span style="color: rgb(79, 129, 189); font-size: 9pt;"><strong>Figure 4 </strong></span></p>  <h3>Observation #1 </h3>  <ul>   <li>Red Line (latency) increases at a rate roughly equivalent to one-third the rate of increase of the Green Line (load). </li>    <li>Again, this supports the previous statement that disk wait times are correlated with the amount of IO being asked of the underlying storage. The fact that the correlation isn't one to one is due to the fact that the OS sees 3 &quot;physical disks&quot; (each LUN is presented as a physical disk from the perspective of the OS) under this logical disk and the load is distributed across said disks. Thus each &quot;physical disk&quot; only sees one-third of the load, in turn only suffering one-third of the degradation </li>    <li>     <div>Real world application and idiosyncrasies: </div>      <ul>       <li>In addition to previously mentioned… </li>        <li>The performance at the logical disk level can be very different then the OS &quot;physical disk&quot; level. By spreading load across multiple &quot;physical disks&quot; the logical disk gains the advantages of the best and minimizes the consequences of the worst. </li>     </ul>   </li> </ul>  <h3>Observation #2 </h3>  <ul>   <li>Blue Line (IOPS serviced) climbs more slowly, but still eventually plateaus regardless of how much more load the test harness attempts to push. </li>    <li>     <div>Real world application: </div>   </li>    <ul>     <li>Still can't get blood from a stone. </li>   </ul> </ul>  <h3>Observation #3<img alt="" align="right" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/0083.060612_0448_MyLatencies5.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/0083.060612_5F00_0448_5F00_MyLatencies5.png" /></h3>  <ul>   <li>The storage has to be pushed much harder to saturate it. In the spanned scenario, saturation was reached at about 16 pending IOs outstanding. In the striped scenario, this maxed out at about 48 pending IOs outstanding.      <br />Notice this is a factor of 3 greater than the striped scenario. This should not be a surprise. </li>    <li>There appear to be 2 levels of saturation. One from 10 ms to 20 ms latencies and one from 20 ms and up. However, the higher level is much more volatile and &quot;fails&quot; down to the lower level of saturation quite often. This artifact should not be factored into scaling decisions. </li>    <li>Same as above, changed the scaling on this picture (Figure 5) so the latency value is easier to read. </li> </ul>  <h3>Observation #4 </h3>  <ul>   <li>From the picture below (Figure 6) the throughput maxes at about 2500+ IOPS. </li>    <li>This is a little more than 3x the spanned scenario and should not be a surprise. </li> </ul>  <p><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/67/34/metablogapi/2555.060612_0448_MyLatencies6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-67-34-metablogapi/2555.060612_5F00_0448_5F00_MyLatencies6.png" /> </p>  <p><span style="color: rgb(79, 129, 189); font-size: 9pt;"><strong>Figure 6 </strong></span></p>  <h1>Testing strategy </h1>  <h2>Tools </h2>  <p>IOMeter – <a href="http://www.iometer.org">www.iometer.org</a> </p>  <p>Perfmon – included in Windows OS </p>  <p>Disk Manager – included in Windows OS </p>  <h2>Configuration </h2>  <ul>   <li>     <div>All Microsoft best practices were followed for storage configuration. </div>      <ul>       <li>Partitions were aligned </li>        <li>File system used 64K clusters (as per SQL storage best practices) </li>     </ul>   </li>    <li>3 LUNs were configured in A) Span and B) Stripe </li>    <li>     <div>IOMeter </div>      <ul>       <li>Access configuration – 64 KB IO sizes, 100% Random Read IO </li>        <li>         <div>Test Setup </div>          <ul>           <li>Run Time – 60 seconds </li>            <li>Cycling Options – &quot;Cycle # Outstanding I/Os – run step outstanding I/Os on all disks at a time </li>            <li># of Outstanding I/Os – Start – 8, End – 256, Step 8, Linear Stepping </li>         </ul>       </li>        <li>Iobw.tst (test file) was intentionally created to mostly fill one LUN (~32 GB) worth of space. This was selected to allow focus of analysis to be on the scalability of using one &quot;physical disk&quot; vs. using multiple &quot;physical disks&quot; </li>     </ul>   </li>    <li>     <div>Perfmon – The above IOMeter will create a test run approximately 35 minutes in length. Thus a performance counter log was created to automatically stop after a similar period (so the test could run unattended). </div>      <ul>       <li>Collect all PhysicalDisk and LogicalDisk counters. </li>        <li>Sample in 10 second intervals - thus there are multiple data points for each IOMeter step and the steps can be observed </li>     </ul>   </li> </ul>  <h2>Comments </h2>  <p>This was done to demonstrate the change in performance between striping and spanning, as well as illustrate the impact on changing load. As such, the IO profiles were simplified to exclusively be random read IO in order to present the worst case scenario (as random read IO has a very low cache hit rate) and minimize variability in results due to a cache optimizing writes to/from the storage. Therefore, the maximum throughput demonstrated in this test does not reflect the impact of write IOs. As a result, total throughput numbers will not be accurate for a real world production scenario, however the relationship between striping and spanning will remain similar. In short, the behavior pattern is able to be generalized, while the raw throughput numbers are not. </p>  <p>Additionally, scoping the test file size to reside on only one &quot;Physical Disk&quot; is not applicable to all scenarios. However, there are many scenarios where, due to data locality, this can easily be highly representative of real-time access. </p>]]></content:encoded>
    </item>
  </channel>
</rss>