<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>WBRACKEN'S WEBLOG</title>
	<atom:link href="http://wbracken.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://wbracken.wordpress.com</link>
	<description>Just another Geek</description>
	<lastBuildDate>Mon, 23 Jan 2012 22:58:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='wbracken.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>WBRACKEN'S WEBLOG</title>
		<link>http://wbracken.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://wbracken.wordpress.com/osd.xml" title="WBRACKEN&#039;S WEBLOG" />
	<atom:link rel='hub' href='http://wbracken.wordpress.com/?pushpress=hub'/>
		<item>
		<title>SCCM Query for Empty Collections</title>
		<link>http://wbracken.wordpress.com/2011/02/03/sccm-query-for-empty-collections/</link>
		<comments>http://wbracken.wordpress.com/2011/02/03/sccm-query-for-empty-collections/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 16:30:04 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://wbracken.wordpress.com/?p=111</guid>
		<description><![CDATA[I just came across the need to query SCCM for collections that are empty as digging through queries in the console I could not find a suitable solution. Luck would have it that a quick Google search away was the following: http://smsug.ca/blogs/garth_jones/archive/2010/07/01/find-the-collections-which-does-nt-have-members.aspx Here&#8217;s the actual query statement select C.Collectionid, C.Name from dbo.v_Collection C Where C.Collectionid [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=111&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just came across the need to query SCCM for collections that are empty as digging through queries in the console I could not find a suitable solution.  Luck would have it that a quick Google search away was the following:</p>
<p>http://smsug.ca/blogs/garth_jones/archive/2010/07/01/find-the-collections-which-does-nt-have-members.aspx</p>
<p>Here&#8217;s the actual query statement<br />
<code>select<br />
    C.Collectionid,<br />
    C.Name<br />
from<br />
    dbo.v_Collection C<br />
Where<br />
    C.Collectionid not in (Select Collectionid from dbo.v_FullCollectionMembership)</code></p>
<p>Pretty basic however if your even remotely familiar with SQL you can add additional critera to weed out collections you know will be empty and only look at the ones you truly care about.  </p>
<p>Example:  In our SCCM we have multiple layers of collections with the parent collections being empty (with no &#8220;update this collection&#8221; schedule of course!)<br />
Lets pick on Adobe.  For Acrobat Reader we have a parent collection called Adobe, a sub collection called Adobe_AcrobatReader and the finally a 3rd level collection called Adobe_AcrobatReader_9.3_R01-Install.<br />
The query above returns all 3 collections when really all I care about is the 3rd level collection.  The other two collections are empty by design.  </p>
<p>Quite simply I add another criteria to my query to only pull back the &#8220;Install&#8221; collections like so:</p>
<p><code>select<br />
    C.Collectionid,<br />
    C.Name<br />
from<br />
    dbo.v_Collection C<br />
Where<br />
    C.Collectionid not in (Select Collectionid from dbo.v_FullCollectionMembership) and c.name like '%-Install'</code></p>
<p>Easy peasy lemon squeezy.  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=111&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2011/02/03/sccm-query-for-empty-collections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
		<item>
		<title>SCCM: Migrating to a new source code server</title>
		<link>http://wbracken.wordpress.com/2010/05/25/sccm-migrating-to-a-new-source-code-server/</link>
		<comments>http://wbracken.wordpress.com/2010/05/25/sccm-migrating-to-a-new-source-code-server/#comments</comments>
		<pubDate>Tue, 25 May 2010 16:23:26 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[SCCM]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://wbracken.wordpress.com/?p=95</guid>
		<description><![CDATA[I have run across this several time in the past where the source code location for your packages (and now drivers as well) needs to be moved to a new server. I have 3 scripts I use (Could be combined into one if you like) that will allow you to change the location for each [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=95&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have run across this several time in the past where the source code location for your packages (and now drivers as well) needs to be moved to a new server.  I have 3 scripts I use (Could be combined into one if you like) that will allow you to change the location for each object. </p>
<p>Script 1:  remapPkgs.vbs<br />
This script will modify the source path for all (non Driver related) packages.  </p>
<p>Script 2:  remapDrivers.vbs<br />
This script will remap all the source locations for the drivers that have been imported.</p>
<p>Script 3: remapDriverPkgs.vbs<br />
This script will remap all the source locations for your driver packages.</p>
<p><strong>VERY IMPORTANT</strong> &#8211; When you run the remapPkgs.vbs and the remapDriverPkgs.vbs it will trigger a Distribution Point update for all your packages.  You will likely want to run this after hours or over the weekend depending on how many packages you have and what your bandwidth is to your DP&#8217;s.</p>
<p><strong>*UPDATE*</strong> &#8211; Couple of things I noticed in my environment after running these scripts.<br />
1.  We use Nomad Branch from 1E.  This adds a tab to your packages where you specify if you want to enable Nomad.  After running the scripts I had to go back and reset this on all my packages.<br />
2.  Much more importantly we also discovered that these scripts re-enabled the setting for all of our App-V packages to &#8220;remove when no longer advertised&#8221;.  Under normal day to day operations this setting is desired for us however as part of our re-assigning the clients to a new site code all local policy is deleted and re-downloaded from the new server.  Well with that option still enabled it would remove all App-V apps from all machines as the policy would get deleted and it would not come back automatically.  This is why we removed that option.  Long story short we had to go back and remove the option again from all App-V packages after migrating the source code.</p>
<p><strong>Another important note regarding App-V packages:</strong><br />
Although Microsoft does not give you the option to modify the source directory of your Virtual Applications via the Admin Console the script above will remap your App-V packages as well.  In my environment however I was required to touch each Virtual App after the script and &#8220;re-import&#8221; the package if you will.  This was achieved by clicking the Properties of the Virtual App, Click Data Source, then click &#8220;Set&#8221;.  In the &#8220;Virtual Application package source directory&#8221; click &#8220;Browse&#8221; and specify the original location of the xml file used to create the package.  I found that in most circumstances I needed to delete the contents of the &#8220;ConfigMgr data source directory&#8221; prior to browsing to the xml file.  Once you import the package again the contents of the source directory get re-created and the package resent to the DP&#8217;s.</p>
<p>The syntax for the scripts are included in the script header however its pretty simple (must be run from the SCCM server itself):</p>
<p>cscript <em>scriptname.vbs NEWSERVERNAME</em></p>
<p>So example:  My current source path that I want to change is:<br />
\\SERVER01\SOURCE$\SoftwareInstalls\Adobe_AcrobatReader_9.0_R01</p>
<p>I would run the script like so:<br />
cscript remapPkgs.vbs SERVER02</p>
<p>This will change the source directory to:<br />
\\SERVER02\SOURCE$\SoftwareInstalls\Adobe_AcrobatReader_9.0_R01<br />
(And trigger an update to the DP)</p>
<p>Again these scripts are setup to do all packages in one fell swoop and designed to only need to replace the server name.  You could easily modify the scripts to change the share name, etc as needed.</p>
<p>I would also recommend commenting out the &#8220;put_&#8221; statement and run the script to verify it works prior to actually making the changes.<br />
_________________________________________________<br />
<strong>Script 1 (Mind word wrapping)</strong><br />
<code>'///////////////////////////////////////////////////<br />
'<br />
'  SYNTAX:  cscript remapPkgs.vbs NEWSERVERNAME<br />
'<br />
'///////////////////////////////////////////////////////////<br />
Dim oWbemServices<br />
If UCase(Right(Wscript.FullName, 11)) = "WSCRIPT.EXE" Then<br />
    Wscript.Echo "This script must be run under CScript."<br />
    Wscript.Quit<br />
End If<br />
If WScript.Arguments.Count  1 Then<br />
    WScript.Echo "Wrong number of arguments were passed."<br />
    WScript.Quit<br />
End If<br />
'====================================================<br />
'==  Execute SUB to connect to SCCM Provider<br />
'====================================================<br />
CONNSCCM()<br />
For Each oPackage In oWbemServices.execquery("select * from sms_package")<br />
  sOldPathString = oPackage.pkgsourcepath<br />
  If InStr(sOldPathString,"\\") Then<br />
                iStart = InStr(3,sOldPathString,"\")<br />
                sNewPathString = Right(sOldPathString,(LEN(sOldPathString)-iStart))<br />
                sNewPathString = "\\" &amp; WScript.Arguments(0) &amp; "\" &amp; sNewPathString<br />
                WScript.Echo "Setting Package Path for " &amp; oPackage.Name &amp; " from " &amp; sOldPathString &amp; " to " &amp;  sNewPathString<br />
                oPackage.pkgsourcepath = sNewPathString<br />
                oPackage.put_<br />
  End If<br />
Next<br />
WScript.Echo "Done"<br />
'====================================================<br />
'  SUB:  Connects to the SMS Provider<br />
'====================================================<br />
Sub CONNSCCM()<br />
  Set oWbemLocator = CreateObject("WbemScripting.SWbemLocator")<br />
  Set oWbemServices = oWbemLocator.ConnectServer(".", "root\sms")<br />
  Set oSCCMProvLoc = oWbemServices.InstancesOf("SMS_ProviderLocation")<br />
  For Each oLoc In oSCCMProvLoc<br />
        If oLoc.ProviderForLocalSite = True Then<br />
            Set oWbemServices = oWbemLocator.ConnectServer(oLoc.Machine, "root\sms\site_" + oLoc.SiteCode)<br />
        End If<br />
  Next<br />
End Sub<br />
</code><br />
<strong>Script 2 (Mind word wrapping)</strong><br />
<code>'///////////////////////////////////////////////////<br />
'<br />
'  SYNTAX:  cscript remapDrivers.vbs NEWSERVERNAME<br />
'<br />
'///////////////////////////////////////////////////////////<br />
Dim oWbemServices<br />
If UCase(Right(Wscript.FullName, 11)) = "WSCRIPT.EXE" Then<br />
    Wscript.Echo "This script must be run under CScript."<br />
    Wscript.Quit<br />
End If<br />
If WScript.Arguments.Count  1 Then<br />
    WScript.Echo "Wrong number of arguments were passed."<br />
    WScript.Quit<br />
End If<br />
'====================================================<br />
'==  Execute SUB to connect to SCCM Provider<br />
'====================================================<br />
CONNSCCM()<br />
For Each oPackage In oWbemServices.execquery("select * from sms_Driver")<br />
  sOldPathString = oPackage.contentsourcepath<br />
  If InStr(sOldPathString,"Latitude 13") Then<br />
                iStart = InStr(3,sOldPathString,"\")<br />
                sNewPathString = Right(sOldPathString,(LEN(sOldPathString)-iStart))<br />
                sNewPathString = "\\" &amp; WScript.Arguments(0) &amp; "\" &amp; sNewPathString<br />
                WScript.Echo "Setting Package Path for " &amp; oPackage.LocalizedDisplayName &amp; " from " &amp; sOldPathString &amp; " to " &amp;  sNewPathString<br />
                'WScript.Echo sOldPathString<br />
                oPackage.contentsourcepath = sNewPathString<br />
                oPackage.put_<br />
  End If<br />
Next<br />
WScript.Echo "Done"<br />
'====================================================<br />
'  SUB:  Connects to the SMS Provider<br />
'====================================================<br />
Sub CONNSCCM()<br />
  Set oWbemLocator = CreateObject("WbemScripting.SWbemLocator")<br />
  Set oWbemServices = oWbemLocator.ConnectServer(".", "root\sms")<br />
  Set oSCCMProvLoc = oWbemServices.InstancesOf("SMS_ProviderLocation")<br />
  For Each oLoc In oSCCMProvLoc<br />
        If oLoc.ProviderForLocalSite = True Then<br />
            Set oWbemServices = oWbemLocator.ConnectServer(oLoc.Machine, "root\sms\site_" + oLoc.SiteCode)<br />
        End If<br />
  Next<br />
End Sub<br />
</code></p>
<p><strong>Script 3 (Mind word wrapping)</strong><br />
<code>'///////////////////////////////////////////////////<br />
'<br />
'  SYNTAX:  cscript remapDriverPkgs.vbs NEWSERVERNAME<br />
'<br />
'///////////////////////////////////////////////////////////<br />
Dim oWbemServices<br />
If UCase(Right(Wscript.FullName, 11)) = "WSCRIPT.EXE" Then<br />
    Wscript.Echo "This script must be run under CScript."<br />
    Wscript.Quit<br />
End If<br />
If WScript.Arguments.Count  1 Then<br />
    WScript.Echo "Wrong number of arguments were passed."<br />
    WScript.Quit<br />
End If<br />
'====================================================<br />
'==  Execute SUB to connect to SCCM Provider<br />
'====================================================<br />
CONNSCCM()<br />
For Each oPackage In oWbemServices.execquery("select * from sms_DriverPackage")<br />
  sOldPathString = oPackage.PkgSourcePath<br />
  If InStr(sOldPathString,"\\") Then<br />
                iStart = InStr(3,sOldPathString,"\")<br />
                sNewPathString = Right(sOldPathString,(LEN(sOldPathString)-iStart))<br />
                sNewPathString = "\\" &amp; WScript.Arguments(0) &amp; "\" &amp; sNewPathString<br />
                WScript.Echo "Setting Package Path for " &amp; oPackage.Name &amp; " from " &amp; sOldPathString &amp; " to " &amp;  sNewPathString<br />
                'WScript.Echo sOldPathString<br />
                oPackage.PkgSourcePath = sNewPathString<br />
                oPackage.put_<br />
  End If<br />
Next<br />
WScript.Echo "Done"<br />
'====================================================<br />
'  SUB:  Connects to the SMS Provider<br />
'====================================================<br />
Sub CONNSCCM()<br />
  Set oWbemLocator = CreateObject("WbemScripting.SWbemLocator")<br />
  Set oWbemServices = oWbemLocator.ConnectServer(".", "root\sms")<br />
  Set oSCCMProvLoc = oWbemServices.InstancesOf("SMS_ProviderLocation")<br />
  For Each oLoc In oSCCMProvLoc<br />
        If oLoc.ProviderForLocalSite = True Then<br />
            Set oWbemServices = oWbemLocator.ConnectServer(oLoc.Machine, "root\sms\site_" + oLoc.SiteCode)<br />
        End If<br />
  Next<br />
End Sub<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=95&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2010/05/25/sccm-migrating-to-a-new-source-code-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
		<item>
		<title>VBScript:  Run Optional SCCM Advertisements</title>
		<link>http://wbracken.wordpress.com/2009/10/13/vbscript-run-optional-sccm-advertisements/</link>
		<comments>http://wbracken.wordpress.com/2009/10/13/vbscript-run-optional-sccm-advertisements/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 15:59:24 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[SCCM]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://wbracken.wordpress.com/?p=88</guid>
		<description><![CDATA[Here&#8217;s a fairly simple script that will check for and execute all optional advertisments on a client machine. This could be modified to include checks for adverts that have already ran and not rerun or put a GUI around it to choose which adverts to run selectively. If the code has not been downloaded to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=88&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a fairly simple script that will check for and execute all optional advertisments on a client machine.  This could be modified to include checks for adverts that have already ran and not rerun or put a GUI around it to choose which adverts to run selectively.<br />
If the code has not been downloaded to the client yet a content retrieval will be made automatically prior to running.</p>
<p>CAREFUL OF WORD WRAPPING</p>
<p><code>'==========================================================================<br />
'<br />
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 2009<br />
'<br />
' NAME: RunOptionalAdvertisements.vbs<br />
'<br />
' AUTHOR: William Bracken<br />
' DATE  : 10/12/2009<br />
'<br />
' COMMENT: Run optional advertisments<br />
'<br />
'==========================================================================<br />
Dim oUIResource, programArray(), fs, f<br />
Dim oPrograms, x, i, strLogFile, strFileName, UserTempPath, WindowsTempPath<br />
Dim oProgram, programId, packageId, myProgram, WinTempLog, UsrTempLog<br />
Const ForReading = 1, TemporaryFolder = 2, ForAppending = 8<br />
Set fs = CreateObject("Scripting.FileSystemObject")<br />
Set WSHShell = CreateObject("WScript.Shell")<br />
windir = WSHShell.ExpandEnvironmentStrings("%WINDIR%")<br />
UserTempPath = WSHShell.ExpandEnvironmentStrings("%TEMP%")<br />
WindowsTempPath = windir &amp; "\temp"<br />
strFileName = "RunOptionalAdverts.log"<br />
WinTempLog = WindowsTempPath &amp; "\" &amp; strFileName<br />
UsrTempLog = UserTempPath &amp; "\"&amp; strFileName<br />
strLogFile = UsrTempLog</p>
<p>CLEANLOG strLogFile<br />
COLLECTMSG "Begin Logging", ""</p>
<p>' Validate connection to SCCM Client<br />
Set oUIResource = CreateObject ("UIResource.UIResourceMgr")<br />
If oUIResource Is Nothing Then<br />
	COLLECTMSG "CONNECT TO SCCM CLIENT", "Could not create Resource Object - quitting"<br />
    wscript.echo "Could not create Resource Object - quitting"<br />
    WScript.Quit<br />
End If</p>
<p>'==========================================================================<br />
' Begin Process<br />
'==========================================================================<br />
' Call ShowPrograms routine to get array of programs available<br />
ShowPrograms</p>
<p>' Split Array And Call Sub to install<br />
For Each program In programArray<br />
	strStrings = Split (program,";")<br />
	programId = strStrings(0)<br />
	packageId = strStrings(1)<br />
	' Call RunProgam routine to invoke installation<br />
	'RunProgram programId,packageId<br />
Next</p>
<p>' Cleanup<br />
Set oProgram=Nothing<br />
Set oUIResource=Nothing</p>
<p>'==========================================================================<br />
'  Routines<br />
'==========================================================================<br />
Sub ShowPrograms<br />
    On Error Resume Next</p>
<p>    Set oPrograms = oUIResource.GetAvailableApplications</p>
<p>    If oPrograms Is Nothing Then<br />
    	COLLECTMSG "SHOWPROGRAMS", "Failed to get programs object - quitting"<br />
        wscript.echo "Failed to get programs object - quitting"<br />
        Set oUIResource=Nothing<br />
        Exit Sub<br />
    End If<br />
	strCount = oPrograms.Count<br />
	COLLECTMSG "SHOWPROGRAMS", "There are " &amp; strCount &amp; " programs"<br />
    wscript.echo "There are " &amp; strCount &amp; " programs"<br />
    wscript.echo<br />
    strCount = strCount - 1</p>
<p>    ReDim programArray(strCount)<br />
	x = 0<br />
    For Each oProgram In oPrograms<br />
    	COLLECTMSG "SHOWPROGRAMS", "ProgramName:" &amp; oProgram.Name &amp; ";" &amp; "PackageID:" &amp; oProgram.PackageId<br />
        WScript.Echo "Program Name: " &amp; oProgram.Name<br />
        WScript.Echo "  Package ID: " &amp; oProgram.PackageId<br />
		' build array<br />
		programArray(x) = oProgram.Name &amp; ";" &amp; oProgram.packageId<br />
        x = x + 1<br />
    Next<br />
End Sub</p>
<p>Sub RunProgram(programId,packageId)<br />
    On Error Resume Next<br />
' #region Disabled code<br />
'     if oUIResourceMgr.IsMandatoryProgramPending = 1 Then<br />
'         Wscript.Echo "Mandatory program pending. Try again later."<br />
'         Set oUIResource=Nothing<br />
'         Exit Sub<br />
'     End If<br />
' #endregion</p>
<p>	'  Get Program object<br />
    Set oProgram = oUIResource.GetProgram(programId,packageId)<br />
	'WScript.Echo "oProgram: " &amp; oProgram.Name<br />
    if oProgram is Nothing Then<br />
    	COLLECTMSG "RUNPROGRAMS", "Couldn't get the program"<br />
        WScript.Echo "Couldn't get the program"<br />
        Set oUIResource=Nothing<br />
        Exit Sub<br />
    End If</p>
<p>    'When was the program last ran?<br />
    Set myProgram = oUIResource.GetProgram(programId, packageId)<br />
    oldTime = myProgram.LastRunTime<br />
    COLLECTMSG "RUNPROGRAMS", "Last Run Time: " &amp; oldTime<br />
    WScript.Echo oldTime</p>
<p>    '  Execute program<br />
    COLLECTMSG "RUNPROGRAMS", "Running program: " &amp; programId &amp; " " &amp; packageId<br />
    Wscript.Echo "Running program: " &amp; programId &amp; " " &amp; packageId<br />
    oUIResource.ExecuteProgram programId, packageId, True</p>
<p>	' Wait for last ran to change...<br />
    Set myProgram = oUIResource.GetProgram(programId, packageId)<br />
    Do While myProgram.LastRunTime = oldTime<br />
    	Wscript.Sleep(2500)<br />
    	Set myProgram = oUIResource.GetProgram(programId, packageId)<br />
   	Loop<br />
   	COLLECTMSG "RUNPROGRAMS", "Return Code: " &amp; Err<br />
    WScript.Echo "Return Code: " &amp; Err<br />
End Sub</p>
<p>'*************************************************************<br />
'***  Method:       COLLECTMSG<br />
'***  Description:  Collections Errors for logging to log file<br />
'*************************************************************<br />
Sub COLLECTMSG(szLocation, errmsg)<br />
	'on error resume next<br />
	'Dim f<br />
	strmsg=errmsg<br />
   	Set f = fs.OpenTextFile(strLogFile, ForAppending, True)<br />
    strmsg =   Now &amp; " | " &amp; szLocation &amp; " | "&amp; errmsg<br />
	if err0 then<br />
		strmsg=strmsg &amp; vbCrLf _<br />
		&amp; "Error | " &amp; Hex(Err.Number) &amp; " h   (" &amp; CStr(Err.Number) &amp; ") | Description |" &amp; Err.Description<br />
	end if<br />
	f.Writeline strmsg<br />
    f.Close<br />
	strmsg=""<br />
    Err.Clear<br />
End Sub</p>
<p>Sub CLEANLOG(strLogFile)<br />
	If fs.FileExists(strLogFile) Then<br />
		fs.DeleteFile strLogFile<br />
	End If<br />
End Sub</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=88&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2009/10/13/vbscript-run-optional-sccm-advertisements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding Duplicate Drivers to SCCM SP1</title>
		<link>http://wbracken.wordpress.com/2009/09/26/adding-duplicate-drivers-to-sccm-sp1/</link>
		<comments>http://wbracken.wordpress.com/2009/09/26/adding-duplicate-drivers-to-sccm-sp1/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 18:11:36 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[SCCM]]></category>

		<guid isPermaLink="false">http://wbracken.wordpress.com/?p=74</guid>
		<description><![CDATA[Another one of the most glaring deficiencies in my opinion with OS deployment using SCCM is the inability to import the same drivers for different models.  I personally prefer to import ALL drivers for every model of machine I have versus trying to dig through other imported drivers and piece together what each model actually [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=74&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Another one of the most glaring deficiencies in my opinion with OS deployment using SCCM is the inability to import the same drivers for different models.  I personally prefer to import ALL drivers for every model of machine I have versus trying to dig through other imported drivers and piece together what each model actually needs.  It can be quite frustrating to say the least.  I break up my drivers by model and would love to out of the box (I believe this may be addressed in SP2) simply import the entire driver set in each subfolder, then create a package per model and assign the drivers from the subfolders to their respective package.  Well the good news is you CAN!  You simply have to trick SCCM into allowing you to do this.  Its quite simple actually. SCCM bases whether drivers are the &#8220;same&#8221; based on the calculated hash value of the driver files.  By simply adding a unique text file to the driver folder it creates a different hash value and allows you to import them even if the actual drivers have already been imported.  How I do it:</p>
<p>Break your drivers down by model in their own subfolders:<br />
Example:<br />
\\Server\share$\Drivers\Latitude E6500\Audio<br />
\\Server\share$\Drivers\Latitude E6500\Video<br />
Etc..</p>
<p>\\Server\share$\Drivers\Latitude E4300\Audio<br />
\\Server\share$\Drivers\Latitude E4300\Chipset<br />
etc..</p>
<p>Now open the root folder and create a new txt file based on the model.<br />
Example:<br />
\\Server\share$\Drivers\Latitude E4300\Latitude E4300.txt</p>
<p>Now copy this file to your clipboard, then do a windows search within the root directory for &#8220;*&#8221;.  Sort by type to gather all the folders at the top of the search.  Right click on EACH folder within the search and past the model specific txt file.</p>
<p>Do this for each of your driver sets and when you import them into their own sub-folder under the drivers node they will import even if the actual driver has already been imported.  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   you can now make corresponding packages for each model all with their OWN version of their drivers.</p>
<p>I know this has made my life SO much better with managing drivers in SCCM.  I hope it helps someone else.</p>
<p><strong>*UPDATE*</strong> &#8211; A MUCH quicker and simpler way to create the txt file in your driver folders can be found here:<br />
<a href="http://myitforum.com/cs2/blogs/jsandys/archive/2010/04/05/duplicate-drivers-helper-script.aspx">http://myitforum.com/cs2/blogs/jsandys/archive/2010/04/05/duplicate-drivers-helper-script.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=74&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2009/09/26/adding-duplicate-drivers-to-sccm-sp1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
		<item>
		<title>How to prevent optional PXE Adv from popping on clients</title>
		<link>http://wbracken.wordpress.com/2009/01/27/how-to-prevent-optional-pxe-adv-from-popping-on-clients/</link>
		<comments>http://wbracken.wordpress.com/2009/01/27/how-to-prevent-optional-pxe-adv-from-popping-on-clients/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 16:01:55 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[SCCM]]></category>

		<guid isPermaLink="false">http://wbracken.wordpress.com/?p=64</guid>
		<description><![CDATA[Once of the glaring deficiencies of SCCM OSD deployment (in my opinion of course) is the default behavior of an optional PXE advertisement.  Effectively if you want to have more than one pxe advertised task sequence the one that you DIDN’T execute will eventually pop up on every machine that has not run it before [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=64&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Once of the glaring deficiencies of SCCM OSD deployment (in my opinion of course) is the default behavior of an optional PXE advertisement.  Effectively if you want to have more than one pxe advertised task sequence the one that you DIDN’T execute will eventually pop up on every machine that has not run it before as an optional advertisement.  If the user clicks it and tries to run it (assuming your task sequence is set to do so) it will fail as it should be designed to only run within Windows PE.  Not a concern from a user accidentally rebuilding their own pc however not a viable option to have this popup on everyone and thus freak out the organization.  Well fortunately I have discovered a workaround for this issue.  It’s quite simple actually.  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>This is assuming you have your “PXE” TS adverts and your “Push” TS Adverts separated.<br />
*ALWAYS test any new changes in a lab environment prior to production implementation*<br />
Right-Click your PXE advertisement and go to Properties.<br />
Click the Advanced tab.<br />
Select the radio button “This task sequence can only run on the specified client platforms”<br />
Now find a platform that you will not have in your environment.  In my case I have selected “x64 Windows XP Professional SP1”.  I should not have this OS version on my network.  If I do it’s unsupported and the machine needs to be rebuilt as we currently do not support ANY x64 OS’s.  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Give that several minutes to propagate the changes.<br />
You can then turn off the mandatory advertisement.  Your client will receive the advertisement however they will reject it based on the platform restriction.  This has no effect on your PXE building since the platform is not evaluated as part of the PXE build process.</p>
<p>You can now have multiple PXE adverts.  This is invaluable for testing build updates, etc.</p>
<p>One thing to keep in mind is that when you make your adverts optional the auto PXE boot (after selecting the network card as your boot device) goes away and you must press F12 (again) to initiate the connection.</p>
<p>I have found a workaround for this in my environment however the big disclaimer here is that this is NOT a supported solution from Microsoft.</p>
<p>F12 workaround:<br />
On your WDS server(s) navigate to<br />
D:\RemoteInstall\SMSBoot\x86<br />
Make a copy of your pxeboot.com (the version that prompts you to press F12)<br />
Delete the original pxeboot.com<br />
Make a copy of pxeboot.n12 (the version that bypasses the additional F12 prompt)<br />
Rename this copy to pxeboot.com<br />
Flag this file as READ-ONLY.  If you do not do this the next reboot of your server will revert this file back.<br />
Restart your WDS service and away you go.</p>
<p>Hope this helps someone else out there!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=64&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2009/01/27/how-to-prevent-optional-pxe-adv-from-popping-on-clients/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows 7 Beta &#8211; Impressions</title>
		<link>http://wbracken.wordpress.com/2009/01/13/windows-7-beta-impressions/</link>
		<comments>http://wbracken.wordpress.com/2009/01/13/windows-7-beta-impressions/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 22:15:46 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://wbracken.wordpress.com/?p=61</guid>
		<description><![CDATA[Hello, It has been quite some time since I have updated any entries on this blog.  Seems like everyday I get more and more to do so less time to post blogs!  Anyway, I currently typing this post from a Windows 7 Beta machine (ie8).  I rolled my production Dell Latitude E6500 to Windows 7 the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=61&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello, It has been quite some time since I have updated any entries on this blog.  Seems like everyday I get more and more to do so less time to post blogs! </p>
<p>Anyway, I currently typing this post from a Windows 7 Beta machine (ie8).  I rolled my production Dell Latitude E6500 to Windows 7 the day the public Beta was released and so far (barring one Explorer.exe crash) I have to say I am fairly jazzed.  All the Vista drivers loaded no problem and pound for pound it is using less resources than Vista did.  The performance in general really just feels much more solid than Vista and this is still Beta!  Some of the new functionality that is built into W7&#8242;s Areo is actually quite functional.   The new &#8220;Show Desktop&#8221; is pretty freakin cool.  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I am running this Beta in production right now joined to our domain so I will be putting it to the coals so to speak.  With this being Beta, barring any major screwups this could be the new generation OS I have been waiting for.  Its nice be excited again about a new desktop OS.  I was very disappointed with Vista sadly (as were many) so it appears that MS may be back on track.  Keeping my fingers crossed!</p>
<p>I&#8217;ll post back with more info after I give it a proper go.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=61&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2009/01/13/windows-7-beta-impressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
		<item>
		<title>Export Computer list from AD</title>
		<link>http://wbracken.wordpress.com/2008/10/21/export-computer-list-from-ad/</link>
		<comments>http://wbracken.wordpress.com/2008/10/21/export-computer-list-from-ad/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 14:27:33 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[AD]]></category>

		<guid isPermaLink="false">http://wbracken.wordpress.com/?p=54</guid>
		<description><![CDATA[I find myself using this quite often so I figured I would post here for a nice copy and paste for future uses.  *Requires Windows 2003 Admin tools (adminpak.msi) to be installed Export computer objects from a specified OU and all sub OU&#8217;s(careful of wordwrap): dsquery computer &#8220;ou=laptops,ou=devices,ou=site,dc=subdomain,dc=domain,dc=com&#8221; -limit 0 -o samid &#62;&#62;Laptops.txt -limit 0 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=54&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I find myself using this quite often so I figured I would post here for a nice copy and paste for future uses.  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
*Requires Windows 2003 Admin tools (adminpak.msi) to be installed</p>
<p><strong>Export computer objects from a specified OU and all sub OU&#8217;s</strong>(careful of wordwrap)<strong>:</strong></p>
<blockquote><p><span style="color:#008000;">dsquery computer &#8220;ou=laptops,ou=devices,ou=site,dc=subdomain,dc=domain,dc=com&#8221; -limit 0 -o samid &gt;&gt;Laptops.txt</span></p></blockquote>
<p>-limit 0 tells the script to return ALL matching values (Default is 100)<br />
-o samid tells the script to return the &#8220;friendly&#8221; name. (Default is the full DN)</p>
<p>Obviously replace the values with ones specific to your environment.  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=54&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2008/10/21/export-computer-list-from-ad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
		<item>
		<title>Image Capture: VPC vs VMWare</title>
		<link>http://wbracken.wordpress.com/2008/10/20/image-capture-vpc-vs-vmware/</link>
		<comments>http://wbracken.wordpress.com/2008/10/20/image-capture-vpc-vs-vmware/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 13:39:06 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[SCCM]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://wbracken.wordpress.com/?p=52</guid>
		<description><![CDATA[Just thought I may be able to save someone else out there a headache.. Although I am typically a much bigger proponent of VMWare products in terms of performance I found out the hard way that building and capturing an image from VMWare (Server 2.0) works great in most cases for newer hardware. I also [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=52&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just thought I may be able to save someone else out there a headache..</p>
<p>Although I am typically a much bigger proponent of VMWare products in terms of performance I found out the hard way that building and capturing an image from VMWare (Server 2.0) works great in most cases for newer hardware.  I also discovered that the &#8220;IDE&#8221; mass storage driver in VMWare Server 2.0 would not allow the image to boot on older hardware (think Latitude D800, 600, etc).  I spent a couple of days trying to find a set of driver that I could inject to get the machines working but to no avail.  I had used Virtual PC 2007 in the past to build and capture but the performance is so lacking compared to VMWare I figured I would start there first.  Well a long story short, after I went back to using Virtual PC 2007 (SP1) as my base machine for build and capture my &#8220;older&#8221; hardware is now back to booting properly and my newer hardware continues to function by injecting their mass storage drives as needed.</p>
<p>The moral of the story?  Use Virtual PC 2007 to build and capture your image!  Then you can turn it off and use VMWare for everything else.  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=52&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2008/10/20/image-capture-vpc-vs-vmware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
		<item>
		<title>PXEFilter.vbs update to auto clear last PXE Advert</title>
		<link>http://wbracken.wordpress.com/2008/09/27/hello-world/</link>
		<comments>http://wbracken.wordpress.com/2008/09/27/hello-world/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 18:09:51 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[SCCM]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[MDT 2008]]></category>
		<category><![CDATA[PXE]]></category>
		<category><![CDATA[WDS]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[** This script has been deprecated with the release of SCCM 2007 R2.  It supports &#8220;Unknown Machines&#8221; inherently I have modified the PXEFilter.vbs that ships with MDT 2008 to automatically clear the last PXE advertisement of the machine that is PXE booting. This allows me to set a mandatory assignment for my OS Deployment and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=1&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>** This script has been deprecated with the release of SCCM 2007 R2.  It supports &#8220;Unknown Machines&#8221; inherently</p>
<p><span style="text-decoration:line-through;">I have modified the PXEFilter.vbs that ships with MDT 2008 to automatically clear the last PXE advertisement of the machine that is PXE booting. This allows me to set a mandatory assignment for my OS Deployment and removes the requirement for field techs to have to open the admin console to re-image a machine via PXE.</span></p>
<p><span style="text-decoration:line-through;">The section I added was:</span></p>
<blockquote><p><span style="text-decoration:line-through;">&#8216;//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
&#8216;// Clear Last PXE Advertisement<br />
&#8216;//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
On Error Resume Next<br />
Dim resources<br />
Dim InParams</span></p>
<p><span style="text-decoration:line-through;">&#8216; Set up the Resource array parameter.<br />
resources = Array(1)<br />
resources(0) = iResourceID</span></p>
<p><span style="text-decoration:line-through;">Set InParams = oSMS.Get(&#8220;SMS_Collection&#8221;).Methods_(&#8220;ClearLastNBSAdvForMachines&#8221;).InParameters.SpawnInstance_<br />
InParams.ResourceIDs = resources</span></p>
<p><span style="text-decoration:line-through;">oSMS.ExecMethod &#8220;SMS_Collection&#8221;,&#8221;ClearLastNBSAdvForMachines&#8221;, InParams</span></p>
<p><span style="text-decoration:line-through;">if Err.number &lt;&gt; 0 Then<br />
PXE.LogTrace &#8220;Failed to clear PXE advertisement for resource: &#8221; &amp; iResourceID<br />
Else<br />
PXE.LogTrace &#8220;Clear PXE Advertisement Completed successfully for resource: &#8221; &amp; iResourceID<br />
End If<br />
</span></p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=1&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2008/09/27/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
		<item>
		<title>Cleanup WSUS 3.0 Sync History</title>
		<link>http://wbracken.wordpress.com/2008/09/27/cleanup-wsus-30-sync-history/</link>
		<comments>http://wbracken.wordpress.com/2008/09/27/cleanup-wsus-30-sync-history/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 18:57:53 +0000</pubDate>
		<dc:creator>William Bracken</dc:creator>
				<category><![CDATA[WSUS]]></category>

		<guid isPermaLink="false">http://wbracken.wordpress.com/?p=27</guid>
		<description><![CDATA[As any WSUS admin knows, the sync history for some unknown reason is not an option for cleanup using the built in cleanup wizard. This can result in excruciating load times when trying to view the sync history. Hopefully Microsoft will correct this in future releases however until then you can execute the following query [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=27&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As any WSUS admin knows, the sync history for some unknown reason is not an option for cleanup using the built in cleanup wizard. This can result in excruciating load times when trying to view the sync history. Hopefully Microsoft will correct this in future releases however until then you can execute the following query against your WSUS DB to cleanup the Sync events.</p>
<p><code>DELETE FROM [SUSDB].[dbo].[tbEventInstance]<br />
WHERE [EventID]=381 or [EventID]=382 or [EventID]=384 or [EventID]=386 or [EventID]=387</code></p>
<p>You may consider running this as a part of your monthly maintenance.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wbracken.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wbracken.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wbracken.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wbracken.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wbracken.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wbracken.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wbracken.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wbracken.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wbracken.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wbracken.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wbracken.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wbracken.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wbracken.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wbracken.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wbracken.wordpress.com&amp;blog=4999662&amp;post=27&amp;subd=wbracken&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wbracken.wordpress.com/2008/09/27/cleanup-wsus-30-sync-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9dc8cb63bc5bb70fa10e901965d388d4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbracken</media:title>
		</media:content>
	</item>
	</channel>
</rss>
