<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Aaron Czechowski, MCS</title><subtitle type="html" /><id>http://blogs.technet.com/b/aaronczechowski/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/" /><link rel="self" type="application/atom+xml" href="http://blogs.technet.com/b/aaronczechowski/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2010-05-02T20:32:00Z</updated><entry><title>Moving on</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2012/06/08/moving-on.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2012/06/08/moving-on.aspx</id><published>2012-06-08T19:50:24Z</published><updated>2012-06-08T19:50:24Z</updated><content type="html">&lt;p&gt;A long overdue post...&lt;/p&gt;
&lt;p&gt;In April I changed roles within the company, leaving Microsoft Consulting Services and joining the &lt;a href="http://www.microsoft.com/en-us/windows/windowsintune/pc-management.aspx"&gt;Windows Intune&lt;/a&gt; product team as a program manager.&lt;/p&gt;
&lt;p&gt;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....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3502829" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Using Windows PowerShell to convert collection membership rules</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2012/02/07/using-windows-powershell-to-convert-collection-membership-rules.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2012/02/07/using-windows-powershell-to-convert-collection-membership-rules.aspx</id><published>2012-02-07T17:30:40Z</published><updated>2012-02-07T17:30:40Z</updated><content type="html">&lt;p&gt;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.&amp;#160; Part of this required the ability to convert a collection from query-based membership to direct membership rules and vice versa.&amp;#160; I realize this is a very niche piece of automation, but perhaps someone else can gain some benefit from these functions.&lt;/p&gt;  &lt;p&gt;I used &lt;font style="background-color: #ffff00"&gt;&lt;/font&gt;&lt;font style="style"&gt;Michael Niehaus’ &lt;a href="http://blogs.technet.com/b/mniehaus/archive/2010/04/07/make-sure-a-configmgr-task-sequence-has-all-the-packages-it-needs.aspx"&gt;Windows PowerShell module&lt;/a&gt; for Configuration Manager&lt;/font&gt; to provide supporting functions and even derived several of the code blocks from his very handy functions.&amp;#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.&lt;/p&gt;  &lt;p&gt;There are three functions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Add-SCCMCollectionDirectRule&lt;/strong&gt;: this is a helper function used by both of the following.&amp;#160; It takes two parameters: a collection object and an array of collection members.&amp;#160; (It is a simplification of &lt;font style="background-color: #ffff00"&gt;&lt;/font&gt;&lt;font style="style"&gt;Michael’s related function&lt;/font&gt;&lt;font style="background-color: #ffff00"&gt;&lt;/font&gt;.) &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Convert-SCCMCollectionToDirect&lt;/strong&gt;: 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.&amp;#160; It assumes there is only one query rule and does not refresh the collection membership. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Convert-SCCMCollectionToQuery&lt;/strong&gt;: the converse of the above; it removes all direct membership rules and then adds the given query rule.&amp;#160; It is adapted from Michael’s code with fewer parameters (which could easily be added back for increased functionality). &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Function &lt;strong&gt;Add-SCCMCollectionDirectRule&lt;/strong&gt; {&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; Param (    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # SMS_Collection object, such as returned from Get-SCCMCollection function of SCCM.psm1     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Parameter()] $Collection,     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # Array of SMS_CollectionMembers from MemberClassName WMI Class     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Parameter()] $Members     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; )&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # (derived from Add-SCCMCollectionRule in SCCM.psm1 by Michael Niehaus)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $ruleClass = [wmiclass]&amp;quot;\\$sccmServer\$($sccmNamespace):SMS_CollectionRuleDirect&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ForEach ( $member in $Members ) {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $newRule = $ruleClass.CreateInstance()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $newRule.RuleName = $member.Name     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $newRule.ResourceClassName = &amp;quot;SMS_R_System&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $newRule.ResourceID = $member.ResourceID&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $Collection.AddMembershipRule($newRule) | Out-Null    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&amp;#160; # end foreach&lt;/p&gt;  &lt;p&gt;}&amp;#160; # end Add-SCCMCollectionDirectRule function&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Function &lt;strong&gt;Convert-SCCMCollectionToDirect&lt;/strong&gt; {&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; Param (    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # SMS_Collection object, such as returned from Get-SCCMCollection function of SCCM.psm1     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Parameter()] $Collection     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; )&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Refresh to make sure we have all of the lazy properties    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Collection.Get()&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Change the schedule from periodic (2) to manual (1)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Collection.RefreshType = 1     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Collection.Put() | Out-Null&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Get the collection members    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $collMembers = Get-WmiObject -Class $Collection.MemberClassName -Namespace $sccmNamespace -ComputerName $sccmServer&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Get the existing query rule, assuming there is only one    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $rule = $Collection.CollectionRules[0]&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Delete the query rule    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Collection.DeleteMembershipRule($rule) | Out-Null&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Add members back as direct membership rules    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Add-SCCMCollectionDirectRule -Collection $Collection -Members $collMembers&lt;/p&gt;  &lt;p&gt;}&amp;#160; # end Convert-SCCMCollectionToDirect function&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Function &lt;strong&gt;Convert-SCCMCollectionToQuery&lt;/strong&gt; {&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; Param (    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # SMS_Collection object, such as returned from Get-SCCMCollection function of SCCM.psm1     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Parameter()] $Collection,     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Parameter()] $QueryName,     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Parameter()] $Query,     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Parameter()] [ValidateRange(0, 31)] [int] $RefreshDays     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; )&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Get all lazy properties    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Collection.Get()&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; #Set schedule    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $intervalClass = [wmiclass]&amp;quot;\\$sccmServer\$($sccmNamespace):SMS_ST_RecurInterval&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $interval = $intervalClass.CreateInstance()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $interval.DaySpan = $refreshDays     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Collection.RefreshSchedule = $interval     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Collection.RefreshType = 2&amp;#160;&amp;#160;&amp;#160; # periodic (2) vs manual (1)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Collection.Put() | Out-Null&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Delete all direct membership rules    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ForEach ( $rule in $Collection.CollectionRules ) {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $Collection.DeleteMembershipRule($rule) | Out-Null     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Add query    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Add-SCCMCollectionRule -collectionID $Collection.CollectionID -queryRuleNameb $queryName -queryExpression $query&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # refresh the collection    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Collection.RequestRefresh() | Out-Null&lt;/p&gt;  &lt;p&gt;}&amp;#160; # end Convert-SCCMCollectionToQuery function&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disclaimer: The information on this site is provided &amp;quot;AS IS&amp;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3479437" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/PowerShell/" /><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /></entry><entry><title>USGCB Policy Bug: Turn off desktop gadgets</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2012/01/23/usgcb-policy-bug-turn-off-desktop-gadgets.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2012/01/23/usgcb-policy-bug-turn-off-desktop-gadgets.aspx</id><published>2012-01-24T04:26:14Z</published><updated>2012-01-24T04:26:14Z</updated><content type="html">&lt;p&gt;The &lt;a href="http://usgcb.nist.gov/usgcb/microsoft/download_win7.html"&gt;US Government Configuration Baseline&lt;/a&gt; (USGCB) group policy object (GPO) for Windows 7 Computer Settings includes the setting:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Computer Configuration\Administrative Templates\Windows Components\Desktop Gadgets     &lt;br /&gt;Turn off desktop gadgets = Enabled&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This setting is not included in the settings spreadsheet or the associated SCAP content.&amp;#160; It was mistakenly included in the GPO and is expected to be removed in a future release.&amp;#160; If desired, agencies can safely deviate this setting since the SCAP content does not include it.&lt;/p&gt;  &lt;p&gt;NOTE: the three other settings in this policy section are still enabled to control the use of Desktop Gadgets.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disclaimer: The information on this site is provided &amp;quot;AS IS&amp;quot; with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. &lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3476889" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="Security" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/Security/" /><category term="Windows" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/Windows/" /></entry><entry><title>Verifying Configuration Manager Backup Task with Windows PowerShell</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2012/01/23/verifying-configuration-manager-backup-task-with-windows-powershell.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2012/01/23/verifying-configuration-manager-backup-task-with-windows-powershell.aspx</id><published>2012-01-24T03:44:06Z</published><updated>2012-01-24T03:44:06Z</updated><content type="html">&lt;p&gt;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.&amp;#160; What became the difficult part of this was tracking down the specific location in WMI that this data exists.&amp;#160; I have to give credit to Jamie Moyer for pointing me in the right direction.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Function Get-SccmBackupEnabled {&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Refresh the site control file     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Invoke-WmiMethod -Path SMS_SiteControlFile -Name RefreshSCF -ArgumentList $sccmSiteCode -Computername $sccmServer -Namespace $sccmNamespace | Out-Null&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; # Get the backup task object for this site     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $bkTask = Get-WmiObject -Query &amp;quot;SELECT * FROM SMS_SCI_SQLTask WHERE SiteCode = '$sccmSiteCode' AND ItemName = 'Backup SMS Site Server'&amp;quot; -Computername $sccmServer -Namespace $sccmNamespace&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; If ( -not $bkTask ) { $False }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ElseIf ( $bkTask.On -eq 'True' ) { $True }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Else { $False }      &lt;br /&gt;}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The key here is the SMS_SCI_SQLTask WMI class, not SMS_SCI_MaintenanceTask as I originally suspected.&lt;/p&gt;  &lt;p&gt;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.&amp;#160; I use &lt;a href="http://blogs.technet.com/b/mniehaus/archive/2010/04/07/make-sure-a-configmgr-task-sequence-has-all-the-packages-it-needs.aspx"&gt;Michael Niehaus’ PowerShell module&lt;/a&gt; which works very nicely for many common Configuration Manager automation tasks including the initial connection (New-SCCMConnection).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disclaimer: The information on this site is provided &amp;quot;AS IS&amp;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3476887" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/PowerShell/" /><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /><category term="DCM" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/DCM/" /></entry><entry><title>Using SMBIOS GUID to import computer information for VMware guest</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2012/01/04/using-smbios-guid-for-importing-computer-information-for-vmware-guest.aspx" /><link rel="enclosure" type="application/zip" length="905" href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-47-39-80/Convert_2D00_UUID.zip" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2012/01/04/using-smbios-guid-for-importing-computer-information-for-vmware-guest.aspx</id><published>2012-01-04T23:34:00Z</published><updated>2012-01-04T23:34:00Z</updated><content type="html">&lt;p&gt;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.&amp;nbsp; Many customers use the MAC address because it is shorter and typically more accessible.&amp;nbsp; However, if the UUID is required this can seem difficult to obtain especially when the target systems are VMware guests.&amp;nbsp; When the guest is initially created it is assigned a UUID which is stored in the VMX configuration file as the &lt;strong&gt;uuid.bios&lt;/strong&gt; property.&amp;nbsp; Here is an example line from the VMX file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;uuid.bios = &amp;ldquo;42 38 d4 b6 00 90 3e 75-94 06 b3 10 ea fa 2b 1e&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This does not look like a usual SMBIOS GUID in the standard (8)-(4)-(4)-(4)-(12) format.&amp;nbsp; When the system boots and attempts to PXE boot, the same UUID is visible although formatted differently, for example:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Network boot from Intel E1000 &lt;br /&gt;Copyright (C) 2003-2008&amp;nbsp; VMware, Inc. &lt;br /&gt;Copyright (C) 1997-2000&amp;nbsp; Intel Corporation&lt;/p&gt;
&lt;p&gt;CLIENT MAC ADDR: 00 50 56 B8 00 14&amp;nbsp; GUID 4238D4B6-0090-3E75-9406-B310EAFA2B1E &lt;br /&gt;CLIENT IP: 192.168.1.100&amp;nbsp; MASK: 255.255.255.0&amp;nbsp; DHCP IP: 192.168.1.10 &lt;br /&gt;GATEWAY IP: 192.168.1.1 &lt;br /&gt;&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;UUID = &amp;ldquo;B6D43842-9000-753E-9406-B310EAFA2B1E&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The difference between these two (uuid.bios up above and UUID directly above), which are identical except for formatting, is explained in an older &lt;a href="http://technet.microsoft.com/en-us/library/cc978312.aspx"&gt;Remote Installation Services article on TechNet&lt;/a&gt;.&amp;nbsp; The VMware VMX uses the &amp;ldquo;raw byte order&amp;rdquo; format while Windows and Configuration Manager use the &amp;ldquo;pretty print&amp;rdquo; format. (Thanks to Michael Kelley for that nugget of information.)&lt;/p&gt;
&lt;p&gt;So taking a UUID from a VMware VMX to import into Configuration Manager for OS deployment requires some conversion.&amp;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&amp;rsquo;s beyond my current knowledge.&lt;/p&gt;
&lt;p&gt;The script usage is as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;.\Convert-UUID.ps1 -rawUUID "&amp;lt;uuid&amp;gt;"&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;where &amp;lt;uuid&amp;gt; is formatted as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;01 23 45 67 89 ab cd ef-fe dc ba 98 76 54 32 10&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;such as used in the uuid.bios property of a VMX file.&amp;nbsp; For example, the above rawUUID yields the following output:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;67452301-ab89-efcd-fedc-ba9876543210&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3473980" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/PowerShell/" /><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /></entry><entry><title>How to create a bootable ISO</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2012/01/04/how-to-create-a-bootable-iso.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2012/01/04/how-to-create-a-bootable-iso.aspx</id><published>2012-01-04T23:19:52Z</published><updated>2012-01-04T23:19:52Z</updated><content type="html">&lt;p&gt;I know this information exists elsewhere in the world and I really dislike redundant posts.&amp;#160; But I’m always hard-pressed to find this so am posting it here more as a reminder to myself.&amp;#160; If it is of use to anyone else, all the better.&lt;/p&gt;  &lt;p&gt;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.&lt;/p&gt;  &lt;div&gt;RunCmd.cmd contains the following (reformatted for easier readability):&lt;/div&gt;  &lt;p&gt;“C:\Program Files\Windows AIK\Tools\AMD64\OSCDIMG.EXE”&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;-u2      &lt;br /&gt;-udfver102       &lt;br /&gt;-m       &lt;br /&gt;-o       &lt;br /&gt;-h       &lt;br /&gt;-yo”C:\Program Files\Microsoft Deployment Toolkit\Templates\BootOrder.txt”       &lt;br /&gt;-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”       &lt;br /&gt;”C:\Users\Aaron\AppData\Local\Temp\MDTUpdate.4336\ISO”       &lt;br /&gt;”C:\Users\Aaron\AppData\Local\Temp\MDTUpdate.4336\LiteTouchPE_x64.iso”       &lt;br /&gt;&amp;gt; “C:\Users\Aaron\AppData\Local\Temp\PEManager.4336\PEManager.log” 2&amp;gt;&amp;amp;1&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;See [some website] for details on the various OSCDIMG parameters.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disclaimer: The information on this site is provided &amp;quot;AS IS&amp;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3473976" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="MDT" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/MDT/" /></entry><entry><title>Disk Cleanup in a MDT Task Sequence</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2012/01/04/disk-cleanup-in-a-mdt-task-sequence.aspx" /><link rel="enclosure" type="application/zip" length="1353" href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-47-39-74/CustomDiskCleanup.zip" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2012/01/04/disk-cleanup-in-a-mdt-task-sequence.aspx</id><published>2012-01-04T23:18:00Z</published><updated>2012-01-04T23:18:00Z</updated><content type="html">&lt;p&gt;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).&amp;nbsp; Unfortunately this bloated the end product WIM by almost 2 GB.&amp;nbsp; I started to look into ways I could cleanup any unnecessary files on the hard drive before capturing the image.&amp;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.&lt;/p&gt;
&lt;p&gt;Disk Cleanup, cleanmgr.exe, has &lt;a href="http://social.technet.microsoft.com/Forums/en/w7itproperf/thread/40c7f557-bd5d-4d5c-999f-9dbb5f5d08d5"&gt;command line parameters&lt;/a&gt; that are well documented but there is little to nothing on how to automate this, especially in the context of a MDT task sequence.&amp;nbsp; The typical process is to run &lt;strong&gt;cleanmgr.exe /sageset:&lt;em&gt;n&lt;/em&gt;&lt;/strong&gt; (where &lt;strong&gt;&lt;em&gt;n&lt;/em&gt;&lt;/strong&gt; is an arbitrary integer) and set the files to delete in the interface.&amp;nbsp; This then configures a cleanup profile in the registry so that when running &lt;strong&gt;cleanmgr.exe /sagerun:&lt;em&gt;n&lt;/em&gt;&lt;/strong&gt; it has a preset configuration to use.&lt;/p&gt;
&lt;p&gt;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.&amp;nbsp; I wrote the attached MDT-style script that loops through each subkey under &lt;strong&gt;HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches&lt;/strong&gt; and sets the &lt;strong&gt;StateFlags0042&lt;/strong&gt; value to DWORD &lt;strong&gt;2&lt;/strong&gt; (in this example, &lt;strong&gt;&lt;em&gt;n &lt;/em&gt;&lt;/strong&gt;= 42).&amp;nbsp; There is an &lt;a href="http://msdn.microsoft.com/en-us/library/bb776782.aspx"&gt;article on MSDN&lt;/a&gt; that includes an excellent description of the StateFlags value.&amp;nbsp; The script then runs &lt;strong&gt;cleanmgr.exe /sagerun:42&lt;/strong&gt; to do the needful.&lt;/p&gt;
&lt;p&gt;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).&amp;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).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3473974" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="MDT" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/MDT/" /><category term="VBScript" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/VBScript/" /><category term="Windows" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/Windows/" /></entry><entry><title>Deploying Windows 7 Language Packs via ConfigMgr</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/12/18/deploying-windows-7-language-packs-via-configmgr.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/12/18/deploying-windows-7-language-packs-via-configmgr.aspx</id><published>2011-12-19T01:31:15Z</published><updated>2011-12-19T01:31:15Z</updated><content type="html">&lt;p&gt;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.&amp;#160; They are already using ConfigMgr to advertise applications for user self-service so this seemed the most logical method to provide this capability.&lt;/p&gt;  &lt;p&gt;Windows 7 language pack setup, lpksetup, includes parameters to support a managed installation.&amp;#160; I successfully tested the following from the command prompt:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;lpksetup.exe /i de-DE /p . /r /s&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I advertised a program with this command line, but it quickly failed.&amp;#160; The test system returned an error status message, ID 10003: “An error occurred while preparing to run the program for advertisement….&amp;#160; The operating system reported error 2147942402: The system cannot find the file specified.”&lt;/p&gt;  &lt;p&gt;Execmgr.log contained the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;File C:\Windows\SysWOW64\CCM\Cache\…\lpksetup.exe is not a valid executable file     &lt;br /&gt;Invalid executable file lpksetup.exe&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I altered the program command line to directly reference the executable at %WinDir%\System32\lpksetup.exe with the same result.&lt;/p&gt;  &lt;p&gt;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.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;C:\Windows\SysWOW64&amp;gt;C:\Windows\System32\lpksetup.exe /?       &lt;br /&gt;'C:\Windows\System32\lpksetup.exe' is not recognized as an internal or external command, operable program or batch file.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;C:\Windows\SysWOW64&amp;gt;dir C:\Windows\System32\lpksetup.exe       &lt;br /&gt; Volume in drive C is OSDisk        &lt;br /&gt; Volume Serial Number is 1234-5678&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt; Directory of C:\Windows\System32&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;File Not Found&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;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.&amp;#160; So I altered the ConfigMgr program command line to:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;%WinDir%\SysNative\lpksetup.exe /i de-DE /p . /r /s&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Using the SysNative alias allowed the language pack to be successfully installed on Windows 7 64-bit from a ConfigMgr advertised program.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3471809" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Windows XP Remote Assistance and DontDisplayLastUserName</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/12/18/windows-xp-remote-assistance-and-dontdisplaylastusername.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/12/18/windows-xp-remote-assistance-and-dontdisplaylastusername.aspx</id><published>2011-12-19T00:57:50Z</published><updated>2011-12-19T00:57:50Z</updated><content type="html">&lt;p&gt;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.&amp;#160; I eventually traced the issue to the presence of the DontDisplayLastUserName value, set to 1, at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.&amp;#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.&amp;#160; I applied a custom administrative template to modify this older registry value and RA started to work as expected.&lt;/p&gt;  &lt;p&gt;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.&amp;#160; This policy setting configures the DontDisplayLastUserName value at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.&amp;#160; Remote Assistance is not affected by the presence of this setting.&amp;#160; &lt;/p&gt;  &lt;p&gt;Microsoft Support article &lt;a href="http://support.microsoft.com/kb/306045"&gt;KB306045&lt;/a&gt; has more detail on this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3471806" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="Security" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/Security/" /><category term="Windows" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/Windows/" /></entry><entry><title>ConfigMgr query for blocked or approved clients</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/12/08/configmgr-query-for-blocked-or-approved-clients.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/12/08/configmgr-query-for-blocked-or-approved-clients.aspx</id><published>2011-12-09T01:58:01Z</published><updated>2011-12-09T01:58:01Z</updated><content type="html">&lt;p&gt;This is nothing new; I’m typically not one to repost information that can be found elsewhere online.&amp;#160; This is just so that I have an easy place to find it in the future!&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;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     &lt;br /&gt;from SMS_R_System      &lt;br /&gt;inner join SMS_CM_RES_COLL_SMS00001      &lt;br /&gt;on SMS_CM_RES_COLL_SMS00001.ResourceId = SMS_R_System.ResourceId      &lt;br /&gt;where SMS_CM_RES_COLL_SMS00001.IsBlocked = '1'&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Replace IsBlocked with IsApproved to query for approved clients.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disclaimer: The information on this site is provided &amp;quot;AS IS&amp;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3469907" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /></entry><entry><title>Generating a random password with PowerShell</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/12/08/generating-a-random-password-with-powershell.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/12/08/generating-a-random-password-with-powershell.aspx</id><published>2011-12-09T01:47:50Z</published><updated>2011-12-09T01:47:50Z</updated><content type="html">&lt;p&gt;Instead of bashing on the keyboard, I’m a proponent of using a tool to generate a random password, such as when creating a service account or new user accounts.&amp;#160; A colleague of mine recently discovered that this is doable with Windows PowerShell, in only two lines!&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Add-Type -Assembly System.Web      &lt;br /&gt;[Web.Security.Membership]::GeneratePassword($length,$numberOfNonAlphanumericCharacters)&lt;/p&gt;  &lt;/blockquote&gt;  &lt;p&gt;This will return a string using the provided parameters.&amp;#160; For example, setting $length = 15 and $numberOfNonAlphanumericCharacters = 6 the output is &lt;/p&gt;  &lt;p&gt;uC@#H=}S&amp;amp;K$C!RP&lt;/p&gt;  &lt;p&gt;or&lt;/p&gt;  &lt;p&gt;1P*]v)PL99T{$y;&lt;/p&gt;  &lt;p&gt;or&lt;/p&gt;  &lt;p&gt;%H2|kK5J{D=(-kl&lt;/p&gt;  &lt;p&gt;(You get the idea.)&lt;/p&gt;  &lt;p&gt;MSDN provides more detail on the &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.security.membership.generatepassword.aspx"&gt;GeneratePassword method&lt;/a&gt;. Sadly it only allows up to 128 characters in length.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disclaimer: The information on this site is provided &amp;quot;AS IS&amp;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3469906" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/PowerShell/" /></entry><entry><title>Identifying a system deployed via OSD</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/12/08/identifying-a-system-deployed-via-osd.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/12/08/identifying-a-system-deployed-via-osd.aspx</id><published>2011-12-09T01:46:55Z</published><updated>2011-12-09T01:46:55Z</updated><content type="html">&lt;p&gt;I’m starting a DCM project for a customer and one of the requirements is to determine whether a system was deployed via a ConfigMgr task sequence.&amp;#160; This seemed like a simple request but initially stymied me as to how to best implement it with a significant level of authority that cannot be easily circumvented.&amp;#160; I came up with the following options, along with input from colleagues:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Key off of a registry or environment variable tattoo.&amp;#160; This was rejected as too easy to circumvent making a hand-built system appear compliant.&amp;#160; But that could be paired with a WMI tattoo as well, making it slightly more complicated to get around.&amp;#160; The MDT Tattoo task could potentially fit the bill for both the registry and WMI branding.&lt;/li&gt;    &lt;li&gt;Use a script to parse HKLM:\SOFTWARE\Microsoft\SMS\Mobile Client\Software Distribution\Execution History for entries where _ProgramID = [char]42 (aka “*”), where&amp;#160; and then potentially comparing the _RunStateTime with the InstallDate attribute from Win32_OperatingSystem (to within a timeframe such as 12 hours).&amp;#160; A bit more complicated to circumvent, but can cause issues when non-OSD task sequences are used, unless the specific package ID is included in the query.&lt;/li&gt;    &lt;li&gt;Parse smsts.log.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;From this discussion I received an interesting tidbit from Nate Bachmeier, a ConfigMgr SDET, to look for a registry key named CM_DSLID. A quick search on a Windows 7 64-bit workstation yielded the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion     &lt;br /&gt;CM_DSLID = P01:C0100123&lt;/p&gt;    &lt;p&gt;HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion     &lt;br /&gt;MC_DSLID = C0100045&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In this example, P01 is the primary site to which the system is assigned, C0100123 is the task sequence ID (C01 is the central site) and C0100045 is the OS image package ID.&lt;/p&gt;  &lt;p&gt;Michael Niehaus pointed out that MDT has some logic in ZTITatoo.wsf to create the second key if _SMSTSPackageID is populated.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disclaimer: The information on this site is provided &amp;quot;AS IS&amp;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3469905" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /><category term="DCM" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/DCM/" /></entry><entry><title>Throw more logs on the fire</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/10/17/throw-more-logs-on-the-fire.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/10/17/throw-more-logs-on-the-fire.aspx</id><published>2011-10-18T03:00:19Z</published><updated>2011-10-18T03:00:19Z</updated><content type="html">&lt;p&gt;I was recently having a conversation with a coworker about ways to troubleshoot an automated installation process and describing how to inject further logging into the process.&amp;nbsp;&amp;nbsp;Instead of running the command line setup.exe, I suggested he run a simple command file (setup.cmd) with something like&amp;nbsp;the following:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;@echo off&lt;br /&gt;echo %date% %time% &amp;gt; "%temp%\setup.log"&lt;br /&gt;setup.exe /q&lt;br /&gt;echo %errorlevel%&amp;nbsp;&amp;gt;&amp;gt; "%temp%\setup.log"&lt;br /&gt;echo %date% %time% &amp;gt;&amp;gt; "%temp%\setup.log"&lt;/p&gt;
&lt;p&gt;The problem was that setup.exe was not generating its usual log files as it would when successfully executing, so this is a simple way to add additional logging to the process to see a timestamp for when setup.exe was called and when it completed.&amp;nbsp; (There are obviously many different ways to add further logging, this is just one simple example.)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The point of this post is that we were standing in the hallway talking about logging and creating more logs.&amp;nbsp; One of our sales guys walked by and jokingly asked, "throw more logs on the fire?"&amp;nbsp; We laughed at his misunderstanding of the conversation, but then it occurred to me that this is a great catch phrase for adding more debug logging.&lt;/p&gt;
&lt;p&gt;So the next time you're debugging a tough script or piece of automation, shout it out: "throw more logs on the fire!"&amp;nbsp; You heard it here first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3459840" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>DCM Error for Invalid or Inconsistent Data</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/10/17/dcm-error-for-invalid-or-inconsistent-data.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/10/17/dcm-error-for-invalid-or-inconsistent-data.aspx</id><published>2011-10-18T02:47:22Z</published><updated>2011-10-18T02:47:22Z</updated><content type="html">&lt;p&gt;I created a relatively simple Configuration Manager 2007 Desired Configuration Management (DCM) configuration baseline with twenty configuration items (CIs) each with a handful of settings.&amp;nbsp; In trying to move it from a development environment into production, the baseline would fail to import on the first page of the wizard with the following error:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;The following file(s) contain invalid or inconsistent data.&lt;br /&gt;Possible causes could be:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Malformed xml data.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invalid schema.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; References to items not in the system or cab file.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Circular references among items in the cab file.&lt;br /&gt;MyBaseline.cab - The cab file references missing content or contains a circular reference.&lt;/p&gt;
&lt;p&gt;I found some other references to this error when using truly custom XML, but this content was generated using the DCM interface.&amp;nbsp; Both development and production environments are assumed to be identical (more on that later).&lt;/p&gt;
&lt;p&gt;I extracted the XML from the cabinet and used the DCM Model Verification Tool from the &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=9257"&gt;ConfigMgr Toolkit&lt;/a&gt;.&amp;nbsp; Two of the twenty CIs contained the following fatal error:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;lt;Error Severity="6" Fatal="True" Path="/tns:DesiredConfigurationDigest[1]/tns:BusinessPolicy[1]/tns:Parts[1]/tns:File[4]/tns:PropertyRules[1]/tns:DateModified[1]/tns:Rule[1]"&amp;gt;[ValidRuleSemantics] This rule only takes 1 argument.&amp;lt;/Error&amp;gt;&lt;/p&gt;
&lt;p&gt;and four of them had non-fatal warnings similar to the following:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;lt;Warning Severity="1" Fatal="False" Path="/tns:DesiredConfigurationDigest[1]/tns:BusinessPolicy[1]/tns:Parts[1]/tns:File[4]/tns:PropertyRules[1]/tns:ProductName[1]/tns:Rule[1]"&amp;gt;[ValidRuleSemantics] Potential list operand specified with unary operator.&amp;lt;/Warning&amp;gt;&lt;/p&gt;
&lt;p&gt;I tried modifying the CI XML in an effort to remove the errors and warnings, but the validity of the XML turned out to be a red herring.&amp;nbsp; On a tip from Kevin Myrup, I removed the software update CIs in the baseline, exported it again and was then able to import with no errors.&amp;nbsp; As it turned out the two environments were not identical, the specified software updates were not synchronized and available in the production environment, thus the errors.&amp;nbsp; According to Kevin if the updates are available at the target site then the baseline will import with the software update CIs included.&lt;/p&gt;
&lt;p&gt;An interesting side note: while troubleshooting this I discovered that when importing a baseline the ConfigMgr Console will cache the .CAB at %AppData%\Local\Microsoft\SCCM\DCM\Import\{&amp;lt;GUID&amp;gt;}-CabCache\&amp;lt;ImportFile&amp;gt;.cab and extract all of the .XML and .RESX files contained within at %AppData%\Local\Microsoft\SCCM\DCM\Import\{&amp;lt;GUID&amp;gt;}\&amp;lt;ImportFile&amp;gt;.cab\*.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3459837" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /><category term="DCM" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/DCM/" /></entry><entry><title>DCM and Two's Complement</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/08/24/dcm-and-two-s-complement.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/08/24/dcm-and-two-s-complement.aspx</id><published>2011-08-25T01:18:48Z</published><updated>2011-08-25T01:18:48Z</updated><content type="html">&lt;p&gt;My mathematics and computer science lesson for the day came when creating a Desired Configuration Management (DCM) configuration item (CI) setting for the TCP/IP v6 DisabledComponents registry value. (See Microsoft Support Article ID: 929852, &lt;a href="http://support.microsoft.com/kb/929852"&gt;How to disable certain Internet Protocol version 6 [IPv6] components in Windows Vista, Windows 7, and Windows Server 2008&lt;/a&gt; for more information.)&amp;nbsp; With the appropriate group policy settings applied to the target Windows 7 workstations, HKLM\SYSTEM\CurrentControlSet\Services\TCPIPv6\Parameters\DisabledComponents was set to REG_DWORD 0xffffffff, which the Registry Editor so kindly translated to the decimal value 4294967295.&lt;/p&gt;
&lt;p&gt;In the DCM CI I created a new registry setting with the validation for this value.&amp;nbsp; With the data type set to Integer, entering this large value resulted in the text validation error (red exclamation point next to the field), "Invalid integer value."&amp;nbsp; So I changed the data type to Floating Point, which allowed it to accept 4294967295.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, when I tested this against a target system it evaluated non-compliant.&amp;nbsp; The current value of the setting showed to be -1, which obviously is not equal to 4294967295.&amp;nbsp; I modified the CI setting to validate the registry value as an Integer data type, value -1, and the client then evaluated this as compliant.&lt;/p&gt;
&lt;p&gt;Perplexed, I sought the reason behind why the REG_DWORD value 0xffffffff is interpreted as -1.&amp;nbsp; I discovered the computer arithmetic concept of &lt;a href="http://en.wikipedia.org/wiki/Two%27s_complement"&gt;two's complement&lt;/a&gt;.&amp;nbsp; Pulling up the Windows 7 Calculator in Programmer mode, I switched to Hex and Dword, typed FFFF FFFF, and then switched to Dec mode, which translates to -1.&lt;/p&gt;
&lt;p&gt;While the mathematics behind this is still a bit over my head (a math major friend from college commented, "Two's complement rears its elegant ugly head") I thought I would share this for the fun (albeit dorky) lesson and yet another interesting quirk with DCM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3449038" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="DCM" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/DCM/" /></entry><entry><title>Windows PowerShell Script Library for MDT</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/06/29/windows-powershell-script-library-for-mdt.aspx" /><link rel="enclosure" type="application/zip" length="3982" href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-43-82-54/Z_2D00_Utility_5F00_v1_2D00_0a.zip" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/06/29/windows-powershell-script-library-for-mdt.aspx</id><published>2011-06-29T19:23:00Z</published><updated>2011-06-29T19:23:00Z</updated><content type="html">&lt;p&gt;At the Microsoft Management Summit 2011 in March I presented session BF21, &lt;a href="http://www.mms-2011.com/topic/details/BF21"&gt;Accelerated Scripting with the MDT Framework&lt;/a&gt;.&amp;nbsp; The session focused on using the VBScript libraries built-in to MDT to reduce the amount of time to write custom scripts and using a common framework and best practices for more lasting scripts. Some of the advantages of using the MDT framework are a common logging format and location, shared environment variables, and a whole library of helper functions for common deployment scripting activities.&lt;/p&gt;
&lt;p&gt;The MDT 2010 scripting framework is VBScript-only so that it will function in all supported operating system versions, including WinPE.&amp;nbsp; Windows PowerShell requires the .NET Framework, which unfortunately is not currently in WinPE.&amp;nbsp; There are still many scenarios in which Windows PowerShell could be quite advantageous when integrated with the MDT scripting framework.&amp;nbsp; You can execute powershell.exe with a .ps1 script from a task sequence, but you then lose all of the advantages offered by the MDT scripting framework.&lt;/p&gt;
&lt;p&gt;So I started work on a Windows PowerShell library in the same vein as the ZTIUtility.vbs script library in MDT.&amp;nbsp; The goal was to recreate some of the functions, objects and properties in the same spirit, not just explicitly rewriting the VBScript in Windows PowerShell.&amp;nbsp; Due to limited resources I had to prioritize the scope: first focusing on common logging, then the shared environment variables, and finally building the library of helper functions.&lt;/p&gt;
&lt;p&gt;(NOTE: I had hoped to release this right after MMS, possibly with some additional revision to the script, but unfortunately that was not possible.&amp;nbsp; So I'm posting this now as-is.&amp;nbsp; It is still a work-in-progress; but I hope by making this available others can benefit from it and/or build upon it.)&lt;/p&gt;
&lt;p&gt;The method that I used to integrate the library with a custom Windows PowerShell script is by simply dot-sourcing the library at the top of the custom script.&amp;nbsp; Other methods (e.g., Windows PowerShell module) may achieve better results.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;# // ...Script Header...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;# // Load Library&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;$LocalPath = split-path -parent $MyInvocation.MyCommand.Definition&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;. $LocalPath\Z-Utility.ps1&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;# // Another brilliant PoSh script goes here!&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;br /&gt;Z-Utility.ps1 v1.0 Alpha Features&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Common logging&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Standard log format for easy viewing in Trace32&lt;/li&gt;
&lt;li&gt;Location is the task sequence log path (_SMSTSLogPath) if it exists, otherwise the current TEMP directory&lt;/li&gt;
&lt;li&gt;Handles standard log entry types: Info, Warning, Error, Verbose&lt;/li&gt;
&lt;li&gt;Strings with passwords are masked (except when DEBUG = TRUE)&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Common environment&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If running from a task sequence, convert the task sequence variables to Windows PowerShell variables. For example, $Architecture = X64, $IsLaptop = True, $Make = Dell Inc., $SerialNumber = G3YGTF2, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Helper functions&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;RunWithHeartbeat&lt;/strong&gt;: Execute a command with the provided arguments, log the full command, log a message at a defined "heartbeat" interval, and log and return the exit code.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;The library will function via a Windows PowerShell script executed directly or via a task sequence, but currently it works best when called from a task sequence (to leverage the existing log path and environment variables).&amp;nbsp; To execute the script from within a task sequence, create a &lt;strong&gt;Run Command Line&lt;/strong&gt; task with the following example &lt;strong&gt;Command line&lt;/strong&gt;:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%ScriptRoot%\Custom\CustomScript.ps1"&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Attached to this post are two files, the &lt;strong&gt;Z-Utility.ps1&lt;/strong&gt; (v1.0 Alpha) script library, and &lt;strong&gt;CustomScript.ps1&lt;/strong&gt;, which simply demonstrates the current functionality of the script library.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;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 &lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3438254" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/PowerShell/" /><category term="MDT" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/MDT/" /></entry><entry><title>Maximizing Security in Configuration Manager</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/06/28/maximizing-security-in-configuration-manager.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/06/28/maximizing-security-in-configuration-manager.aspx</id><published>2011-06-29T03:18:00Z</published><updated>2011-06-29T03:18:00Z</updated><content type="html">&lt;p&gt;This post details my experience and lessons learned with hardening a System Center Configuration Manager system.&amp;nbsp; I'll review the risks and then describe the various technical components of a ConfigMgr system: Windows Server host, Internet Information Service (IIS), SQL Server and ConfigMgr itself.&amp;nbsp; Make sure to review the current product documentation on &lt;a href="http://technet.microsoft.com/en-us/library/bb680768.aspx"&gt;Security for Configuration Manager 2007&lt;/a&gt; before continuing.&lt;/p&gt;
&lt;p&gt;First let's look at some of the risks inherent to ConfigMgr.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scope of management&lt;/strong&gt;: What types of systems are to be managed?&amp;nbsp; Is it just workstations?&amp;nbsp; IT administrators, accounting, HR, mobile users?&amp;nbsp; Is the system managing servers as well?&amp;nbsp; Domain controllers, Exchange, SharePoint, SQL?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data collection&lt;/strong&gt;: There is an enormous wealth of data that can be collected from ConfigMgr clients with hardware and software inventory, much of which could be very useful to a malicious user planning an attack.&amp;nbsp; However also consider that software inventory provides the ability to obtain any file by name from the client and pull that back centrally.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Software distribution&lt;/strong&gt;: Most folks think of software distribution in terms of installing software on the managed clients.&amp;nbsp; But an administrator could package external utilities such as the SysInternals Suite or custom scripts, or use it to execute command lines built-in to Windows, all under the context of the Local System.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OS deployment&lt;/strong&gt;: You have to be very careful about the scope of management and the scope of deployment with OSD.&amp;nbsp; For example, I would expect that Windows 7 probably screams when running on server hardware.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vulnerability reports&lt;/strong&gt;: There is extremely valuable information to an attacker in the default reports.&amp;nbsp; Update and configuration compliance can be used to find vulnerable systems on the network.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network consumption&lt;/strong&gt;: ConfigMgr could be misused for a massive denial of service by flooding the network with data and consuming all bandwidth between sites by simultaneously updating all distribution points or pushing multiple large packages to all clients.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Windows Server Host General Security Considerations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Make sure the latest service pack is applied (as supported by the SQL and ConfigMgr product teams!), and that the security and critical updates are current.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Use the &lt;a href="http://technet.microsoft.com/en-us/library/cc677002.aspx"&gt;Security Compliance Manager&lt;/a&gt; (SCM) Solution Accelerator to leverage a standard security baseline, such as the Specialized Security - Limited Functionality (SSLF), and then create delta policies to relax settings as necessary (see more on this below).&lt;/li&gt;
&lt;li&gt;Use the &lt;a href="http://technet.microsoft.com/en-us/library/cc731515.aspx"&gt;Security Configuration Wizard&lt;/a&gt; (SCW) local utility to create a local configuration policy, to include lockdown of services, file permissions, firewall rules, and registry configurations.&amp;nbsp; The &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=9257"&gt;ConfigMgr Toolkit&lt;/a&gt; includes a SCW template to provide ConfigMgr role-specific settings into the wizard. On Server 2008 and later you will need to use the updated &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=433"&gt;SCW template&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Windows Server: User Rights Assignment&lt;/h3&gt;
&lt;p&gt;These were determined through analysis of the system during installation as well as review of the product documentation.&amp;nbsp; The SQL Server documentation in particular has excellent details on the specific security rights and permissions that are required for service accounts.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Adjust memory quotas for a process&lt;/strong&gt; (&lt;em&gt;SQL 2008&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bypass traverse checking&lt;/strong&gt; (&lt;em&gt;SQL 2008&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Impersonate a client after authentication&lt;/strong&gt; (&lt;em&gt;IIS 7&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Log on as a batch job&lt;/strong&gt; (&lt;em&gt;IIS 7&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Log on as a service&lt;/strong&gt; (&lt;em&gt;SQL 2008&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Replace a process level token&lt;/strong&gt; (&lt;em&gt;SQL 2008&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following two rights are not typically required with ConfigMgr on Server 2008 R2.&amp;nbsp; &lt;strong&gt;Debug programs&lt;/strong&gt; is not required for installation or runtime, but you can&amp;rsquo;t upgrade or uninstall any ConfigMgr components unless the logged on user has this right.&amp;nbsp; The Server 2003 SSLF Member Server baseline removed this right from the local Administrators, but that is no longer the case with the Server 2008 R2 SSLF member server baseline.&amp;nbsp; IIS 7 changes the way in which it allows anonymous access so the right, &lt;strong&gt;Deny access to this computer from the network&lt;/strong&gt;, is no longer necessary either.&lt;/p&gt;
&lt;h3&gt;Windows Server: System Services&lt;/h3&gt;
&lt;p&gt;The SSLF baseline does not enforce any system service restrictions, so I developed additions to the delta policy based upon analysis of the system, output of the Security Configuration Wizard, and information from the &lt;a href="http://technet.microsoft.com/en-us/library/dd349791.aspx"&gt;Threats and Countermeasures&lt;/a&gt; documentation for Windows Server.&amp;nbsp; The ConfigMgr SCW template can help with the services configuration for product-added services that are required.&amp;nbsp; Careful analysis is required of the various components in the specific customer environment to determine whether individual services are required or not.&amp;nbsp; Disabling default system services may reduce the attack footprint of the server, but is not recommended due to the likelihood of system instability and establishment of an unsupported state.&lt;/p&gt;
&lt;p&gt;Service configuration can also be used to block additional components that may be inadvertently added. For example, the policy can include explicit settings to disable services like Active Directory Domain Services, Client for NFS, FTP Server, Remote Desktop License Server, or Windows SharePoint Services so that even if a system administrator attempts to add the component in the future, it cannot run due to policy.&lt;/p&gt;
&lt;h3&gt;Windows Server: Security Options&lt;/h3&gt;
&lt;p&gt;There are a few additional settings that may need to be included with the ConfigMgr delta policy.&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MSS: (NtfsDisable8dot3NameCreation) Enable the computer to stop generating 8.3 style filenames&lt;/strong&gt;&lt;br /&gt;ConfigMgr 2007 requires that NTFS 8.3 name creation is enabled due to an issue with Windows Installer and the ConfigMgr Administrator Console.&amp;nbsp; The Server 2003 SSLF member server baseline enables this setting which disables short file name creation, but this is no longer the case with newer baselines.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MSS: (AutoShareWks) Enable Administrative Shares&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MSS: (AutoShareServer) Enable Administrative Shares&lt;/strong&gt;&lt;br /&gt;ConfigMgr clients must have the Windows administrative shares, such as admin$, enabled in order to be properly managed.&amp;nbsp; While these two settings are not included with the SSLF baseline, other security guidance may recommend the use of these settings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing&lt;/strong&gt;&lt;br /&gt;FIPS is one of the most commonly deviated settings because it will quickly break many products that do not use FIPS-compliant algorithms.&amp;nbsp; I have yet to find any aspect of a ConfigMgr system that is significantly affected by enabling FIPS, with one (optional) exception: SQL Server 2008 Reporting Services (see below).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Windows Server: Windows Firewall&lt;/h3&gt;
&lt;p&gt;Windows Server 2008 R2 SSLF Member Server baseline requires the use of the Windows Firewall and blocks all incoming connections.&amp;nbsp; While there are good in-box rules to allow common functions such as file sharing and remote administration, custom rules will need to be defined to allow ConfigMgr clients and other site systems to access the site server.&amp;nbsp; This is best configured via the delta group policy for ConfigMgr so that the connection rules are centralized and enforced.&amp;nbsp; The ConfigMgr documentation has a very thorough data flow diagram for all necessary network connections: &lt;a href="http://technet.microsoft.com/en-us/library/bb632618.aspx"&gt;Ports Used by Configuration Manager&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;SQL Server&lt;/h3&gt;
&lt;p&gt;With SQL for ConfigMgr the only requirement is the &lt;strong&gt;Database Engine&lt;/strong&gt; and nothing else.&amp;nbsp; Unless of course you&amp;rsquo;re using a Reporting Services Point in which case you&amp;rsquo;ll also need to add Reporting Services.&amp;nbsp; Ideally you just install the database and then components such as the Tools and Docs can be installed on a workstation for remote administrative use.&amp;nbsp; I typically add the Tools and Docs along with the Database Engine simply for convenience.&amp;nbsp; As with Windows, make sure SQL is patched (as supported by ConfigMgr!) and apply the latest cumulative update.&amp;nbsp; The Best Practices Analyzer is useful to review your configuration settings against known SQL best practices.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I always disable the &lt;strong&gt;SQL Browser&lt;/strong&gt; service as part of the SQL hardening, which can make it difficult to connect to the database from a remote system, such as a child site server or proxy management point.&amp;nbsp; By installing the SQL Native Client on the remote system and configuring a SQL connection alias, this will provide a pathway to the SQL database engine on the ConfigMgr site server.&amp;nbsp; This maintains the SQL hardening so that it is not discoverable on the network but provides the same functionality for the remote endpoint.&lt;/p&gt;
&lt;p&gt;The use of service accounts is a SQL best practice instead of local system or other built-in service accounts.&amp;nbsp; A domain service account is required for ConfigMgr in order to provide Kerberos authentication.&amp;nbsp; So then you have to ensure that the &lt;strong&gt;service principle names&lt;/strong&gt; (SPNs) are set correctly for both the NetBIOS and Fully Qualified Domain Name of the server with the correct TCP port.&amp;nbsp; Alternatively, you can assign the &lt;strong&gt;Write Public Information&lt;/strong&gt; permission to &lt;strong&gt;Self&lt;/strong&gt; on the SQL service account.&lt;/p&gt;
&lt;p&gt;Note that it is not supported to change the SQL listening port for SQL Server instances hosting Configuration Manager site databases.&amp;nbsp; Use of a &lt;strong&gt;named instance&lt;/strong&gt; is recommended for a variety of reasons, namely a non-standard configuration and the associated non-standard port.&amp;nbsp; The following Microsoft Support article should be used to set a static port for named instances: &lt;a href="http://support.microsoft.com/kb/823938"&gt;How to configure an instance of SQL Server to listen on a specific TCP port or dynamic port&lt;/a&gt;. This is needed for static configuration of Windows Firewall rules and SQL Native Client connection aliases.&lt;/p&gt;
&lt;p&gt;Since the delta policy has to deviate several user rights assignments for SQL to function, a large environment with multiple sites will need multiple SQL service accounts for each site.&amp;nbsp; Instead of requiring a modification to the security policy when a new SQL service account is needed, I recommend the use of a local security group on each server.&amp;nbsp; The domain SQL service accounts are added to the local group, and the local group is specified by name in the delta policy for each of the necessary user rights assignments.&lt;/p&gt;
&lt;p&gt;Finally, there is a security configuration inside the SQL Server Configuration Manager on the network configuration for the instance where you can add a certificate (the same one used by IIS if desired) and then &lt;strong&gt;force encryption&lt;/strong&gt; for connections to the server.&amp;nbsp; See &lt;a href="http://technet.microsoft.com/en-us/library/ms189067.aspx"&gt;Encrypting Connections to SQL Server&lt;/a&gt; for details on configuring this.&amp;nbsp; This configuration option can also prevent the SQL Server Browser service from making the instance known to client computers, which is good to specify even if the SQL Browser service is disabled.&amp;nbsp; As ConfigMgr typically uses a dedicated SQL server there is no need for any system on the network to be able to discover the instance without previous knowledge of its existence.&lt;/p&gt;
&lt;p&gt;There are two modifications that need to be made to for this configuration to function with ConfigMgr.&amp;nbsp; First, the domain SQL service account needs rights to the private key. Previously with Windows Server 2003 you needed to use the &lt;strong&gt;winhttpcertcfg&lt;/strong&gt; utility.&amp;nbsp; With Windows Server 2008 R2 it's as simple as opening the &lt;strong&gt;Certificates&lt;/strong&gt; console for the Local Computer, right-clicking the certificate, selecting &lt;strong&gt;All Tasks&lt;/strong&gt; and selecting the &lt;strong&gt;Manage Private Keys&lt;/strong&gt; option.&amp;nbsp; By default SYSTEM and Administrators have Full Control, so the domain SQL service account should be added with &lt;strong&gt;Read&lt;/strong&gt; permission.&lt;/p&gt;
&lt;p&gt;The second modification is in the SQL Server Management Studio.&amp;nbsp; In the Security node, open the properties of the &lt;strong&gt;NT AUTHORITY\SYSTEM&lt;/strong&gt; context, select &lt;strong&gt;User Mapping&lt;/strong&gt;, select the &lt;strong&gt;master&lt;/strong&gt; database and add the &lt;strong&gt;db_owner&lt;/strong&gt; role.&amp;nbsp; This may be overly generous, but does allow remote client connections, for example from a child site server, to automatically raise the encryption level during the connection negotiation.&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;SQL Server 2008 Reporting Services&lt;/h3&gt;
&lt;p&gt;For SSRS to function with FIPS-compliant algorithms, ASP.NET must be configured to use 3DES:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Edit &lt;strong&gt;&amp;lt;Drive&amp;gt;:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportManager\Web.config&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;&amp;lt;system.web&amp;gt;&lt;/strong&gt; section and add the following:&lt;br /&gt;&amp;lt;machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="3DES" decryption="3DES"/&amp;gt;&lt;/li&gt;
&lt;li&gt;Save and close &lt;strong&gt;Web.config&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;(These steps are from &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/f60cbb51-bf6b-4b6a-b30e-db3096355392"&gt;Xiao Min Tan&lt;/a&gt;.)&lt;/p&gt;
&lt;h3&gt;Internet Information Services&lt;/h3&gt;
&lt;p&gt;First review the &lt;a href="http://technet.microsoft.com/en-us/library/bb694127.aspx"&gt;Best Practices for Securing Site Systems&lt;/a&gt; for general guidance but also specific to IIS.&amp;nbsp; The primary guidance is to use role separation so that IIS is only installed for site systems that require it.&lt;/p&gt;
&lt;p&gt;IIS 7 on Server 2008 or IIS 7.5 on Server 2008 R2 requires a custom script run after installation to move the Inetpub directory.&amp;nbsp; After the installation of IIS it&amp;rsquo;s easy enough to run a configuration script to create the custom website and port for use by ConfigMgr, which must be named &lt;strong&gt;SMSWEB&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Remove the default content so that when accessing the base server URL it does not return the default, sample &amp;ldquo;Welcome to IIS&amp;rdquo; content.&amp;nbsp; This default content is not needed; it can be safely deleted without impacting ConfigMgr or WSUS.&amp;nbsp; The websites can also be configured to disable default content so that another administrator can&amp;rsquo;t drop an index.htm file into a directory that will be the first page to load.&amp;nbsp; While SSL is the default for Native Mode sites, if possible, SSL should be enabled and enforced for reporting in Mixed Mode sites.&lt;/p&gt;
&lt;p&gt;Some will argue whether these sorts of customizations are necessary and can be considered a security feature.&amp;nbsp; Every customer security team with which I&amp;rsquo;ve worked prefers non-standard configurations.&amp;nbsp; While "security by obscurity" is not going to stop a determined attacker from accessing the system, multiple layers of these configurations can deter some attackers and slow down others.&lt;/p&gt;
&lt;h3&gt;Configuration Manager&lt;/h3&gt;
&lt;p&gt;Leverage the custom website and custom port defined during the IIS configuration.&amp;nbsp; During configuration of the ConfigMgr site, there&amp;rsquo;s a checkbox in the Site settings that allows the data to be encrypted between the client and management point.&amp;nbsp; It&amp;rsquo;s a very simple thing, which does add some overhead because both the client and the server are now encrypting the data, but it definitely adds a significant additional layer of security.&amp;nbsp; See &lt;a href="http://technet.microsoft.com/en-us/library/bb632562.aspx"&gt;How to Encrypt Client to Management Point Data in Mixed Mode&lt;/a&gt; for details.&lt;/p&gt;
&lt;p&gt;Block console access to TechNet, similar to the Internet Communication Management settings in group policy.&amp;nbsp; Add a &lt;strong&gt;DWORD&lt;/strong&gt; value named &lt;strong&gt;DisableHomePage&lt;/strong&gt; in the registry key &lt;strong&gt;HKLM\Software\Microsoft\ConfigMgr\AdminUI&lt;/strong&gt;.&amp;nbsp; (See &lt;a href="http://technet.microsoft.com/en-us/library/cc431367.aspx"&gt;How to Prevent the Home Page from Downloading the TechCenter Page on Microsoft.com&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Use Native Mode security when possible, but when using Mixed Mode security ensure it is Active Directory-integrated for centralized trust.&lt;/p&gt;
&lt;p&gt;Use the advertisement option to &lt;strong&gt;Download...and run locally&lt;/strong&gt;.&amp;nbsp; While you have to ensure you properly configure and manage the client cache, the client will checksum the content after it is downloaded and compare against the hash of the original package source, not just what&amp;rsquo;s on the distribution point.&amp;nbsp; This helps protect against a man-in-the-middle attack by ensuring the content is valid prior to execution.&lt;/p&gt;
&lt;p&gt;I recommend the use of what I call an &lt;strong&gt;installation service account&lt;/strong&gt;.&amp;nbsp; This is just a normal user account in Active Directory with no additional rights at first.&amp;nbsp; You can assign the specific rights that are necessary in the environment, such as administrative rights to the site server, sysadmin rights to SQL, etc.&amp;nbsp; Then all of the product installation and configuration is done under the context of this service account.&amp;nbsp; When all is done the rights are taken away and the account is either deleted or disabled for potential future use.&amp;nbsp; The idea is that this is a well-scoped security context during installation.&amp;nbsp; If you use the administrative account of a member of the implementation team, they may have other permissions elsewhere that may affect the outcome of the installation.&amp;nbsp; If you have control over the scope of the installation then you know exactly what it can and cannot do.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Network Access&lt;/strong&gt; and &lt;strong&gt;Domain Join&lt;/strong&gt; accounts are typical service accounts that are often required.&amp;nbsp; The Network Access service account is a very low rights user in Active Directory, used purely for authentication to the server when other methods of authentication are not available (such as in Windows PE during OS deployment).&amp;nbsp; The Domain Join account will need additional permissions in Active Directory to allow computers to be automatically joined to the domain during OS deployment, but those permissions can be carefully scoped to a specific OU.&lt;/p&gt;
&lt;p&gt;I recommend avoiding &lt;strong&gt;Client Push Installation&lt;/strong&gt;.&amp;nbsp; This is one area where the concept of security versus functionality really comes out.&amp;nbsp; From a functional standpoint, client push is great: right-click, install client.&amp;nbsp; From a security standpoint, however, it requires storing administrative credentials, of either a named administrative user or a generic service account with administrative rights.&amp;nbsp; I don&amp;rsquo;t think either of these options is worth the functional gain, especially when there are many other methods by which the client can be installed.&lt;/p&gt;
&lt;p&gt;Finally, Active Directory security groups should be used for various roles that are required to access the system: Administrators, Operators, Reporting Users, Auditors.&amp;nbsp; This is just an example of a few; a large environment will probably have many more roles, especially of the operational type: this group installs software, this group installs updates, etc.&amp;nbsp; With ConfigMgr 2012 these can be easily assigned to specific roles in the console, whereas with ConfigMgr 2007 you have to assign the specific rights for each class to the security group.&lt;/p&gt;
&lt;p&gt;The Auditors group can be added to the SMS Admins local group on the site server, but no additional rights in the ConfigMgr 2007 console.&amp;nbsp; This will allow an auditor to open the console, see all of the nodes and the security of each, but no other content in the console.&amp;nbsp; It&amp;rsquo;s a great way to give the auditing team or security team access to view the rights in the ConfigMgr console without granting rights to see anything else.&lt;/p&gt;
&lt;h3&gt;Other Security Considerations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IPsec between site servers to ensure that intersite communication is secure and/or encrypted&lt;/li&gt;
&lt;li&gt;Additional WSUS lockdown to enforce SSL and requiring mutual authentication&lt;/li&gt;
&lt;li&gt;Additional SSRS lockdown&lt;/li&gt;
&lt;li&gt;WDS/PXE security&lt;/li&gt;
&lt;li&gt;DCM for component configuration compliance&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In planning for a secure ConfigMgr implementation make sure to look at each component individually.&amp;nbsp; The product teams for Windows, IIS, SQL, WSUS, etc., have provided some great documentation on how to secure that component.&amp;nbsp; They must be kept in the context of the integrated ConfigMgr system, however, as they all must work together for a secure and functional system.&lt;/p&gt;
&lt;p&gt;There are a lot of best practices and security standards from both Microsoft and other parties.&amp;nbsp; Standard baselines should be used whenever possible as they have already undergone some level of testing so will help accelerate your work.&lt;/p&gt;
&lt;p&gt;Even in environments that don&amp;rsquo;t have rigorous corporate, government or regulatory requirements for security, these configurations can be implemented to raise the security level of the ConfigMgr system and its components.&amp;nbsp; There are risks with every ConfigMgr implementation and these are practical methods that can be used in any environment to help secure the system.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;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.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3438066" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="Security" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/Security/" /><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /><category term="SQL" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/SQL/" /><category term="IIS" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/IIS/" /></entry><entry><title>MMS 2011 Labs powered by Hyper-V, System Center &amp; HP...</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/03/29/mms-2011-labs-powered-by-hyper-v-system-center-amp-hp.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/03/29/mms-2011-labs-powered-by-hyper-v-system-center-amp-hp.aspx</id><published>2011-03-30T00:32:54Z</published><updated>2011-03-30T00:32:54Z</updated><content type="html">&lt;p&gt;I usually don't cross-post, but this is just too cool.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/b/virtualization/archive/2011/03/29/mms-2011-labs-powered-by-hyper-v-system-center-amp-hp.aspx"&gt;http://blogs.technet.com/b/virtualization/archive/2011/03/29/mms-2011-labs-powered-by-hyper-v-system-center-amp-hp.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3416983" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Error starting RemoteFX VM with unsupported GPU</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/03/13/error-starting-remotefx-vm-with-unsupported-gpu.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/03/13/error-starting-remotefx-vm-with-unsupported-gpu.aspx</id><published>2011-03-14T01:00:07Z</published><updated>2011-03-14T01:00:07Z</updated><content type="html">&lt;p&gt;A bit off-topic for most of the posts on this blog...I didn't see this posted anywhere else in this context so I thought I'd share.&amp;nbsp; I'm working on a &lt;a href="http://technet.microsoft.com/en-us/library/ff817578.aspx"&gt;RemoteFX&lt;/a&gt; prototype for a customer and have a HP Z600 Workstation with a Nvidia Quadro NVS 450 video adapter that I'm using as the server running Windows Server 2008 R2 SP1 with Hyper-V and RemoteFX.&amp;nbsp; When trying to start the virtual machine Hyper-V Manager returns the following error.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;An error occurred while attempting to start the selected virtual machine(s).&lt;br /&gt;'rfx01' failed to start.&lt;br /&gt;Microsoft Synthetic 3D Display Controller (Instance ID {GUID}): Failed to Power on with Error 'Insufficient system resources exist to complete the requested service.' (0x800705AA)&lt;/p&gt;
&lt;p&gt;I examined the &lt;strong&gt;Applications and Services Logs\Microsoft\Windows\RemoteDesktopServices-RemoteFX-SessionManager\Admin&lt;/strong&gt; log and found the following:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;Event ID: 14&lt;br /&gt;Level: Error&lt;br /&gt;Description: The GPU named NVIDIA Quadro NVS 450 does not meet the minimum requirements for RemoteFX.&amp;nbsp; This GPU will not be used for Remote FX.&amp;nbsp; GPU: NVIDIA Quadro NVS 450.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;Event ID: 3&lt;br /&gt;Level: Critical&lt;br /&gt;Description: The GPU or system resources are insufficient for this server to run as a RemoteFX host.&amp;nbsp; Verify this server's hardware against the requirements.&amp;nbsp; Status Code: 10.&lt;/p&gt;
&lt;p&gt;While the error when starting the VM is a bit cryptic the others are fairly self-explanatory.&lt;/p&gt;
&lt;p&gt;Nvidia has a &lt;a href="http://blogs.nvidia.com/2011/02/it%e2%80%99s-here%e2%80%94nvidia-quadro-driving-virtual-desktops-with-microsoft-remotefx/"&gt;blog post&lt;/a&gt; that lists their current GPUs that support RemoteFX; the Quadro NVS 450 did not make the cut.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3412424" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>MMS 2011 Session</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/03/13/mms-2011-session.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/03/13/mms-2011-session.aspx</id><published>2011-03-14T00:32:26Z</published><updated>2011-03-14T00:32:26Z</updated><content type="html">&lt;p&gt;A little self-promotion....&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.mms-2011.com/topic/details/BF21"&gt;&lt;strong&gt;BF21 Accelerated Scripting with the MDT Framework&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Speaker(s): &lt;a href="http://www.mms-2011.com/Speaker/Details/Aaron_Czechowski"&gt;Aaron Czechowski&lt;/a&gt;&lt;br /&gt;Track(s): Server Management Technologies, Solution Accelerators, Systems Management&lt;br /&gt;Session Type: Breakout Session&lt;br /&gt;Product(s): Configuration Manager 2007 R2 &amp;amp; R3, Microsoft Deployment Toolkit, Solution Accelerators, Windows PowerShell&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;This session will help you accelerate and standardize your VBScript or Windows PowerShell scripts using a proven framework. We will demonstrate helper functions from the Microsoft Deployment Toolkit script library as well as a new Windows PowerShell library, and how you can incorporate your custom scripts. Topics include simplified logging, a shared variable environment, common functions, accessing INI/XML files, use within MDT and ConfigMgr task sequences, and general best practices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3412421" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/PowerShell/" /><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /><category term="MDT" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/MDT/" /><category term="VBScript" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/VBScript/" /></entry><entry><title>WSF whatif parameter</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2011/01/11/wsf-whatif-parameter.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2011/01/11/wsf-whatif-parameter.aspx</id><published>2011-01-12T01:03:24Z</published><updated>2011-01-12T01:03:24Z</updated><content type="html">&lt;p&gt;Writing custom scripts for MDT and/or MDT-integrated ConfigMgr task sequences should leverage the common scripting framework in MDT (WSF script referencing ZTIUtility.vbs) to take advantage of the provided features, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;centralized logging (e.g, C:\MININT\SMSOSD\OSDLOGS)&lt;/li&gt;
&lt;li&gt;shared environment variables&lt;/li&gt;
&lt;li&gt;helper functions for common tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When using this scripting framework it can be complicated to test a script and/or entire task sequence without having it actually perform what it is intended to do.&amp;nbsp; The &lt;strong&gt;/debug:true&lt;/strong&gt; command-line parameter will enable any oLogging.CreateEntry commmands of type LogTypeVerbose which can be used to provide more detailed logging output, but the script will still execute the desired commands.&amp;nbsp; PowerShell provides a standard -whatif parameter that describes what would happen if you executed the command without actually executing the command, so I developed the following add-ons for WSF scripts and task sequences to provide a similar functionality.&lt;/p&gt;
&lt;p&gt;This is done by creation of a new command line parameter, &lt;strong&gt;/whatif:#&lt;/strong&gt;.&amp;nbsp; This parameter accepts an integer value (&lt;strong&gt;#&lt;/strong&gt;) which is used during script execution as the return code from any command that would be executed.&amp;nbsp; For example:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;cscript %DeployRoot%\Scripts\Custom\INSTALL-ReportViewer.wsf /debug:true /whatif:0&lt;/p&gt;
&lt;p&gt;In this example the INSTALL-ReportViewer.wsf script will be run with debug enabled (so all LogTypeVerbose entries will be written), whatif processing will occur, and the sample return code will be 0 (success).&lt;/p&gt;
&lt;p&gt;The WSF script must be modified such that any line that performs any modification to the system is configured to handle the whatif parameter.&amp;nbsp; Consider the following sample lines from the original INSTALL-ReportViewer.wsf:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;sFile = oUtility.ScriptDir &amp;amp; "\source\reportviewer.exe"&lt;br /&gt;iRetVal = oShell.Run("""" &amp;amp; sFile &amp;amp; """ /q:u /c:""install /qb""", 0, True)&lt;/p&gt;
&lt;p&gt;This needs to be modified as such to handle the new whatif parameter:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;sFile = oUtility.ScriptDir &amp;amp; "\source\reportviewer.exe"&lt;br /&gt;sCmd = """" &amp;amp; sFile &amp;amp; """ /q:u /c:""install /qb"""&lt;br /&gt;If Not oEnvironment.Exists("whatif") Then&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "INSTALL ReportViewer: about to run the command: ", &amp;amp; sCmd, LogTypeInfo&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; iRetVal = oShell.Run(sCmd,0,true)&lt;br /&gt;Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oLogging.CreateEntry "INSTALL Report Viewer: **DEBUG** WhatIf command: " &amp;amp; sCmd, LogTypeVerbose&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; iRetVal = oEnvironment.Item("whatif")&lt;br /&gt;End If&lt;/p&gt;
&lt;p&gt;It results in more lines of code in the script, but allows for greater functionality when running the script.&lt;/p&gt;
&lt;p&gt;To add this functionality into a task sequence for tasks that do not execute a WSF script (e.g., Add Role or Feature), the following condition can be set to skip the task when whatif is enabled:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;If none of the conditions are true&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Task sequence variable whatif exists&lt;/p&gt;
&lt;p&gt;(This logic is for the MDT task sequence engine, the ConfigMgr task sequence engine logic may be slightly different.)&lt;/p&gt;
&lt;p&gt;If the whatif environment variable is set before or during execution of the task sequence, then a task with the above condition will be skipped.&lt;/p&gt;
&lt;p&gt;The whatif parameter, along with /debug:true, allows for detailed testing of the script and task sequence without "arming" either with a destructive payload.&amp;nbsp; Since no changes will be made to the system the script or task sequence can be quickly run repeatedly to test functionality during development.&amp;nbsp; The real benefit of this is gained by adding detailed LogTypeVerbose log entries to the script so that the log file can be analyzed to trace the script.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3379684" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="MDT" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/MDT/" /><category term="VBScript" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/VBScript/" /></entry><entry><title>Texts with my wife</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2010/09/02/texts-with-my-wife.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2010/09/02/texts-with-my-wife.aspx</id><published>2010-09-03T01:55:11Z</published><updated>2010-09-03T01:55:11Z</updated><content type="html">&lt;p&gt;This is probably the only place where I can post these and get some level of appreciation.&amp;nbsp; While I was at TechReady in July, I sent texts to my wife who sent back some witty replies.&amp;nbsp; I must note that while she might come off quite dim, it's all meant in jest.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A: &lt;/strong&gt;Ok, I'll be fresh out of a session on Opalis. :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;D: &lt;/strong&gt;I didn't realize this was a gem show!&amp;nbsp; Do they have rubies?&amp;nbsp; I much prefer those over opals.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;D: &lt;/strong&gt;R u lrng about sapphires today?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A: &lt;/strong&gt;Not today - office volume activation right now - woot!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;D: &lt;/strong&gt;I cld teach this one.&amp;nbsp; The more volume in a room the more active it is.&amp;nbsp; Noise volume that is.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A: &lt;/strong&gt;I need to go learn about SQL Replication&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;D: &lt;/strong&gt;I thought squirrels replicated themselves quite well-a lot like bunnies. I think you should be learning about computer thinga ma bobs and not squirrels. First it is gems and now rodents-something is amiss.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;D: &lt;/strong&gt;Hope u r having a good day-no squirrel duplications today?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A: &lt;/strong&gt;Not today. Highlight so far was vNext migration lab with wally always a fun time. User data virtualization was insightful too. DCM right now.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;D: &lt;/strong&gt;I hope it is a good concert. Dcm is not as well know as their brother band dmb!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A: &lt;/strong&gt;Just one more session on driver deployment, then i'm done!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;D: &lt;/strong&gt;Alright now i really know this is not a business trip. Driver deployment sounds like a handy name for a golf game or what the dmv shld call their lisc dept.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3353443" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Running netsh in ConfigMgr task sequence on x64 client</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2010/07/09/running-netsh-in-configmgr-task-sequence-on-x64-client.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="1432" href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-34-32-30/CustomSetTcpAutoTuning.zip" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2010/07/09/running-netsh-in-configmgr-task-sequence-on-x64-client.aspx</id><published>2010-07-09T21:04:00Z</published><updated>2010-07-09T21:04:00Z</updated><content type="html">&lt;p&gt;In deploying Windows 7 x64 via a ConfigMgr 2007 SP2 task sequence I have a custom script to change the TCP Global Receive Window Auto-Tuning Level.&amp;nbsp; The command that is executed via the script is:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;cmd /c netsh interface tcp set global autotuning=highlyrestricted&lt;/p&gt;
&lt;p&gt;This unfortunately returned the following error:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;Set global command failed on IPv4 The parameter is incorrect&lt;/p&gt;
&lt;p&gt;Since ConfigMgr 2007 task sequences execute as a 32-bit process, and by default use 64-bit file redirection, the shell process in use is C:\Windows\SysWOW64\cmd.exe (which is the 32-bit version on a 64-bit client). By setting the option &lt;strong&gt;Disable 64-bit file system redirection&lt;/strong&gt; on the Run Command Line task, the shell process used is C:\Windows\System32\cmd.exe (the 64-bit process).&amp;nbsp; When the same command is executed in this context, it simply returns the expected, "Ok."&lt;/p&gt;
&lt;p&gt;See the Windows Core Networking post, &lt;a href="http://blogs.msdn.com/b/wndp/archive/2007/07/05/receive-window-auto-tuning-on-vista.aspx"&gt;Receive Window Auto-Tuning on Vista&lt;/a&gt;, for more information about this setting and why you may need to change it in some circumstances.&lt;/p&gt;
&lt;p&gt;The attached file includes my custom WSF script for this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;span style="color: #0066dd;"&gt;Terms of Use&lt;/span&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3343230" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /><category term="CMD" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/CMD/" /></entry><entry><title>Failure on invalid user context with DCM permission evaluation</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2010/05/25/failure-on-invalid-user-context-with-dcm-permission-evaluation.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2010/05/25/failure-on-invalid-user-context-with-dcm-permission-evaluation.aspx</id><published>2010-05-26T03:20:04Z</published><updated>2010-05-26T03:20:04Z</updated><content type="html">&lt;div class="postcontent"&gt;
&lt;p&gt;I&amp;rsquo;m a huge fan of the Desired Configuration Management (DCM) feature of ConfigMgr.&amp;nbsp; However, I found that it can be quite literal with the input data, and the result is not always very user friendly.&amp;nbsp; For example, I created a new General Configuration Item (CI) with a single object rule to evaluate just the exclusive permissions on %WinDir%\System32\cmd.exe (no instance count or attribute verification).&amp;nbsp; The expected permissions were that Administrators and SYSTEM have Full Control, but nothing else.&lt;/p&gt;
&lt;p&gt;The interface enforces entry of the user or group prefaced with the context (e.g., domain\username), but doesn&amp;rsquo;t provide any additional guidance.&amp;nbsp; The available &lt;a href="http://technet.microsoft.com/en-us/library/bb694148.aspx" title="Enter Group or User Name Dialog Box"&gt;documentation&lt;/a&gt; notes that, "If you are specifying the name of a built in group or user, use the form BUILTIN\USER."&amp;nbsp; So I added two entries: BUILTIN\Administrators and BUILTIN\SYSTEM.&amp;nbsp; I then added the CI to a baseline, assigned it to a target collection, and updated policy to receive and evaluate the configuration.&lt;/p&gt;
&lt;p&gt;The evaluation report from the client control panel showed an evaluation failure:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Source&lt;/strong&gt;: /system/schema/ScopeID_2DF32CAA-6275-4EFD-98D4-1A1C4B24B826_BusinessPolicy_8092b0b8-27e6-4696-a33c-7b5262e4a0e1_2&lt;br /&gt;&lt;strong&gt;Category&lt;/strong&gt;: RuleProcessingError&lt;br /&gt;&lt;strong&gt;Severity&lt;/strong&gt;: ERROR&lt;br /&gt;&lt;strong&gt;Message&lt;/strong&gt;: Exception 'System.Xml.Xpath.XpathException' occurred while evaluating the expression 'mssmltrans:sdEquals(@RealSD,concat('D:',mssmltrans:sdTranslate('(A;;0x1F01FF;;;{BUILTIN\Administrators})'),mssmltrans:sdTranslate('(A;;0x1F01FF;;;{BUILTIN\SYSTEM})')), 'Access', 'ocsj')': Function 'mssmltrans:sdEquals()' has failed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The Application event log on the client shows an error of event ID 11864 from source SmsClient with the description: "Baseline content ScopeID_..., version 2 has model violations."&amp;nbsp; The same message appears as a status message from the client on the primary site server.&lt;/p&gt;
&lt;p&gt;All of this had me quite stumped, but some of the text inside of the error (A;;0x1F01FF;;;) looked like security descriptor definition language (SDDL), and with the names of functions like sdTranslate and sdEquals, I decided to take a look at the security descriptors on the file.&lt;/p&gt;
&lt;p&gt;I ran the following command on the client to display the SDDL&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;cacls c:\windows\system32\cmd.exe /s&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;which yielded:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;"D:(A;;0x1200a9;;;IU)(A;;0x1200a9;;;SU)(A;;FA;;;BA)(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-2037546026-41271002)"&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So I knew I was on the right track.&amp;nbsp; As I was working with this I happened to run cacls without the /s parameter, which yielded:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;NT AUTHORITY\INTERACTIVE:R&lt;br /&gt;NT AUTHORITY\SERVICE:R&lt;br /&gt;BUILTIN\Administrators:F&lt;br /&gt;NT AUTHORITY\SYSTEM:F&lt;br /&gt;BUILTIN\Administrators:F&lt;br /&gt;SRV03\TelnetClients:R&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It was at this point that I smacked my forehead.&amp;nbsp; I revised the CI replacing "BUILTIN\SYSTEM" with "NT AUTHORITY\SYSTEM" and upon re-evaluation, no more failures.&amp;nbsp; (The client was non-compliant with the CI, but at least was able to successfully evaluate the setting.)&lt;/p&gt;
&lt;p&gt;This was most certainly user error; I should have known better to use the NT AUTHORITY context for SYSTEM instead of BUILTIN.&amp;nbsp; However, in my opinion,&amp;nbsp;the client did not do a good job of reporting the error, the CI interface did not do a good job of providing context-sensitive help, and the product documentation did not provide a broader scope of available options.&amp;nbsp; The client&amp;nbsp;reporting&amp;nbsp;an error such as, "User BUILTIN\SYSTEM not found" (perhaps with the additional debugging detail)&amp;nbsp;would have been more useful.&lt;/p&gt;
&lt;strong&gt;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 &lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;Terms of Use&lt;/a&gt;.&lt;/strong&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3333604" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /><category term="DCM" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/DCM/" /></entry><entry><title>DCM Multiline Operators</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/aaronczechowski/archive/2010/05/02/dcm-multiline-operators.aspx" /><id>http://blogs.technet.com/b/aaronczechowski/archive/2010/05/02/dcm-multiline-operators.aspx</id><published>2010-05-03T00:32:00Z</published><updated>2010-05-03T00:32:00Z</updated><content type="html">&lt;p&gt;I recently had the opportunity to use the &lt;strong&gt;One of&lt;/strong&gt; operator on a CI validation of a registry integer value.&amp;nbsp; While trying to input the multiple values (1, 3, 4 or 5) using a variety of delimiters (space, comma, semi-colon, etc.), I kept getting a UI error: "Invalid integer. Specify one value per line."&amp;nbsp; The UI does not appear to provide the ability to enter multiple lines in the text control field, but I was able to copy/paste from Notepad and make it work.&amp;nbsp; I later discovered that you can type the first value and then press CTRL + Enter to insert a new line for the next value.&amp;nbsp; Once multiple lines are present, the scroll arrows on the text field are enabled.&amp;nbsp; The Expression field will display the values with what appears to be a space between each, for example:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[TestSetting] One of&amp;nbsp; 1 3 4 5&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This should also hold true for the &lt;strong&gt;None of&lt;/strong&gt; operator.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;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 &lt;/strong&gt;&lt;a href="http://www.microsoft.com/info/cpyright.mspx"&gt;&lt;strong&gt;Terms of Use&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3329775" width="1" height="1"&gt;</content><author><name>aaroncz</name><uri>http://blogs.technet.com/aaroncz/ProfileUrlRedirect.ashx</uri></author><category term="ConfigMgr" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/ConfigMgr/" /><category term="DCM" scheme="http://blogs.technet.com/b/aaronczechowski/archive/tags/DCM/" /></entry></feed>