<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MattLog.net &#187; Uncategorized</title>
	<atom:link href="http://mattlog.net/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattlog.net</link>
	<description>All things IT Pro</description>
	<lastBuildDate>Mon, 19 Dec 2011 04:10:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to find SCCM duplicate computer objects</title>
		<link>http://mattlog.net/2011/12/19/how-to-find-sccm-duplicate-computer-objects/</link>
		<comments>http://mattlog.net/2011/12/19/how-to-find-sccm-duplicate-computer-objects/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 04:10:16 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=374</guid>
		<description><![CDATA[Fairly brief post today. One of the many tasks an SCCM admin faces is checking for ConfigMgr duplicate computer records. There are many ways that we can get duplicate records, but here are the three most common: &#160; Duplicate MAC Addresses. &#160; I normally see this in environments where VDI is common. Generally, a VDI [...]]]></description>
			<content:encoded><![CDATA[<p>Fairly brief post today.</p>
<p>One of the <em>many </em>tasks an SCCM admin faces is checking for ConfigMgr duplicate computer records. There are many ways that we can get duplicate records, but here are the three most common:</p>
<p>&nbsp;</p>
<h4>Duplicate MAC Addresses.</h4>
<p>&nbsp;</p>
<p>I normally see this in environments where VDI is common. Generally, a VDI admin has duplicated machines without giving each a unique MAC address. This is <strong>bad</strong> and should be avoided. If you&#8217;re VDI admin has created a bunch of computers with the same MAC, we need to delete them from SCCM. To find these objects, run the following TSQL query:</p>
<p>&nbsp;</p>
<pre>SELECT dbo.v_RA_System_MACAddresses.MAC_Addresses0, Count(dbo.v_R_System.Name0)</pre>
<pre>AS SystemCount FROM dbo.v_R_System
RIGHT OUTER JOIN dbo.v_RA_System_MACAddresses ON dbo.v_R_System.ResourceID =</pre>
<pre>dbo.v_RA_System_MACAddresses.ResourceID GROUP BY</pre>
<pre>dbo.v_RA_System_MACAddresses.MAC_Addresses0 ORDER BY SystemCount DESC</pre>
<p>&nbsp;</p>
<h4>Duplicate Computer Names.</h4>
<p>&nbsp;</p>
<p>These are the most common duplicate objects. Most likely this occurs due to OSD or conflicting discovery cycles. We basically end up with two computer objects, with the same name/hardware/MAC but different SMSBIOSGUID. It causes much confusion for ConfigMgr because it often doesn&#8217;t know how to process the inventory for the phantom object. To find these objects, create an SCCM Query (or query based collection) with the following Query Statement:</p>
<pre>select R.ResourceID,R.ResourceType,R.Name,R.SMSUniqueIdentifier,
R.ResourceDomainORWorkgroup,R.Client from SMS_R_System as r 
full join SMS_R_System as s1 on s1.ResourceId = r.ResourceId 
full join SMS_R_System as s2 on s2.Name = s1.Name 
where s1.Name = s2.Name and s1.ResourceId != s2.ResourceId</pre>
<p>&nbsp;</p>
<h4></h4>
<h4>Duplicate HardwareID&#8217;s</h4>
<p>&nbsp;</p>
<p>One other way to look for dupes is to use the HardwareID. Use the following TSQL to find the objects with duplicate HardwareIDs:</p>
<pre>SELECT Name0, Hardware_ID0, Count(Hardware_ID0) AS SystemCount
FROM dbo.v_R_System
GROUP BY Hardware_ID0, Name0
ORDER BY SystemCount DESC</pre>
<p>&nbsp;</p>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2011/12/19/how-to-find-sccm-duplicate-computer-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collection Membership Rule based on Client Status Message</title>
		<link>http://mattlog.net/2011/09/22/collection-membership-rule-based-on-client-status-message/</link>
		<comments>http://mattlog.net/2011/09/22/collection-membership-rule-based-on-client-status-message/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 04:57:13 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Client Status Message]]></category>
		<category><![CDATA[Collection Membership Rule]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=365</guid>
		<description><![CDATA[Quick post today. Here&#8217;s a t-sql query to update a collection based on a specific Client Status Message. I&#8217;m sure you can think of many reasons why this would be handy. SELECT SMS_R_SYSTEM.ResourceID,   SMS_R_SYSTEM.ResourceType,   SMS_R_SYSTEM.Name,   SMS_R_SYSTEM.SMSUniqueIdentifier,   SMS_R_SYSTEM.ResourceDomainORWorkgroup,   SMS_R_SYSTEM.Client FROM sms_R_System     JOIN sms_statusmessage ON sms_R_System.netbios_name0 = sms_statusmessage.machinename      JOIN sms_StatMsgInsStrings ON sms_statusmessage.RecordID = sms_StatMsgInsStrings.RecordID    WHERE sms_statusmessage.messageid = "&#60;Enter [...]]]></description>
			<content:encoded><![CDATA[<p>Quick post today.</p>
<p>Here&#8217;s a t-sql query to update a collection based on a specific Client Status Message. I&#8217;m sure you can think of many reasons why this would be handy.</p>
<pre>SELECT SMS_R_SYSTEM.ResourceID,
  SMS_R_SYSTEM.ResourceType,
  SMS_R_SYSTEM.Name,
  SMS_R_SYSTEM.SMSUniqueIdentifier,
  SMS_R_SYSTEM.ResourceDomainORWorkgroup,
  SMS_R_SYSTEM.Client
FROM sms_R_System   
 JOIN sms_statusmessage ON sms_R_System.netbios_name0 = sms_statusmessage.machinename    
 JOIN sms_StatMsgInsStrings ON sms_statusmessage.RecordID = sms_StatMsgInsStrings.RecordID   
WHERE sms_statusmessage.messageid = "&lt;Enter Status Message ID Here&gt;"  
AND sms_StatMsgInsStrings.InsStrValue = "&lt;Enter Status Message Description Here&gt;"</pre>
<p>&nbsp;</p>
<p>Change the &lt;Enter Status Message ID Here&gt;, and the &lt;Enter Status Message Description Here&gt; to the messages you are after, and save it as a Collection Membership Rule</p>
<p>&nbsp;</p>
<p>.</p>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2011/09/22/collection-membership-rule-based-on-client-status-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trace32 Commonly Missed Features</title>
		<link>http://mattlog.net/2011/08/24/trace32-commonly-missed-features/</link>
		<comments>http://mattlog.net/2011/08/24/trace32-commonly-missed-features/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 05:13:28 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ConfigMgr]]></category>
		<category><![CDATA[SCCM]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[Trace32]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=343</guid>
		<description><![CDATA[I haven’t posted for a while as I’ve been busy with my new job I’m now a Premier Field Engineer working for Microsoft on our SCCM team. For more info on the PFE team visit www.microsoft.com/services. So I thought I’d post one some info on one of the most used SCCM tools – Trace32. I [...]]]></description>
			<content:encoded><![CDATA[<p>I haven’t posted for a while as I’ve been busy with my new<br />
job <img src='http://mattlog.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I’m now a Premier Field Engineer working for Microsoft on<br />
our SCCM team. For more info on the PFE team visit <a href="http://www.microsoft.com/services">www.microsoft.com/services</a>.</p>
<p>So I thought I’d post one some info on one of the most used<br />
SCCM tools – Trace32. I know just about every SCCM admin uses Trace32 to read<br />
the copious amounts of SMS logs, but there are a couple of features that,<br />
surprisingly, very few of my customers even know about!</p>
<p>Here we go:</p>
<p><span style="text-decoration: underline;">Trace32’s <strong>Error Lookup</strong> feature</span></p>
<p>One of the more important but commonly missed features is<br />
the Error Lookup option in Trace32’s Tools &gt; Error Lookup (Ctrl + L) menu.</p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/08/1.png"><img class="alignnone size-full wp-image-345" title="1" src="http://mattlog.net/wp-content/uploads/2011/08/1.png" alt="" width="222" height="236" /></a></p>
<p>The Error Lookup tool will return descriptions of cryptic<br />
error codes from:</p>
<p>Windows error codes<br />
<a href="http://mattlog.net/wp-content/uploads/2011/08/2.png"><img class="alignnone size-full wp-image-346" title="2" src="http://mattlog.net/wp-content/uploads/2011/08/2.png" alt="" width="316" height="196" /></a></p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/08/3.png"><img class="alignnone size-full wp-image-347" title="3" src="http://mattlog.net/wp-content/uploads/2011/08/3.png" alt="" width="316" height="196" /></a></p>
<p>WMI error codes</p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/08/4.png"><img class="alignnone size-full wp-image-348" title="4" src="http://mattlog.net/wp-content/uploads/2011/08/4.png" alt="" width="316" height="196" /></a></p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/08/5.png"><img class="alignnone size-full wp-image-349" title="5" src="http://mattlog.net/wp-content/uploads/2011/08/5.png" alt="" width="316" height="196" /></a></p>
<p>Winhttp error codes</p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/08/6.png"><img class="alignnone size-full wp-image-350" title="6" src="http://mattlog.net/wp-content/uploads/2011/08/6.png" alt="" width="316" height="196" /></a></p>
<p><span style="text-decoration: underline;">Trace32’s <strong>Merge selected files</strong> feature</span></p>
<p>When trying to troubleshoot specific issues such as site<br />
replication issues, it’s sometimes necessary to open more than one log file at<br />
once. Windows 7’s window snap feature makes viewing two logs side-by-side<br />
really easy, but sometimes a more accurate timeline is needed between viewing<br />
log files.</p>
<p>If you select Open in Trace32, Ctrl-click on multiple log<br />
files in the open dialog box, tick <strong>Merge<br />
selected files</strong> you will find that all the selected log files will merge<br />
together into one large super log. The log entries are automatically sorted by<br />
time so it’s super easy to see ConfigMgr process certain things and log the<br />
progress across multiple logs.</p>
<p>In this quick example I’m just viewing the process for<br />
finding a clients default management point.</p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/08/7.png"><img class="alignnone size-full wp-image-351" title="7" src="http://mattlog.net/wp-content/uploads/2011/08/7.png" alt="" width="844" height="87" /></a></p>
<p>As you can see, the client is logging to both LocationServices.log<br />
and ClientLocation.log and it’s quite easy to read the timeline of what is<br />
going on.</p>
<p><span style="text-decoration: underline;">Trace32’s <strong>Last Directory</strong> registry key</span></p>
<p>Lastly, a minor but handy tip, Trace32 by default will save<br />
the last log location that you opened. This is really handy as you don’t have<br />
to browse to the logs path every time you want to read SMS logs. It is a bit of<br />
a pain though when you use Trace32 on a client, because every time you launch<br />
Trace32 for the first time on a certain machine, it defaults to the<br />
%userprofile%\Desktop directory.  The <strong>Last Directory</strong> registry found at<br />
HKCU\Software\Microsoft\Trace32 is the key that controls the default open<br />
location. If you add a GPO that updates your clients to %windir%\System32\CCM\Logs\<br />
every time you jump on a machine it will automatically open Trace32 at the<br />
client log location.</p>
<p>You can download the Trace32/64 tools as part of the ConfigMgr 2007 toolkit from <a href="http://www.microsoft.com/download/en/details.aspx?id=9257">http://www.microsoft.com/download/en/details.aspx?id=9257</a></p>
<p>.</p>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2011/08/24/trace32-commonly-missed-features/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SCCM 2012 Beta 2: setupdl.exe doesn&#8217;t launch</title>
		<link>http://mattlog.net/2011/04/28/sccm-2012-beta-2-setupdl-exe-doesnt-launch/</link>
		<comments>http://mattlog.net/2011/04/28/sccm-2012-beta-2-setupdl-exe-doesnt-launch/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 04:46:54 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=329</guid>
		<description><![CDATA[Had an annoying one this afternoon. While trying to install the new (ish) SCCM 2012 Beta 2 the Updated Prerequisite Components wizard wouldn&#8217;t download the prereqs. I was able to run the setupdl.exe manually, but still when providing the prereq path to the Updated Prerequisite Components wizards it would still fail. ﻿&#60;04-28-2011 14:38:50&#62; INFO: setupdl.exe: [...]]]></description>
			<content:encoded><![CDATA[<p>Had an annoying one this afternoon. While trying to install the new (ish) SCCM 2012 Beta 2 the <strong>Updated Prerequisite Components</strong> wizard wouldn&#8217;t download the prereqs. I was able to run the setupdl.exe manually, but still when providing the prereq path to the Updated Prerequisite Components wizards it would still fail.</p>
<pre>﻿&lt;04-28-2011 14:38:50&gt; INFO: setupdl.exe: Start
﻿&lt;04-28-2011 14:38:50&gt; INFO: setupdl.exe: Finish</pre>
<p>Really easy fix in the end. You just need to make sure the prereqs are stored in a directory without any spaces in the name, and bingo. :/</p>
<p>.</p>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2011/04/28/sccm-2012-beta-2-setupdl-exe-doesnt-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enspire vBlock</title>
		<link>http://mattlog.net/2011/04/21/enspire-vblock/</link>
		<comments>http://mattlog.net/2011/04/21/enspire-vblock/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 02:12:55 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=327</guid>
		<description><![CDATA[ZDNet recently ran a case study on Enspire Australia&#8217;s new vBlock infrastructure. Check out the video of Geoffrey Nicolas and Ben Hodge &#8211; my ex-colleagues and long time friends. http://www.zdnet.com.au/case-study-enspire-vblock-339313585.htm Posted by Matt Shadbolt http://mattlog.net Please comment or click an ad to support this site]]></description>
			<content:encoded><![CDATA[<p>ZDNet recently ran a case study on Enspire Australia&#8217;s new vBlock infrastructure. Check out the video of Geoffrey Nicolas and Ben Hodge &#8211; my ex-colleagues and long time friends.</p>
<p><a href="http://www.zdnet.com.au/case-study-enspire-vblock-339313585.htm">http://www.zdnet.com.au/case-study-enspire-vblock-339313585.htm</a></p>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2011/04/21/enspire-vblock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom WinPE Boot Image Script</title>
		<link>http://mattlog.net/2011/03/08/custom-winpe-boot-image-script/</link>
		<comments>http://mattlog.net/2011/03/08/custom-winpe-boot-image-script/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 05:42:04 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Windows Boot Image]]></category>
		<category><![CDATA[WinPE]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=319</guid>
		<description><![CDATA[I&#8217;m on a scripting rampage at the moment writing tools for the common things I do for each customer. Here&#8217;s my latest script. CustomWinPEWIM.ps1 This powershell script will: - Check for prereqs (WAIK, DISM) - Builds the WinPE dev environment (in either x86 or x64) - Mounts the WIM - Prompts to install non-default WinPE [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m on a scripting <strong>rampage</strong> at the moment writing tools for the common things I do for each customer. Here&#8217;s my latest script.</p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/03/CustomWinPEWIMv2.txt" target="_blank"><strong>CustomWinPEWIM.ps1</strong></a></p>
<p>This powershell script will:</p>
<p>- Check for prereqs (WAIK, DISM)<br />
- Builds the WinPE dev environment (in either x86 or x64)<br />
- Mounts the WIM<br />
- Prompts to install non-default WinPE packages (HTA or Script Host support, for example)<br />
- Adds Trace32.exe to the image<br />
- Prompts asking if you want to add any other files to the image<br />
- Unmounts and saves the custom image ready for SCCM or MDT.</p>
<p>The script is quite long (217 lines) so I won&#8217;t paste it here like I normally do, see above to download the script directly.</p>
<p>.</p>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2011/03/08/custom-winpe-boot-image-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>USMT Test Environment Setup Script</title>
		<link>http://mattlog.net/2011/03/07/usmt-test-environment-setup-script/</link>
		<comments>http://mattlog.net/2011/03/07/usmt-test-environment-setup-script/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 22:46:38 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=311</guid>
		<description><![CDATA[I&#8217;ve been working hard lately on the various USMT migration scenarios using SCCM with hardlinking and State Migration Points. One of the frustrating things during this process is creating &#8216;user state&#8217;. Creating user state for your test migrations is important as you need to ensure that your testing covers the regular places that users will [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working hard lately on the various USMT migration scenarios using SCCM with hardlinking and State Migration Points. One of the frustrating things during this process is creating &#8216;user state&#8217;. Creating user state for your test migrations is important as you need to ensure that your testing covers the regular places that users will store files, and that USMT is doing it&#8217;s job and migrating this data.</p>
<p>The frustrating part is the time it takes to create some reasonable user state. You want to add files and folders to users profiles across multiple locations. I&#8217;ve written a VB Script to automate this process. The script will work for either Windows XP or Windows 7 environments. It basically creates a bunch of files and folders in the logged in users Desktop, My Documents, My Pictures and App Data directories.</p>
<p>You can download the script <a title="USMTEnvironmentSetup" href="http://mattlog.net/wp-content/uploads/2011/03/USMTEnvironmentSetup.txt" target="_blank">here</a> &#8211; but I&#8217;ll also post the contents so you can grab whatever you need.</p>
<pre>''    USMT Environment Setup    ''</pre>
<pre>''   Created by Matt Shadbolt   ''</pre>
<pre>Option Explicit</pre>
<pre>'Declare Variables</pre>
<pre>Dim objFSO, objFolder, strDirectory</pre>
<pre>Dim objNetwork</pre>
<pre>Dim profilePath</pre>
<pre>Dim x</pre>
<pre>Dim filetxt, getname, path</pre>
<pre>Dim LocalAppDataPath, RoamingAppDataPath</pre>
<pre>Dim MyDocuments, MyDesktop, MyPictures</pre>
<pre>'Set Variables</pre>
<pre>x = 0</pre>
<pre>Set objFSO = CreateObject("Scripting.FileSystemObject")</pre>
<pre>Set objNetwork = CreateObject("WScript.Network")</pre>
<pre>profilePath = UserInput( "Is this for XP or WIN7?")</pre>
<pre>' Check if XP or Windows 7</pre>
<pre>If profilePath = "XP" Then</pre>
<pre>profilePath = "C:\Documents and Settings\"</pre>
<pre>LocalAppDataPath = "\Local Settings\Application Data\"</pre>
<pre>RoamingAppDataPath = "\Application Data\"</pre>
<pre>MyDocuments = "My Documents"</pre>
<pre>MyDesktop = "Desktop"</pre>
<pre>MyPictures = "My Documents\My Pictures"</pre>
<pre>ElseIf profilePath = "WIN7" Then</pre>
<pre>profilePath = "C:\Users\"</pre>
<pre>LocalAppDataPath = "\AppData\Local\"</pre>
<pre>RoamingAppDataPath = "\AppData\Roaming\"</pre>
<pre>MyDocuments = "Documents"</pre>
<pre>MyDesktop = "Desktop"</pre>
<pre>MyPictures = "Pictures"</pre>
<pre>Else</pre>
<pre>MsgBox "You need to enter either XP or WIN7 (CaSe SeNsItIvE) "</pre>
<pre>Wscript.Quit</pre>
<pre>End If</pre>
<pre>' Desktop Folders</pre>
<pre>While x &lt; 10</pre>
<pre> strDirectory = profilePath &amp; objNetwork.Username &amp; "\" &amp; MyDesktop &amp; "\DesktopFolder" &amp; x</pre>
<pre> Set objFolder = objFSO.CreateFolder(strDirectory)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "TextFile" &amp; x &amp; ".txt", True)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "WordDoc" &amp; x &amp; ".doc", True)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "Shortcut" &amp; x &amp; ".lnk", True)</pre>
<pre> x = x + 1</pre>
<pre>Wend</pre>
<pre>x = 0</pre>
<pre>' My Documents</pre>
<pre>While x &lt; 10</pre>
<pre> strDirectory = profilePath &amp; objNetwork.Username &amp; "\" &amp; MyDocuments &amp; "\DocumentsFolder" &amp; x</pre>
<pre> Set objFolder = objFSO.CreateFolder(strDirectory)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "WordDoc" &amp; x &amp; ".doc", True)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "WordDoc1" &amp; x &amp; ".doc", True)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "WordDoc2" &amp; x &amp; ".doc", True)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "WordDoc3" &amp; x &amp; ".doc", True)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "WordDoc4" &amp; x &amp; ".doc", True)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "WordDoc5" &amp; x &amp; ".doc", True)</pre>
<pre> x = x + 1</pre>
<pre>Wend</pre>
<pre>x = 0</pre>
<pre>' My Pictures</pre>
<pre>While x &lt; 10</pre>
<pre> strDirectory = profilePath &amp; objNetwork.Username &amp; "\" &amp; MyPictures &amp; "\PicturesFolder" &amp; x</pre>
<pre> Set objFolder = objFSO.CreateFolder(strDirectory)</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "Picture" &amp; x &amp; ".jpg", True)</pre>
<pre> x = x + 1</pre>
<pre>Wend</pre>
<pre>x = 0</pre>
<pre>' AppDatat\Local</pre>
<pre>strDirectory = profilePath &amp; objNetwork.Username &amp; LocalAppDataPath &amp; "SomeAppData"</pre>
<pre>Set objFolder = objFSO.CreateFolder(strDirectory)</pre>
<pre>While x &lt; 10</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "AppDataFile" &amp; x &amp; ".appData", True)</pre>
<pre> x = x + 1</pre>
<pre>Wend</pre>
<pre>x = 0</pre>
<pre>' AppData\Roaming</pre>
<pre>strDirectory = profilePath &amp; objNetwork.Username &amp; RoamingAppDataPath &amp; "SomeAppData"</pre>
<pre>Set objFolder = objFSO.CreateFolder(strDirectory)</pre>
<pre>While x &lt; 10</pre>
<pre> Set filetxt = objFSO.CreateTextFile(strDirectory &amp;"\" &amp; "AppDataFile" &amp; x &amp; ".appData", True)</pre>
<pre> x = x + 1</pre>
<pre>Wend</pre>
<pre>x = 0</pre>
<pre>MsgBox "Success!"</pre>
<pre>''' Functions '''</pre>
<pre>'Input OS type</pre>
<pre>Function UserInput( myPrompt )</pre>
<pre> If UCase( Right( WScript.FullName, 12 ) ) = "\CSCRIPT.EXE" Then</pre>
<pre> WScript.StdOut.Write myPrompt &amp; " "</pre>
<pre> UserInput = WScript.StdIn.ReadLine</pre>
<pre> Else</pre>
<pre> UserInput = InputBox( myPrompt )</pre>
<pre> End If</pre>
<pre>End Function

.</pre>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2011/03/07/usmt-test-environment-setup-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Vista/7/2008 &#8220;No Internet Access&#8221; network status</title>
		<link>http://mattlog.net/2011/01/18/windows-vista72008-no-internet-access-network-status/</link>
		<comments>http://mattlog.net/2011/01/18/windows-vista72008-no-internet-access-network-status/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 05:52:32 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=297</guid>
		<description><![CDATA[I was wondering today about Windows 7&#8242;s network status icon in the system tray and how it tells if there is an Internet connection present. For example, you may have a very strict firewall or proxy that only allows certain sites. In that instance, how does the computer tell if it *actually* has an Internet [...]]]></description>
			<content:encoded><![CDATA[<p>I was wondering today about Windows 7&#8242;s network status icon in the system tray and how it tells if there is an Internet connection present. For example, you may have a very strict firewall or proxy that only allows certain sites. In that instance, how does the computer tell if it *actually* has an Internet connection or not?</p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/01/NoNetworkAcces1.jpg"><img class="alignnone size-full wp-image-299" title="NoNetworkAccess" src="http://mattlog.net/wp-content/uploads/2011/01/NoNetworkAcces1.jpg" alt="NoNetworkAccess" width="188" height="77" /></a></p>
<p>The image above is a screen cap from one of my lab virtual machines. This lab <strong>doesn&#8217;t</strong> have internet access&#8230; but I was wondering how I could trick it into reporting a successful connection.</p>
<p>After some digging, I found the answer. This feature is called <strong>Network Connectivity Status Indicator (NCSI) </strong>and was introduced with Windows Vista. The NCSI periodically connects to a dedicated Microsoft server and if it is able to connect, reports<em> <strong>&#8220;Internet Access&#8221; </strong></em></p>
<p>Now, how can we trick it into thinking there is a connection? Easily!</p>
<p>First, you need to change your hosts file to localhost loop the address <strong>www.msftncsi.com</strong></p>
<p><em><strong><a href="http://mattlog.net/wp-content/uploads/2011/01/localhost.jpg"><img class="alignnone size-full wp-image-300" title="localhost" src="http://mattlog.net/wp-content/uploads/2011/01/localhost.jpg" alt="" width="496" height="73" /></a></strong></em></p>
<p>This will cause any DNS name lookup on the local computer to resolve it&#8217;s own localhost address instead of Microsofts external server. In this case, the server doesn&#8217;t have an Internet connection and wont be able to resolve the external address anyway.</p>
<p>Next, we need to simulate the www.msftncsi.com site. Open IIS and create a simple static website with the www.msftncsi.com host header.</p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/01/binding.jpg"><img class="alignnone size-full wp-image-301" title="binding" src="http://mattlog.net/wp-content/uploads/2011/01/binding.jpg" alt="" width="585" height="25" /></a></p>
<p>The IIS site above will mean any time http://www.msftncsi.com is browsed to &#8211; in conjunction with the host file addition &#8211; the site will be served by the local server your working on. We now need one last change for the NCSI status to change.</p>
<p>Open Notepad.exe and create the following file in the root of the www.msftncsi.com website &#8211; ncsi.txt</p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/01/txtfile.jpg"><img class="alignnone size-full wp-image-302" title="txtfile" src="http://mattlog.net/wp-content/uploads/2011/01/txtfile.jpg" alt="" width="679" height="125" /></a></p>
<p>In this text file, type only the following &#8211; no extra lines or returns</p>
<blockquote>
<pre>Microsoft NCSI
</pre>
</blockquote>
<p>Now disable and enable your Local Area Connection. This should cause NCSI to attempt to connect to http://www.msftncsi.com/ncsi.txt and read the single line. Of course, instead of failing due to no Internet connection, NCSI will successfully connect to your local IIS site and report a successful Internet connection!</p>
<p><a href="http://mattlog.net/wp-content/uploads/2011/01/InternetAccess.jpg"><img class="alignnone size-full wp-image-304" title="InternetAccess" src="http://mattlog.net/wp-content/uploads/2011/01/InternetAccess.jpg" alt="" width="193" height="78" /></a></p>
<p>OR, if your the super boring type&#8230; you COULD just change the following registry key to <strong>0</strong> to disable NCSI altogether &#8211; but that&#8217;s no fun now is it?</p>
<pre><strong>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet

</strong></pre>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2011/01/18/windows-vista72008-no-internet-access-network-status/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Find domain membership via WMI</title>
		<link>http://mattlog.net/2010/12/16/find-domain-membership-via-wmi/</link>
		<comments>http://mattlog.net/2010/12/16/find-domain-membership-via-wmi/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 00:29:12 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=295</guid>
		<description><![CDATA[Here&#8217;s a quick and dirty VBScript to find the domain of a certain computer. Great for things like SCCM OS Deployment. strComputer = "." Set objWMIService = GetObject("winmgmts:" _ &#38; "{impersonationLevel=impersonate}!\\" _ &#38; strComputer &#38; "\root\cimv2") Set colSettings = objWMIService.ExecQuery _ ("Select * from Win32_ComputerSystem") For Each objComputer in colSettings Wscript.Echo "Domain: " &#38; objComputer.Domain [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick and dirty VBScript to find the domain of a certain computer. Great for things like SCCM OS Deployment.</p>
<p><code>strComputer = "."<br />
Set objWMIService = GetObject("winmgmts:" _<br />
&amp; "{impersonationLevel=impersonate}!\\" _<br />
&amp; strComputer &amp; "\root\cimv2")<br />
Set colSettings = objWMIService.ExecQuery _<br />
("Select * from Win32_ComputerSystem")<br />
For Each objComputer in colSettings<br />
Wscript.Echo "Domain: " &amp; objComputer.Domain<br />
Next</code></p>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2010/12/16/find-domain-membership-via-wmi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backblaze: Only Backup My Documents</title>
		<link>http://mattlog.net/2010/10/26/backblaze-only-backup-my-documents/</link>
		<comments>http://mattlog.net/2010/10/26/backblaze-only-backup-my-documents/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 09:14:32 +0000</pubDate>
		<dc:creator>Matt Shadbolt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[BackBlaze]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Backups]]></category>

		<guid isPermaLink="false">http://mattlog.net/?p=286</guid>
		<description><![CDATA[I&#8217;m a big fan of BackBlaze (www.backblaze.com) and I use it to backup all of my machines. One thing that *really* annoys me though, is that by default, BackBlaze will backup your entire hard drive contents.This is a real pain for those who have lots of large files with no need for backup copies in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of BackBlaze (<a href="http://backblaze.com" target="_blank">www.backblaze.com</a>) and I use it to backup all of my machines. One thing that *really* annoys me though, is that by default, BackBlaze will backup your entire hard drive contents.This is a real pain for those who have lots of large files with no need for backup copies in the cloud.</p>
<p>Even worse, there is no option in the control panel to exclude all files except certain folders &#8211; for example your My Documents folder. Instead, you need to manually enter each folder across your hard drive that you want to exclude, and only leave the single folder that you want to backup out.</p>
<p>Here&#8217;s an easy way to exclude all files except your My Documents directory (or any other directory you want backed up)</p>
<p>First, browse to C:\ProgramData\Backblaze\bzdata (in Windows Vista/7), and open the BZInfo.xml document in Notepad. Now find the <strong>do_backup</strong> section &#8211; it should look something like</p>
<blockquote><p>
&lt;do_backup dst_type=&#8221;bzdatacenter&#8221; dst_fileformat=&#8221;bzff&#8221; max_filesize_mb=&#8221;4000&#8243; net_throttle=&#8221;50&#8243; backup_schedule_type=&#8221;continuously&#8221; backup_schedule_detail=&#8221;none&#8221; &gt;<br />
&lt;bzdirfilter dir=&#8221;c:\&#8221; whichfiles=&#8221;all&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\windows\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\i386\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\users\all users\microsoft\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\users\all users\microsoft help\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\$recycle.bin\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\$recycler\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\recycler\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\msocache\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\program files\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\program files (x86)\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;/do_backup&gt;</p></blockquote>
<p>There are two settings in the config above that control what BackBlaze is backing up</p>
<p>&lt;bzdirfilter dir=&#8221;c:\&#8221; whichfiles=&#8221;all&#8221; /&gt; <strong>This line enables backup for all files across the C drive<br />
</strong>&lt;bzdirfilter dir=&#8221;c:\windows\&#8221; whichfiles=&#8221;none&#8221; /&gt; <strong>This line disables backup for all files located in C:\Windows\</strong></p>
<p>So, if we change the &lt;bzdirfilter dir=&#8221;c:\&#8221; whichfiles=&#8221;all&#8221; /&gt; to &lt;bzdirfilter dir=&#8221;c:\&#8221; whichfiles=&#8221;<strong>none</strong>&#8221; /&gt; and add a line <strong>above</strong> the edited line, including the folder we want backed up, BackBlaze will exclude all files on C except the directory we allow.</p>
<p>In my example, I want to exclude everything on C drive except My Documents. My BZInfo.xml file looks like</p>
<blockquote><p>&lt;do_backup dst_type=&#8221;bzdatacenter&#8221; dst_fileformat=&#8221;bzff&#8221;  max_filesize_mb=&#8221;4000&#8243; net_throttle=&#8221;50&#8243;  backup_schedule_type=&#8221;continuously&#8221; backup_schedule_detail=&#8221;none&#8221; &gt;<br />
&lt;bzdirfilter dir=&#8221;C:\Users\MattShadbolt\Documents\&#8221; whichfiles=&#8221;all&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\windows\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\i386\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\users\all users\microsoft\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\users\all users\microsoft help\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\$recycle.bin\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\$recycler\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\recycler\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\msocache\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\program files\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;bzdirfilter dir=&#8221;c:\program files (x86)\&#8221; whichfiles=&#8221;none&#8221; /&gt;<br />
&lt;/do_backup&gt;</p></blockquote>
<p>And that&#8217;s how to enable individual directory backup with BackBlaze. If you have more than one folder, just add the directory to the <strong>do_backup</strong> list.</p>
<p>One other thing to note. BackBlaze by default has a maximum backup file size of 4GB. If (for some reason) you want to exceed this file size limit, just change the max_filesize_mb=&#8221;4000&#8243; option in <strong>do_backup</strong>. For example, lets make the maximum file size large enough to backup a DVD ISO</p>
<blockquote><p>&lt;do_backup dst_type=&#8221;bzdatacenter&#8221; dst_fileformat=&#8221;bzff&#8221;   max_filesize_mb=&#8221;6000&#8243; net_throttle=&#8221;50&#8243;   backup_schedule_type=&#8221;continuously&#8221; backup_schedule_detail=&#8221;none&#8221; &gt;</p></blockquote>
<p>Hopefully this helps some of those BackBlaze users out there! As I said earlier, I&#8217;m a big fan of BackBlaze, but it would be nice if they enabled these settings out of the box.</p>
<p>.</p>
Posted by Matt Shadbolt<br>
<a href ="http://mattlog.net">http://mattlog.net</a><br>
Please comment or click an ad to support this site<br>]]></content:encoded>
			<wfw:commentRss>http://mattlog.net/2010/10/26/backblaze-only-backup-my-documents/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

