<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Aaron Czechowski, MCS</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/aaronczechowski/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:53:15 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Moving on</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/moving-on</link>
      <pubDate>Fri, 08 Jun 2012 12:50:24 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2012/06/08/moving-on/</guid>
      <description><![CDATA[A long overdue post...
In April I changed roles within the company, leaving Microsoft Consulting...]]></description>
      <content:encoded><![CDATA[<p>A long overdue post...</p>
<p>In April I changed roles within the company, leaving Microsoft Consulting Services and joining the <a href="https://www.microsoft.com/en-us/windows/windowsintune/pc-management.aspx">Windows Intune</a> product team as a program manager.</p>
<p>This blog will remain, but I currently have no plans to make any further posts. I am continually re-evaluating the latter part of that statement....</p>]]></content:encoded>
    </item>
    <item>
      <title>Using Windows PowerShell to convert collection membership rules</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/using-windows-powershell-to-convert-collection-membership-rules</link>
      <pubDate>Tue, 07 Feb 2012 09:30:40 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2012/02/07/using-windows-powershell-to-convert-collection-membership-rules/</guid>
      <description><![CDATA[I developed some automation for a customer to help them manage the lifecycle of collections used for...]]></description>
      <content:encoded><![CDATA[<p>I developed some automation for a customer to help them manage the lifecycle of collections used for assignment of DCM baselines as they are revised.&#160; Part of this required the ability to convert a collection from query-based membership to direct membership rules and vice versa.&#160; I realize this is a very niche piece of automation, but perhaps someone else can gain some benefit from these functions.</p>  <p>I used <font style="background-color: #ffff00"></font><font style="style">Michael Niehaus’ <a href="https://blogs.technet.com/b/mniehaus/archive/2010/04/07/make-sure-a-configmgr-task-sequence-has-all-the-packages-it-needs.aspx">Windows PowerShell module</a> for Configuration Manager</font> to provide supporting functions and even derived several of the code blocks from his very handy functions.&#160; SCCM.psm1 is not technically required for these functions, but I assume it was used to create the connection to the site so that variables such as $sccmServer and $sccmNamespace are available.</p>  <p>There are three functions:</p>  <ul>   <li><strong>Add-SCCMCollectionDirectRule</strong>: this is a helper function used by both of the following.&#160; It takes two parameters: a collection object and an array of collection members.&#160; (It is a simplification of <font style="background-color: #ffff00"></font><font style="style">Michael’s related function</font><font style="background-color: #ffff00"></font>.) </li>    <li><strong>Convert-SCCMCollectionToDirect</strong>: as the name suggests this will take any collection, capture the current membership, remove the rule and then add the members as direct membership rules.&#160; It assumes there is only one query rule and does not refresh the collection membership. </li>    <li><strong>Convert-SCCMCollectionToQuery</strong>: the converse of the above; it removes all direct membership rules and then adds the given query rule.&#160; It is adapted from Michael’s code with fewer parameters (which could easily be added back for increased functionality). </li> </ul>  <p>&#160;</p>  <p>Function <strong>Add-SCCMCollectionDirectRule</strong> {</p>  <p>&#160;&#160;&#160; Param (    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; # SMS_Collection object, such as returned from Get-SCCMCollection function of SCCM.psm1     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Parameter()] $Collection,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; # Array of SMS_CollectionMembers from MemberClassName WMI Class     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Parameter()] $Members     <br />&#160;&#160;&#160; )</p>  <p>&#160;&#160;&#160; # (derived from Add-SCCMCollectionRule in SCCM.psm1 by Michael Niehaus)    <br />&#160;&#160;&#160; $ruleClass = [wmiclass]&quot;\\$sccmServer\$($sccmNamespace):SMS_CollectionRuleDirect&quot;     <br />&#160;&#160;&#160; ForEach ( $member in $Members ) {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $newRule = $ruleClass.CreateInstance()     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $newRule.RuleName = $member.Name     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $newRule.ResourceClassName = &quot;SMS_R_System&quot;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $newRule.ResourceID = $member.ResourceID</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $Collection.AddMembershipRule($newRule) | Out-Null    <br />&#160;&#160;&#160; }&#160; # end foreach</p>  <p>}&#160; # end Add-SCCMCollectionDirectRule function</p>  <p>   <br />Function <strong>Convert-SCCMCollectionToDirect</strong> {</p>  <p>&#160;&#160;&#160; Param (    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; # SMS_Collection object, such as returned from Get-SCCMCollection function of SCCM.psm1     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Parameter()] $Collection     <br />&#160;&#160;&#160; )</p>  <p>&#160;&#160;&#160; # Refresh to make sure we have all of the lazy properties    <br />&#160;&#160;&#160; $Collection.Get()</p>  <p>&#160;&#160;&#160; # Change the schedule from periodic (2) to manual (1)    <br />&#160;&#160;&#160; $Collection.RefreshType = 1     <br />&#160;&#160;&#160; $Collection.Put() | Out-Null</p>  <p>&#160;&#160;&#160; # Get the collection members    <br />&#160;&#160;&#160; $collMembers = Get-WmiObject -Class $Collection.MemberClassName -Namespace $sccmNamespace -ComputerName $sccmServer</p>  <p>&#160;&#160;&#160; # Get the existing query rule, assuming there is only one    <br />&#160;&#160;&#160; $rule = $Collection.CollectionRules[0]</p>  <p>&#160;&#160;&#160; # Delete the query rule    <br />&#160;&#160;&#160; $Collection.DeleteMembershipRule($rule) | Out-Null</p>  <p>&#160;&#160;&#160; # Add members back as direct membership rules    <br />&#160;&#160;&#160; Add-SCCMCollectionDirectRule -Collection $Collection -Members $collMembers</p>  <p>}&#160; # end Convert-SCCMCollectionToDirect function</p>  <p>   <br />Function <strong>Convert-SCCMCollectionToQuery</strong> {</p>  <p>&#160;&#160;&#160; Param (    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; # SMS_Collection object, such as returned from Get-SCCMCollection function of SCCM.psm1     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Parameter()] $Collection,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Parameter()] $QueryName,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Parameter()] $Query,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Parameter()] [ValidateRange(0, 31)] [int] $RefreshDays     <br />&#160;&#160;&#160; )</p>  <p>&#160;&#160;&#160; # Get all lazy properties    <br />&#160;&#160;&#160; $Collection.Get()</p>  <p>&#160;&#160;&#160; #Set schedule    <br />&#160;&#160;&#160; $intervalClass = [wmiclass]&quot;\\$sccmServer\$($sccmNamespace):SMS_ST_RecurInterval&quot;     <br />&#160;&#160;&#160; $interval = $intervalClass.CreateInstance()     <br />&#160;&#160;&#160; $interval.DaySpan = $refreshDays     <br />&#160;&#160;&#160; $Collection.RefreshSchedule = $interval     <br />&#160;&#160;&#160; $Collection.RefreshType = 2&#160;&#160;&#160; # periodic (2) vs manual (1)     <br />&#160;&#160;&#160; $Collection.Put() | Out-Null</p>  <p>&#160;&#160;&#160; # Delete all direct membership rules    <br />&#160;&#160;&#160; ForEach ( $rule in $Collection.CollectionRules ) {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $Collection.DeleteMembershipRule($rule) | Out-Null     <br />&#160;&#160;&#160; }</p>  <p>&#160;&#160;&#160; # Add query    <br />&#160;&#160;&#160; Add-SCCMCollectionRule -collectionID $Collection.CollectionID -queryRuleNameb $queryName -queryExpression $query</p>  <p>&#160;&#160;&#160; # refresh the collection    <br />&#160;&#160;&#160; $Collection.RequestRefresh() | Out-Null</p>  <p>}&#160; # end Convert-SCCMCollectionToQuery function</p>  <p>&#160;</p>  <p><strong>Disclaimer: The information on this site is provided &quot;AS IS&quot; with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the </strong><a href="https://www.microsoft.com/info/cpyright.mspx">Terms of Use</a><strong>.</strong></p>]]></content:encoded>
    </item>
    <item>
      <title>USGCB Policy Bug: Turn off desktop gadgets</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/usgcb-policy-bug-turn-off-desktop-gadgets</link>
      <pubDate>Mon, 23 Jan 2012 20:26:14 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2012/01/23/usgcb-policy-bug-turn-off-desktop-gadgets/</guid>
      <description><![CDATA[The US Government Configuration Baseline (USGCB) group policy object (GPO) for Windows 7 Computer...]]></description>
      <content:encoded><![CDATA[<p>The <a href="https://usgcb.nist.gov/usgcb/microsoft/download_win7.html">US Government Configuration Baseline</a> (USGCB) group policy object (GPO) for Windows 7 Computer Settings includes the setting:</p>  <blockquote>   <p>Computer Configuration\Administrative Templates\Windows Components\Desktop Gadgets     <br />Turn off desktop gadgets = Enabled</p> </blockquote>  <p>This setting is not included in the settings spreadsheet or the associated SCAP content.&#160; It was mistakenly included in the GPO and is expected to be removed in a future release.&#160; If desired, agencies can safely deviate this setting since the SCAP content does not include it.</p>  <p>NOTE: the three other settings in this policy section are still enabled to control the use of Desktop Gadgets.</p>  <p><strong>Disclaimer: The information on this site is provided &quot;AS IS&quot; with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. </strong></p>]]></content:encoded>
    </item>
    <item>
      <title>Verifying Configuration Manager Backup Task with Windows PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/verifying-configuration-manager-backup-task-with-windows-powershell</link>
      <pubDate>Mon, 23 Jan 2012 19:44:06 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2012/01/23/verifying-configuration-manager-backup-task-with-windows-powershell/</guid>
      <description><![CDATA[A seemingly simple requirement for a Desired Configuration Management configuration item is to...]]></description>
      <content:encoded><![CDATA[<p>A seemingly simple requirement for a Desired Configuration Management configuration item is to verify that the Configuration Manager 2007 site backup maintenance task is enabled.&#160; What became the difficult part of this was tracking down the specific location in WMI that this data exists.&#160; I have to give credit to Jamie Moyer for pointing me in the right direction.</p>  <blockquote>   <p>Function Get-SccmBackupEnabled {</p>    <p>&#160;&#160;&#160; # Refresh the site control file     <br />&#160;&#160;&#160; Invoke-WmiMethod -Path SMS_SiteControlFile -Name RefreshSCF -ArgumentList $sccmSiteCode -Computername $sccmServer -Namespace $sccmNamespace | Out-Null</p>    <p>&#160;&#160;&#160; # Get the backup task object for this site     <br />&#160;&#160;&#160; $bkTask = Get-WmiObject -Query &quot;SELECT * FROM SMS_SCI_SQLTask WHERE SiteCode = '$sccmSiteCode' AND ItemName = 'Backup SMS Site Server'&quot; -Computername $sccmServer -Namespace $sccmNamespace</p>    <p>&#160;&#160;&#160; If ( -not $bkTask ) { $False }     <br />&#160;&#160;&#160; ElseIf ( $bkTask.On -eq 'True' ) { $True }      <br />&#160;&#160;&#160; Else { $False }      <br />}</p> </blockquote>  <p>The key here is the SMS_SCI_SQLTask WMI class, not SMS_SCI_MaintenanceTask as I originally suspected.</p>  <p>This cannot be used as-is in DCM; it must be paired with some code to first create the connection to the site server and then call this function.&#160; I use <a href="https://blogs.technet.com/b/mniehaus/archive/2010/04/07/make-sure-a-configmgr-task-sequence-has-all-the-packages-it-needs.aspx">Michael Niehaus’ PowerShell module</a> which works very nicely for many common Configuration Manager automation tasks including the initial connection (New-SCCMConnection).</p>  <p><strong>Disclaimer: The information on this site is provided &quot;AS IS&quot; with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the </strong><a href="https://www.microsoft.com/info/cpyright.mspx">Terms of Use</a><strong>.</strong></p>]]></content:encoded>
    </item>
    <item>
      <title>Using SMBIOS GUID to import computer information for VMware guest</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/using-smbios-guid-to-import-computer-information-for-vmware-guest</link>
      <pubDate>Wed, 04 Jan 2012 15:34:00 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2012/01/04/using-smbios-guid-to-import-computer-information-for-vmware-guest/</guid>
      <description><![CDATA[To import computer information into Configuration Manager for OS deployment you have to enter the...]]></description>
      <content:encoded><![CDATA[<p>To import computer information into Configuration Manager for OS deployment you have to enter the computer name and then one or both of the following unique identifiers: MAC address or SMBIOS GUID, aka UUID.&nbsp; Many customers use the MAC address because it is shorter and typically more accessible.&nbsp; However, if the UUID is required this can seem difficult to obtain especially when the target systems are VMware guests.&nbsp; When the guest is initially created it is assigned a UUID which is stored in the VMX configuration file as the <strong>uuid.bios</strong> property.&nbsp; Here is an example line from the VMX file:</p>
<blockquote>
<p>uuid.bios = &ldquo;42 38 d4 b6 00 90 3e 75-94 06 b3 10 ea fa 2b 1e&rdquo;</p>
</blockquote>
<p>This does not look like a usual SMBIOS GUID in the standard (8)-(4)-(4)-(4)-(12) format.&nbsp; When the system boots and attempts to PXE boot, the same UUID is visible although formatted differently, for example:</p>
<blockquote>
<p>Network boot from Intel E1000 <br />Copyright (C) 2003-2008&nbsp; VMware, Inc. <br />Copyright (C) 1997-2000&nbsp; Intel Corporation</p>
<p>CLIENT MAC ADDR: 00 50 56 B8 00 14&nbsp; GUID 4238D4B6-0090-3E75-9406-B310EAFA2B1E <br />CLIENT IP: 192.168.1.100&nbsp; MASK: 255.255.255.0&nbsp; DHCP IP: 192.168.1.10 <br />GATEWAY IP: 192.168.1.1 <br />&hellip;</p>
</blockquote>
<p>Looking at the actual SMBIOS GUID via the UUID property of the Win32_ComputerSystemProduct WMI class (or the comparable System UUID property on the ConfigMgr System Resource), it appears as:</p>
<blockquote>
<p>UUID = &ldquo;B6D43842-9000-753E-9406-B310EAFA2B1E&rdquo;</p>
</blockquote>
<p>The difference between these two (uuid.bios up above and UUID directly above), which are identical except for formatting, is explained in an older <a href="https://technet.microsoft.com/en-us/library/cc978312.aspx">Remote Installation Services article on TechNet</a>.&nbsp; The VMware VMX uses the &ldquo;raw byte order&rdquo; format while Windows and Configuration Manager use the &ldquo;pretty print&rdquo; format. (Thanks to Michael Kelley for that nugget of information.)</p>
<p>So taking a UUID from a VMware VMX to import into Configuration Manager for OS deployment requires some conversion.&nbsp; The attached script does a simple conversion; there may be a more elegant method relying upon the underlying mathematics of the UUID, but that&rsquo;s beyond my current knowledge.</p>
<p>The script usage is as follows:</p>
<blockquote>
<p>.\Convert-UUID.ps1 -rawUUID "&lt;uuid&gt;"</p>
</blockquote>
<p>where &lt;uuid&gt; is formatted as follows:</p>
<blockquote>
<p>01 23 45 67 89 ab cd ef-fe dc ba 98 76 54 32 10</p>
</blockquote>
<p>such as used in the uuid.bios property of a VMX file.&nbsp; For example, the above rawUUID yields the following output:</p>
<blockquote>
<p>67452301-ab89-efcd-fedc-ba9876543210</p>
</blockquote>
<p><strong>Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the </strong><a href="https://www.microsoft.com/info/cpyright.mspx">Terms of Use</a><strong>.</strong></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/5601/00/00/03/47/39/80/Convert-UUID.zip" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-5601-00-00-03-47-39-80/Convert_2D00_UUID.zip">Convert-UUID.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>How to create a bootable ISO</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/how-to-create-a-bootable-iso</link>
      <pubDate>Wed, 04 Jan 2012 15:19:52 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2012/01/04/how-to-create-a-bootable-iso/</guid>
      <description><![CDATA[I know this information exists elsewhere in the world and I really dislike redundant posts.&#160;...]]></description>
      <content:encoded><![CDATA[<p>I know this information exists elsewhere in the world and I really dislike redundant posts.&#160; But I’m always hard-pressed to find this so am posting it here more as a reminder to myself.&#160; If it is of use to anyone else, all the better.</p>  <p>When you update a MDT 2010 Update 1 distribution share that includes the option to create a bootable ISO, the OSCDIMG command (in RunCmd.cmd), as well as a log of the output (PEManager.log), is located at %Temp%\PEManager.####, for example, C:\Users\Aaron\AppData\Local\Temp\PEManager.4336.</p>  <div>RunCmd.cmd contains the following (reformatted for easier readability):</div>  <p>“C:\Program Files\Windows AIK\Tools\AMD64\OSCDIMG.EXE”</p>  <blockquote>   <p>-u2      <br />-udfver102       <br />-m       <br />-o       <br />-h       <br />-yo”C:\Program Files\Microsoft Deployment Toolkit\Templates\BootOrder.txt”       <br />-bootdata:2#p0,e,b”C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\ETFSBOOT.COM”#pEF,e,b”C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\EFISYS.BIN”       <br />”C:\Users\Aaron\AppData\Local\Temp\MDTUpdate.4336\ISO”       <br />”C:\Users\Aaron\AppData\Local\Temp\MDTUpdate.4336\LiteTouchPE_x64.iso”       <br />&gt; “C:\Users\Aaron\AppData\Local\Temp\PEManager.4336\PEManager.log” 2&gt;&amp;1</p> </blockquote>  <p>See [some website] for details on the various OSCDIMG parameters.</p>  <p><strong>Disclaimer: The information on this site is provided &quot;AS IS&quot; with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the </strong><a href="https://www.microsoft.com/info/cpyright.mspx">Terms of Use</a><strong>.</strong></p>]]></content:encoded>
    </item>
    <item>
      <title>Disk Cleanup in a MDT Task Sequence</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/disk-cleanup-in-a-mdt-task-sequence</link>
      <pubDate>Wed, 04 Jan 2012 15:18:00 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2012/01/04/disk-cleanup-in-a-mdt-task-sequence/</guid>
      <description><![CDATA[While using MDT to remaster an existing Windows 7 image I added tasks to apply Windows 7 Service...]]></description>
      <content:encoded><![CDATA[<p>While using MDT to remaster an existing Windows 7 image I added tasks to apply Windows 7 Service Pack 1 and a slew of other updates to the image (so that deployed workstations are up to date out of the gate instead of waiting for updates to come down to each system across the network).&nbsp; Unfortunately this bloated the end product WIM by almost 2 GB.&nbsp; I started to look into ways I could cleanup any unnecessary files on the hard drive before capturing the image.&nbsp; Instead of just hacking away at the disk, deleting temporary files and other caches, I decided to try to integrate the built-in Disk Cleanup utility.</p>
<p>Disk Cleanup, cleanmgr.exe, has <a href="https://social.technet.microsoft.com/Forums/en/w7itproperf/thread/40c7f557-bd5d-4d5c-999f-9dbb5f5d08d5">command line parameters</a> that are well documented but there is little to nothing on how to automate this, especially in the context of a MDT task sequence.&nbsp; The typical process is to run <strong>cleanmgr.exe /sageset:<em>n</em></strong> (where <strong><em>n</em></strong> is an arbitrary integer) and set the files to delete in the interface.&nbsp; This then configures a cleanup profile in the registry so that when running <strong>cleanmgr.exe /sagerun:<em>n</em></strong> it has a preset configuration to use.</p>
<p>To automate this for the task sequence I made the decision that every cache type (aka handler) is to be deleted in this scenario, including the one most important to me: Service Pack Backup Files.&nbsp; I wrote the attached MDT-style script that loops through each subkey under <strong>HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches</strong> and sets the <strong>StateFlags0042</strong> value to DWORD <strong>2</strong> (in this example, <strong><em>n </em></strong>= 42).&nbsp; There is an <a href="https://msdn.microsoft.com/en-us/library/bb776782.aspx">article on MSDN</a> that includes an excellent description of the StateFlags value.&nbsp; The script then runs <strong>cleanmgr.exe /sagerun:42</strong> to do the needful.</p>
<p>I added this cleanup task to the end of the Custom Tasks group of the State Restore phase (for those of you using the Standard Client Task Sequence).&nbsp; It cleaned almost 3 GB of data from the system, which resulted in the final WIM only growing by 575 MB from the starting custom image (instead of almost 2 GB without the cleanup).</p>
<p><strong>Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the </strong><a href="https://www.microsoft.com/info/cpyright.mspx">Terms of Use</a><strong>.</strong></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/5601/00/00/03/47/39/74/CustomDiskCleanup.zip" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-5601-00-00-03-47-39-74/CustomDiskCleanup.zip">CustomDiskCleanup.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Deploying Windows 7 Language Packs via ConfigMgr</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/deploying-windows-7-language-packs-via-configmgr</link>
      <pubDate>Sun, 18 Dec 2011 17:31:15 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2011/12/18/deploying-windows-7-language-packs-via-configmgr/</guid>
      <description><![CDATA[During a Windows 7 64-bit deployment project the customer gave me a requirement to allow users to...]]></description>
      <content:encoded><![CDATA[<p>During a Windows 7 64-bit deployment project the customer gave me a requirement to allow users to install a variety of language packs without adding all of them to the baseline image to keep the size down.&#160; They are already using ConfigMgr to advertise applications for user self-service so this seemed the most logical method to provide this capability.</p>  <p>Windows 7 language pack setup, lpksetup, includes parameters to support a managed installation.&#160; I successfully tested the following from the command prompt:</p>  <blockquote>   <p><font face="Courier New">lpksetup.exe /i de-DE /p . /r /s</font></p> </blockquote>  <p>I advertised a program with this command line, but it quickly failed.&#160; The test system returned an error status message, ID 10003: “An error occurred while preparing to run the program for advertisement….&#160; The operating system reported error 2147942402: The system cannot find the file specified.”</p>  <p>Execmgr.log contained the following:</p>  <blockquote>   <p>File C:\Windows\SysWOW64\CCM\Cache\…\lpksetup.exe is not a valid executable file     <br />Invalid executable file lpksetup.exe</p> </blockquote>  <p>I altered the program command line to directly reference the executable at %WinDir%\System32\lpksetup.exe with the same result.</p>  <p>Since ConfigMgr executes from a 32-bit process I launched a 32-bit command prompt (C:\Windows\SysWOW64\cmd.exe) to manually try the lpksetup command line.</p>  <blockquote>   <p><font face="Courier New">C:\Windows\SysWOW64&gt;C:\Windows\System32\lpksetup.exe /?       <br />'C:\Windows\System32\lpksetup.exe' is not recognized as an internal or external command, operable program or batch file.</font></p>    <p><font face="Courier New">C:\Windows\SysWOW64&gt;dir C:\Windows\System32\lpksetup.exe       <br /> Volume in drive C is OSDisk        <br /> Volume Serial Number is 1234-5678</font></p>    <p><font face="Courier New"> Directory of C:\Windows\System32</font></p>    <p><font face="Courier New">File Not Found</font></p> </blockquote>  <p>It turns out that lpksetup.exe on Windows 7 64-bit is a 64-bit-only process so with WOW file redirection in a 32-bit process C:\Windows\System32 redirects to C:\Windows\SysWOW64, which does not contain lpksetup.exe.&#160; So I altered the ConfigMgr program command line to:</p>  <blockquote>   <p><font face="Courier New">%WinDir%\SysNative\lpksetup.exe /i de-DE /p . /r /s</font></p> </blockquote>  <p>Using the SysNative alias allowed the language pack to be successfully installed on Windows 7 64-bit from a ConfigMgr advertised program.</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows XP Remote Assistance and DontDisplayLastUserName</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/windows-xp-remote-assistance-and-dontdisplaylastusername</link>
      <pubDate>Sun, 18 Dec 2011 16:57:50 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2011/12/18/windows-xp-remote-assistance-and-dontdisplaylastusername/</guid>
      <description><![CDATA[While implementing Remote Assistance during a Windows 7 deployment I found that a RA connection to...]]></description>
      <content:encoded><![CDATA[<p>While implementing Remote Assistance during a Windows 7 deployment I found that a RA connection to older Windows XP workstations would behave like a Remote Desktop connection: the user would not be prompted to allow the administrator to connect, and the administrator would be prompted to logon.&#160; I eventually traced the issue to the presence of the DontDisplayLastUserName value, set to 1, at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.&#160; These specific Windows XP workstations were upgraded from earlier versions of Windows, persisting this setting which is deprecated in Windows XP, but causing this problem with Remote Assistance.&#160; I applied a custom administrative template to modify this older registry value and RA started to work as expected.</p>  <p>The necessary functionality historically provided by this registry value is applied by enabling the group policy setting “Interactive logon: Do not display last user name” at Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options.&#160; This policy setting configures the DontDisplayLastUserName value at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.&#160; Remote Assistance is not affected by the presence of this setting.&#160; </p>  <p>Microsoft Support article <a href="https://support.microsoft.com/kb/306045">KB306045</a> has more detail on this issue.</p>]]></content:encoded>
    </item>
    <item>
      <title>ConfigMgr query for blocked or approved clients</title>
      <link>https://docs.microsoft.com/archive/blogs/aaronczechowski/configmgr-query-for-blocked-or-approved-clients</link>
      <pubDate>Thu, 08 Dec 2011 17:58:01 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Czechowski [Microsoft]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/aaronczechowski/2011/12/08/configmgr-query-for-blocked-or-approved-clients/</guid>
      <description><![CDATA[This is nothing new; I’m typically not one to repost information that can be found elsewhere...]]></description>
      <content:encoded><![CDATA[<p>This is nothing new; I’m typically not one to repost information that can be found elsewhere online.&#160; This is just so that I have an easy place to find it in the future!</p>  <blockquote>   <p>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     <br />from SMS_R_System      <br />inner join SMS_CM_RES_COLL_SMS00001      <br />on SMS_CM_RES_COLL_SMS00001.ResourceId = SMS_R_System.ResourceId      <br />where SMS_CM_RES_COLL_SMS00001.IsBlocked = '1'</p> </blockquote>  <p>Replace IsBlocked with IsApproved to query for approved clients.</p>  <p><strong>Disclaimer: The information on this site is provided &quot;AS IS&quot; with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the </strong><a href="https://www.microsoft.com/info/cpyright.mspx">Terms of Use</a><strong>.</strong></p>]]></content:encoded>
    </item>
  </channel>
</rss>