<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10074565</id><updated>2012-01-29T04:43:39.468Z</updated><category term='Windows Updates'/><category term='VMWare'/><category term='Team Foundation Server'/><category term='SCCM'/><category term='Powershell'/><category term='Project Server 2007'/><category term='PPS'/><category term='SQL Server'/><category term='SharePoint'/><category term='Traveling'/><category term='Patches'/><category term='Security'/><category term='SSL/TLS'/><category term='Operations Manager'/><category term='OpsMgr'/><category term='Portfolio Server 2007'/><category term='SQL Report Server'/><title type='text'>cornasdf's field</title><subtitle type='html'>personal and technical musings.  published as often as my real life allows.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>89</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10074565.post-8265366482076448557</id><published>2012-01-27T11:59:00.000Z</published><updated>2012-01-27T11:59:02.856Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCCM'/><title type='text'>ccmexec crashing on windows 2008 r2</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;Hey all,&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I have been tracking an issue for some time.&amp;nbsp; I have no fix but some things are becoming clear and I just found a good way to scope the problem, hence this post…&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I am running Systems Center Configuration Manager 2007 SP2 R2 and I have been getting this error on some seemingly random set of my windows 2008 r2 servers:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Log Name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Application&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Source:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Application Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/27/2012 5:52:09 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Event ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Task Category: (100)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Level:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Keywords:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Classic&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;User:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Computer:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxxxxxxxxxxxxx&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Faulting application name: CcmExec.exe, version: 4.0.6487.2000, time stamp: 0x4ab33e4d&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Exception code: 0xc0000005&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Fault offset: 0x0009ce04&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Faulting process id: 0x1d58&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Faulting application start time: 0x01ccdcd93adaa8bf&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Faulting application path: C:\Windows\SysWOW64\CCM\CcmExec.exe&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Faulting module path: C:\Windows\SysWOW64\ntdll.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;Report Id: f570d39f-48d4-11e1-b96c-6431504ea6e0&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Notes from&amp;nbsp;&lt;a href="http://t3chn1ck.wordpress.com/2010/11/12/sccm-2007-client-crashes-on-win2k8-r2/"&gt;this page&lt;/a&gt;&amp;nbsp;and especially the german write up&amp;nbsp;&lt;a href="http://www.markus-tech-blog.de/2011/11/29/configmgr2007-agent-sturzt-stundlich-ab/"&gt;here&lt;/a&gt;&amp;nbsp;(translation&amp;nbsp;&lt;a href="http://www.microsofttranslator.com/bv.aspx?ref=Internal&amp;amp;from=de&amp;amp;to=en&amp;amp;a=http://www.markus-tech-blog.de/2011/11/29/configmgr2007-agent-sturzt-stundlich-ab/"&gt;here&lt;/a&gt;) were very helpful.&amp;nbsp; &amp;nbsp;To briefly summarize, when you run resource explorer, you create an ETS performance trace called: &amp;nbsp;WDC.BE95A9B1-DE15-4B78-B923-A12AB70BE951. &amp;nbsp;You can verify this by running ‘logman query –ets’ or in server manager -&amp;gt; Diagnostics -&amp;gt; Performance -&amp;gt; Data Collector Sets -&amp;gt; Event Trace Sessions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Apparently the sccm client dislikes this trace and will crash, in my case every 65 minutes.&amp;nbsp; Stopping the trace reportedly fixes it, I am still testing before I fully believe that.&amp;nbsp; I have not found it necessary to reboot/reinstall etc as are suggested elsewhere.&amp;nbsp; Stopping the trace will kill your Resource Monitor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Next step would be looking into the trace to see if it is possible to adjust the trace.&amp;nbsp; Word is MS is refusing to fix it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The only thing I have to add is that I am seeing a status message of 669 (2 in fact) each time this happens.&amp;nbsp; So in order to determine which machines this is happening on, run the report&amp;nbsp;&lt;b&gt;Status Messages -&amp;gt; All messages for a specific message ID&lt;/b&gt;&amp;nbsp;and query for message ID&amp;nbsp;&lt;b&gt;669&lt;/b&gt;.&amp;nbsp; Exported to excel (so I could mask server/site names more easily), it looks like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: -0.75pt; width: 781px;"&gt;&lt;tbody&gt;&lt;tr style="height: 14.25pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: double; border-bottom-width: 2.25pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: initial; border-right-style: none; border-right-width: initial; border-top-color: black; border-top-style: double; border-top-width: 2.25pt; height: 14.25pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="bottom" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: darkred; font-family: Tahoma, sans-serif;"&gt;Record ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: double; border-bottom-width: 2.25pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: initial; border-right-style: none; border-right-width: initial; border-top-color: black; border-top-style: double; border-top-width: 2.25pt; height: 14.25pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="bottom" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: darkred; font-family: Tahoma, sans-serif;"&gt;Severity&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: double; border-bottom-width: 2.25pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: initial; border-right-style: none; border-right-width: initial; border-top-color: black; border-top-style: double; border-top-width: 2.25pt; height: 14.25pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="bottom" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: darkred; font-family: Tahoma, sans-serif;"&gt;Message ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: double; border-bottom-width: 2.25pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: initial; border-right-style: none; border-right-width: initial; border-top-color: black; border-top-style: double; border-top-width: 2.25pt; height: 14.25pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="bottom" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: darkred; font-family: Tahoma, sans-serif;"&gt;Component&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: double; border-bottom-width: 2.25pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: initial; border-right-style: none; border-right-width: initial; border-top-color: black; border-top-style: double; border-top-width: 2.25pt; height: 14.25pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="bottom" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: darkred; font-family: Tahoma, sans-serif;"&gt;Computer Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: double; border-bottom-width: 2.25pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: initial; border-right-style: none; border-right-width: initial; border-top-color: black; border-top-style: double; border-top-width: 2.25pt; height: 14.25pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="bottom" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: darkred; font-family: Tahoma, sans-serif;"&gt;Time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: black; border-bottom-style: double; border-bottom-width: 2.25pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: initial; border-right-style: none; border-right-width: initial; border-top-color: black; border-top-style: double; border-top-width: 2.25pt; height: 14.25pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="bottom" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: darkred; font-family: Tahoma, sans-serif;"&gt;Site Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012608&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SCCM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 6:15:46 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012605&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--WEB3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 6:08:23 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012607&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--WEB3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 6:08:23 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012602&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--WEB2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:51:38 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012604&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--WEB2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:51:38 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012601&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SQLA2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:50:07 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012603&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SQLA2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:50:07 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012599&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--WEB1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:44:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012600&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--WEB1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:44:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012596&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SQLA1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:32:24 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012598&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SQLA1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:32:24 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012591&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SQLA2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:24:14 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012593&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SQLA2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:24:14 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012590&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SQLB1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:21:40 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012592&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SQLB1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:21:40 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012584&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SCCM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:10:17 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012585&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--SCCM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:10:17 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012577&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--WEB3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:02:27 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012583&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--WEB3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 5:02:27 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.75pt;"&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 68.25pt;" valign="top" width="91"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1012574&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 58.8pt;" valign="top" width="78"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 76.2pt;" valign="top" width="102"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;669&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1.25in;" valign="top" width="120"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;Advanced Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 103.5pt;" valign="top" width="138"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SERVER--WEB2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;1/27/2012 4:45:50 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="background-attachment: initial; background-clip: initial; background-color: gainsboro; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 12.75pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 1in;" valign="top" width="96"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Tahoma, sans-serif; font-size: 10pt;"&gt;SC1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;According to the ever handy&amp;nbsp;&lt;a href="http://www.systemcentercentral.com/BlogDetails/tabid/143/IndexID/84135/Default.aspx"&gt;SystemCenterCentral&lt;/a&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Arial, sans-serif;"&gt;Message ID 669:&lt;/span&gt;&lt;/b&gt;&lt;span class="apple-converted-space"&gt;&lt;span style="font-family: Arial, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif;"&gt;This message is caused when SCCM component raised an exception but failed to handle it. We should further investigate this problem.&lt;/span&gt;&lt;span style="font-size: 13.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;So this could easily be from something else but this crash seems to be the primary (only) error I am seeing in my sites that is sending this message.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Please respond if you have any more details to add…&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br class="Apple-interchange-newline" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-8265366482076448557?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/8265366482076448557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2012/01/ccmexec-crashing-on-windows-2008-r2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/8265366482076448557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/8265366482076448557'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2012/01/ccmexec-crashing-on-windows-2008-r2.html' title='ccmexec crashing on windows 2008 r2'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-3584367078133508588</id><published>2011-10-25T15:54:00.000Z</published><updated>2011-10-25T16:01:07.414Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><title type='text'>Exporting songs in Windows Media Player by star rating</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="WordSection1"&gt;&lt;div class="MsoNormal"&gt;So, I used &lt;a href="http://cornasdf.blogspot.com/2007/05/moving-from-itunes-to-wmp-11.html"&gt; this&lt;/a&gt; some forever ago to move song ratings from iTunes to Windows Media Player with a powershell function.&amp;nbsp; Now I wanted to export the ratings to a file so I have that list outside of wmp. &amp;nbsp;Annoyingly, i didn't see a way to export the song list, saving the playlist just saved the search terms. &amp;nbsp;Meh, powershell to the rescue, yet again...&lt;br /&gt;&lt;br /&gt;This function will export the name of all files w/ ‘-starcount’  stars.&amp;nbsp; Could be trivially modified to export other details.&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;get-playlistbyStars&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;param&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$starcount&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; $(&lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;throw&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"need -starcount"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#get WMP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$wmp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;New-object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;-COM&lt;/span&gt;&lt;/i&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;WMPlayer.OCX&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$WMPLibrary&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$wmp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.mediaCollection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#set vars&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$rated&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$processed&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$added&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$unrated&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$1star&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$2star&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$3star&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$4star&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$5star&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$defstar&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ctr&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$allsongs&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$WMPLibrary&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.getall()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colOut&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; @()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;for&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-lt&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$allsongs&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.count; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;++) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$processed&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$allsongs&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Item(&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (@(&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;".jpg"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;".png"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-notcontains&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ([&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;System.IO.FileInfo&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;]&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.sourceURL).Extension  ) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;switch&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.getiteminfo(&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"UserRating"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;))  {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"0"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$unrated&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$starcount&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colOut&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.sourceURL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"1"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$1star&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$rated&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$starcount&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 1) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colOut&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.sourceURL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"25"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$2star&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$rated&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$starcount&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 2) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colOut&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.sourceURL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"50"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$3star&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$rated&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$starcount&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 3) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colOut&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.sourceURL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"75"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$4star&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$rated&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$starcount&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 4) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colOut&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.sourceURL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"99"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$5star&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$rated&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$starcount&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 5) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colOut&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.sourceURL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;default&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#so I have something to query for random nums&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$defstar&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$starcount&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 42) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colOut&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$song&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.sourceURL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#so I have something to watch&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ctr&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;++&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ctr&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;%&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;500 &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0) { &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ctr&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 13px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#output results&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Processed:&amp;nbsp; $processed"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Rated:&amp;nbsp; $rated"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Added:&amp;nbsp; $added"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"1:&amp;nbsp; $1star "&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"2:&amp;nbsp; $2star "&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"3:&amp;nbsp; $3star"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"4:&amp;nbsp; $4star "&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"5:&amp;nbsp; $5star"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-verbose&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"def:&amp;nbsp; $defstar"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colOut&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;get-playlistbyStars&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 3 | out-file –filepath .\3starsongs.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-3584367078133508588?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/3584367078133508588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2011/10/exporting-songs-in-windows-media-player.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/3584367078133508588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/3584367078133508588'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2011/10/exporting-songs-in-windows-media-player.html' title='Exporting songs in Windows Media Player by star rating'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-4982143922529929676</id><published>2011-10-14T13:29:00.002Z</published><updated>2011-10-25T15:58:40.714Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL and Powershell: Attach all database mdf files in a directory</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="WordSection1"&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black; font-family: Arial, sans-serif;"&gt;Hey all, &lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 12.0pt;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black; font-family: Arial, sans-serif;"&gt;I didn’t find this elsewhere on the web and I needed it. Since I actually had to do work, i figure I should give it out and spare somebody else that pain. &lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 12.0pt;"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black; font-family: Arial, sans-serif;"&gt;As part of a failover plan, I am synchronizing directories of sql files. In a failover, I am going to need to bring up a group of databases in a specific directory. The script below will take in a directory name and a SQL instance. It will get all the .mdf files in the directory and compare them against the database files attached to the SQL instance. Any files that are not attached already are attached, extrapolating the filename from the .mdf file. The MAJOR ASSUMPTION here is that you want to name your Database the same name as the .mdf file (without the .mdf). Several of my dbs have multiple files so I read the .mdf to get all the files it knows about. Another major ASSUMPTION is that you are replicating to/attaching from the same file paths on your new server.&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black; font-family: Arial, sans-serif;"&gt;I use my &lt;a href="http://cornasdf.blogspot.com/2009/06/powershell-standard-logging-function.html"&gt;out-log function&lt;/a&gt;. if you don’t want to use it, replace out-log with write-host in the below script.&lt;/span&gt;&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;AttachMDFsInDir&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;param&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$dir&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; $( &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;throw&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Must specify -dir"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$instance&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; $( &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;throw&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Must specify -instance"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$verbosity&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 1 &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;# for the out-log function. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;out-log&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Starting AttachMDFsInDir with dir: $dir and inst: $instance"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$srv&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;new-Object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;Microsoft.SqlServer.Management.Smo.Server&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$instance&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out-log &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Connected to $($srv.Name)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#get a list of all attached database file names&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colAttachedMDFs&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; @()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$db&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$srv&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Databases ) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$fg&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$db&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Filegroups) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$file&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$fg&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Files) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out-log &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Adding to `$colattachedMDFs: $($file.Filename)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colAttachedMDFs&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$file&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Filename&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out-log &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Found $($colAttachedMDFs.count) mdfs attached in $instance"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#foreach mdf in $groupSQLDir&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colMDFsToAttach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; @()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$mdf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;dir&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"$dir\*.mdf"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-not&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colAttachedMDFs&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-contains&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$mdf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out-log &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Adding to `$colMDFsToAttach: $($mdf.Fullname)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colMDFsToAttach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$mdf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.FullName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Remove-Variable&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;mdf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Remove-Variable&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;file&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out-log &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Found $($colMDFsToAttach.count) mdf(s) in the directory that are unattached"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$mdf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colMDFsToAttach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#determine name to restore as from mdf file name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DBNameFromFile&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ([&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;System.IO.FileInfo&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;]&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$mdf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;).Basename&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;out-log&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Named the db $DBNameFromFile based on the mdf: $mdf"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#get list of files&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colDBFiles&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$srv&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.EnumDetachedDatabaseFiles(&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$mdf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out-log &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"$mdf specifies $($coldbfiles.count) files to attach."&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out-log &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colDBFiles&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#add to collection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$files&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;new-object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;system.collections.specialized.stringcollection&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$file&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colDBFiles&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$files&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Add(&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$file&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;out-log&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Ready to attach db: $DBNameFromFile w/ $($files.count) files."&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#attach database&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$srv&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.AttachDatabase(&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DBNameFromFile&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$files&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Trebuchet MS', sans-serif;"&gt;As a corollary to the above, i needed to check which of my dbs on the running servers did not have the same name as their .mdf. you can use this loop.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$instances&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; @(&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"SERV\Inst1","Serv\INST2")&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$instance&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$instances&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$srv&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;new-Object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;Microsoft.SqlServer.Management.Smo.Server&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$instance&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;""&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"------------------------"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$srv&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"------------------------"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$db&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$srv&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Databases ) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$fg&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$db&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Filegroups) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$file&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$fg&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Files) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$Fileinf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; [&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;System.IO.FileInfo&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;]&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$file&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.filename&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$Fileinf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.extension &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;".mdf"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$Fileinf&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.BaseName &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$db&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.name) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#"File: $($Fileinf.Basename) matches $($db.name)"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;else&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Filename: $($Fileinf.Basename) DOES NOT MATCH DB Name: $($db.name)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 13px;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-4982143922529929676?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/4982143922529929676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2011/10/sql-and-powershell-attach-all-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/4982143922529929676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/4982143922529929676'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2011/10/sql-and-powershell-attach-all-database.html' title='SQL and Powershell: Attach all database mdf files in a directory'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-6366213328721280481</id><published>2011-06-28T11:23:00.004Z</published><updated>2011-06-28T11:24:58.613Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='SCCM'/><title type='text'>SCCM Child Primary site not replicating Update lists or deployments</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;We ran across an issue this weekend with one of our SCCM child primary sites not replicating deployments or software update lists correctly.&amp;nbsp; 2 of 3 primary sites were replicating fine but one primary was not getting new items.&amp;nbsp; For this article, I will represent my central site as CEN and the non working primary site as PRI (imaginative, I know).&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;After several hours with the configuration manager logs, I had pretty much tracked it down to bad configuration items (patches) but I was stuck on what to do after trying various sync options, mostly detailed here:&amp;nbsp; &lt;a href="http://blogcastrepository.com/blogs/brian_tucker/archive/2009/06/18/how-to-resolve-site-replication-issues-with-sccm-2007-sp1-r2.aspx"&gt;http://blogcastrepository.com/blogs/brian_tucker/archive/2009/06/18/how-to-resolve-site-replication-issues-with-sccm-2007-sp1-r2.aspx&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I called MS support and he gave me a set up queries to help figure out what was going on. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;At the end of the day, the problem can be seen in objreplmgr.log and you see sets of lines like:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in;"&gt;Processing replication file C:\Program Files\Microsoft Configuration Manager\inboxes\objmgr.box\INCOMING\Retry\CEN_48964.CID in retry.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SMS_OBJECT_REPLICATION_MANAGER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/27/2011 9:42:31 AM&amp;nbsp;&amp;nbsp;&amp;nbsp; 5640 (0x1608)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in;"&gt;Referenced configuration items are not available yet: http://schemas.microsoft.com/systemsmanagementserver/&lt;span class="Apple-style-span" style="color: red;"&gt;Site_A4F5CBC7-3D34-4DC1-A024-C496694647C5/SUM_914207c8-1e32-4e4e-acee-7ebdce4568b2&lt;/span&gt;/2(2)(6);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SMS_OBJECT_REPLICATION_MANAGER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/27/2011 9:42:31 AM&amp;nbsp;&amp;nbsp;&amp;nbsp; 5640 (0x1608)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in;"&gt;Failed to insert Object e5c2a931-5c7c-4c0b-843a-343525f73e3d from replication file C:\Program Files\Microsoft Configuration Manager\inboxes\objmgr.box\INCOMING\Retry\CEN_48964.CID.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SMS_OBJECT_REPLICATION_MANAGER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/27/2011 9:42:31 AM&amp;nbsp;&amp;nbsp;&amp;nbsp; 5640 (0x1608)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Note the unique package name highlighted in red above.&amp;nbsp; This is the key string.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;We did do an ‘attempt 1’ that was unsuccessful but may be worth trying.&amp;nbsp; In this, we extract just the GUID of the CI and update the date in the CEN database and hope it replicates down.&amp;nbsp; Get the GUID from the highlighted string above as everything after the SUM_.&amp;nbsp; In our case it would be &lt;span style="color: red;"&gt;914207c8-1e32-4e4e-acee-7ebdce4568b2&lt;/span&gt;.&amp;nbsp; In the query below, we have multiple CIs identified, you can put as many as you want in the query (gathered from different log lines).&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;Update ci_configurationitems&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;set datelastmodified = getdate()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;where ci_uniqueid in (‘&lt;/span&gt;&lt;span style="color: red;"&gt;914207c8-1e32-4e4e-acee-7ebdce4568b2&lt;/span&gt;’&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;,'&lt;/span&gt; c4fca437-b931-48fc-a6bf-6cc7d0aefc2d’&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;This didn’t do anything useful in our case so we continued on to ‘Attempt 2’.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;If you take your whole string and do a select in your SCCM database on both the primary and the central sites:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none; text-indent: .5in;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;SELECT * FROM ci_sdmpackages where SDMPackageName in (‘&lt;/span&gt;&lt;span style="color: red;"&gt;Site_A4F5CBC7-3D34-4DC1-A024-C496694647C5/SUM_914207c8-1e32-4e4e-acee-7ebdce4568b2&lt;/span&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;’)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Take note of the isDeleted and the SDMPackageVersion columns.&amp;nbsp; For me, 95% of the items showing up in the logs were showing up as deleted in CEN but not in PRI.&amp;nbsp; This can be fixed by running an update like:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;update ci_sdmpackages&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;&amp;nbsp;&amp;nbsp; set Isdeleted = 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;&amp;nbsp;&amp;nbsp; where SDMPackageName = '&lt;/span&gt;&lt;span style="color: red;"&gt; Site_A4F5CBC7-3D34-4DC1-A024-C496694647C5/SUM_914207c8-1e32-4e4e-acee-7ebdce4568b2&lt;/span&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;’ and SDMPackageVersion = '3'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Note that you will change the GUID and the SDMPackage version.&amp;nbsp; You want to update your PRI site to match CEN.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;One your DB is updated, you can move your replication file as ID’d above (CEN_48964.CID in this case) from the objmgr.box\incoming\retry to objmgr.box\incoming.&amp;nbsp; Watch&amp;nbsp; your objreplmgr.log for success.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Now, that worked but I had 110 CIDs to work through and I heartily ascribe to larry wall’s &lt;a href="http://en.wikipedia.org/wiki/Larry_Wall#Virtues_of_a_programmer"&gt;3 virtues&lt;/a&gt;.&amp;nbsp; in order to shorten my workload a bit, this is how I did it.&amp;nbsp; I didn’t have any good way to communicate between sites, unfortunately.&amp;nbsp; If I did, I would have done this much more directly.&amp;nbsp; I was on a bit of a deadline to get this up so I went for speed over elegance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -.25in;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;1.&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Get all the guids.&amp;nbsp; I ran the following against the objreplmgr.log to pull out just my relevant configuration item IDs.&amp;nbsp; I ran this against a copy w/ just one run of ‘failures’ initially but we do sort out unique so you can probably just run it against the real thing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$a&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;get-content&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; .\&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;objreplmgr.log&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;where&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$_&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-match&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Referenced configuration items are not available"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ciList&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; @()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;Foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$line&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$a&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$line&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-match&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;".*(Site_.*/SUM_.*?)/.*"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ciList&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$Matches&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;[1]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -.25in;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;2.&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;I tried to strip out duplicates.&amp;nbsp; On my first run this only saved 2 items, next run saved me much more.&amp;nbsp; If you run against the whole log, this is more important.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ciListSorted&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ciList&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;sort&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;–Unique&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -.25in;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;3.&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Create my sql query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$sqlQuery&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"SELECT * FROM ci_sdmpackages where SDMPackageName in ("&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;for&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;0; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-lt&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ciListSorted&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.length &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 1; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;++) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$sqlQuery&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"'$($ciListSorted[$i])', "&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$sqlQuery&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"'$($ciListSorted[$ciListSorted.Length-1])')"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -.25in;"&gt;&lt;span style="color: black; font-family: 'MS Shell Dlg 2', sans-serif; font-size: 8.5pt;"&gt;4.&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Run the sql query against both databases.&amp;nbsp; I have this function in my standard library that I stole some time ago:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;query-SQL&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;param&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DBInstance&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$Datatabase&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$Query&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlConnection&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;New-Object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;System.Data.SqlClient.SqlConnection&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlConnection&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.ConnectionString &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Server = $DBInstance; Database =$Database; Integrated Security = True"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlCmd&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;New-Object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;System.Data.SqlClient.SqlCommand&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlCmd&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.CommandText &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$Query&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlCmd&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Connection &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlConnection&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlAdapter&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;New-Object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;System.Data.SqlClient.SqlDataAdapter&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlAdapter&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.SelectCommand &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlCmd&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DataSet&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;New-Object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;System.Data.DataSet&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlAdapter&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Fill(&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DataSet&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SqlConnection&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Close()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DataSet&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Tables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;Run against my Primary database&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;colPRI&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; query-SQL -Datatabase &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$database&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; -DBInstance &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$dbinstance&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; -Query &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$sqlQuery&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PRI&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; @()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;Foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$line&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colPRI&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;[1]) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PRI&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"PRI,$($line.isDeleted),$($line.SDMPackageName),$($line.SDMPackageVersion)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PRI&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &amp;gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;PRI.csv&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: .25in;"&gt;For the CEN site, I manually copied the sql query over w/ &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none; text-indent: .25in;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$sqlQuery&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Out-File&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;sqlquery.txt&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-indent: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: .25in;"&gt;Created the text file on the other side and brought it back in and ran it like so:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$sqlquery&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Get-Content&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; .\&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;sqlquery.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colCEN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; query-SQL -Datatabase &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$database&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; -DBInstance &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$dbinstance&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; -Query &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$sqlQuery&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CEN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; @()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;Foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$line&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$colCEN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;[1]) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CEN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"CEN,$($line.isDeleted),$($line.SDMPackageName),$($line.SDMPackageVersion)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CEN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &amp;gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;CEN.csv&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: .25in;"&gt;Then, I brought my CEN.csv back over to PRI and brought it back to my powershell env.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CEN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Get-Content&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; .\&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;cen.csv&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;Now we have $CEN and $PRI that are effectively .csv files in a variable.&amp;nbsp; Check your lengths, do some spot verification that they are the same length and have the same IDs in the same order, etc.&amp;nbsp; We did sort them above and everything should be fine and loop below does some checking but, well, defense in depth.&amp;nbsp; Did you remember to back up your databases?&amp;nbsp; Not my problem if not.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: .25in;"&gt;This loop spins through your two arrays and sets the PRI database to match what is in the CEN database.&amp;nbsp; Note the query-sql line, you will need $database and $DBInstance defined already. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;for&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-lt&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PRI&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.length &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;1; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;++) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$site&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CenIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CenID&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CenVersion&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CEN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;[&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;].split(&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;","&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$site&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PriIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PriID&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PriVersion&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PRI&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;[&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;].split(&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;","&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CenIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"True"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) { &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CenIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;1 } &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;else&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; { &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CenIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PriIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"True"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) { &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PriIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;1 } &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;else&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; { &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PriIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: 'Courier New'; font-size: 10pt;"&gt;#Make sure our lines are the same&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-not&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CenID&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PriID&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;throw&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"iteration $i, $CenID not equal to $PriID"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ((&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PriIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-ne&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CenIsDel&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-or&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$PriVersion&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-ne&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$CenVersion&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$query&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"update ci_sdmpackages set Isdeleted = $CenIsDel where SDMPackageName = '$CenID' and SDMPackageVersion = '$CenVersion'"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Setting $PriID to $CenisDel and $CenVersion"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query-sql -database &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$database&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; -dbinstance &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$dbinstance&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; -query &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$query&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; } &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;else&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"$PriId already matches central"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: .25in;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;After this, I dropped all the files from objmgr.box\incoming\retry back into objmgr.box\incoming.&amp;nbsp; Success!&amp;nbsp; Well, mostly.&amp;nbsp; I still had about 8 bad CIDs.&amp;nbsp; Looking in the log, some of them were due to lines that had two CIs mentioned.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in;"&gt;Referenced configuration items are not available yet: &lt;a href="http://schemas.microsoft.com/systemsmanagementserver/Site_A4F5CBC7-3D34-4DC1-A024-C496694647C5/SUM_40d3d142-5ea7-463c-a7c1-"&gt;http://schemas.microsoft.com/systemsmanagementserver/Site_A4F5CBC7-3D34-4DC1-A024-C496694647C5/SUM_40d3d142-5ea7-463c-a7c1-&lt;/a&gt;&lt;span style="color: red;"&gt;9d34cdd5a7fc&lt;/span&gt;/1(1)(6);http://schemas.microsoft.com/systemsmanagementserver/&lt;span style="color: red;"&gt;Site_A4F5CBC7-3D34-4DC1-A024-C496694647C5/SUM_c4fca437-b931-48fc-a6bf-6cc7d0aefc2d&lt;/span&gt;/1(1)(6);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;My regex only accounts for 1.&amp;nbsp; Rather than figure out a better regex, I ran through the steps above again I gathered the 3 CIs that I had that were specified as the second on a line.&amp;nbsp; Then I ran through the steps above and manually added my 3 CIs to the &lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ciList&lt;/span&gt;, when I was at that step.&amp;nbsp; Moved the \retry items back into the box and all were consumed successfully.&amp;nbsp; Gave it about 15 minutes and site replication is working again.&amp;nbsp; W00t!&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: .5in;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-6366213328721280481?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/6366213328721280481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2011/06/sccm-child-primary-site-not-replicating.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/6366213328721280481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/6366213328721280481'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2011/06/sccm-child-primary-site-not-replicating.html' title='SCCM Child Primary site not replicating Update lists or deployments'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-4890930979985094264</id><published>2011-05-13T09:16:00.003Z</published><updated>2011-06-28T19:43:48.756Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Using SQL and Powershell to set Extended Properties</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="WordSection1"&gt;&lt;div class="MsoNormal"&gt;I searched around for a bit and didn’t find this anywhere easy so I banged it out myself.&amp;nbsp; Hope this helps somebody to set an extended property on one of your SQL Objects using Powershell.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Assume you want to set a property on a database. If you don’t have your SQL psdrive loaded you can add it (assuming you have the prereqs) with:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;add-pssnapin&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;SqlServerProviderSnapin100&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The name of your property will be “TestName” and you want a value of “TestValue”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;You will need your DB as an object.&amp;nbsp; If you have your SQL PSDrive you can use:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DBObject&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Get-Item&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; SQLSERVER:\SQL\SERVERNAME\INSTANCE\Databases\&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DBName&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;First, you create your new ExtendedProperty Object:&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;new-object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;Microsoft.SqlServer.Management.Smo.ExtendedProperty&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Then you need to designate what object you are attaching your new property to:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Parent &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DBObject&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Set your Name and Value:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Name &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"TestName"&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Value &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"TestValue"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Finally, create the object.&amp;nbsp; This seems to be more like applying it to me:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Create()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Full list:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: small;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DBObject&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: small;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: small;"&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: small;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: small;"&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Get-Item&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: small;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;SQLSERVER:\SQL\SERVERNAME\INSTANCE\Databases\&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: small;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DBName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: small;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;/span&gt;&lt;/span&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;new-object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;Microsoft.SqlServer.Management.Smo.ExtendedProperty&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Parent &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$DBObject&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Name&amp;nbsp;&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"TestName"&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Value&amp;nbsp;&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"TestValue"&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ExtProp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Create()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-4890930979985094264?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/4890930979985094264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2011/05/using-sql-and-powershell-to-set.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/4890930979985094264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/4890930979985094264'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2011/05/using-sql-and-powershell-to-set.html' title='Using SQL and Powershell to set Extended Properties'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-349985154079402523</id><published>2011-03-24T15:04:00.002Z</published><updated>2011-03-24T15:01:45.168Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Using powershell to run SQL Jobs serially</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="WordSection1"&gt;&lt;div class="MsoNormal"&gt;We had some backups fail due to disk space issues.&amp;nbsp; Once we cleared the space, we needed to run the backups as I didn’t want to wait an entire day.&amp;nbsp; I didn’t want to run them at once due to contention issues and I am way too lazy to manually start each one and wait for it to finish.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Powershell to the rescue.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The SQL provider is slick, gives you a sql server psdrive that you can explore.&amp;nbsp; Finding the jobs was easy enough.&amp;nbsp; Finding failed jobs was easy enough.&amp;nbsp; Running the jobs… wtf?&amp;nbsp; Not hard, but seems like I should be able to just start a job rather than send it as a sql command.&amp;nbsp; I hardly need the sql snapin for that.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Anyway, update SERVERNAME (and potentially instance) in the code below and it will find all your failed jobs and run them serially.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Sweet&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;cd&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; SQLSERVER:\&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;SQL\SERVERNAME\DEFAULT\JobServer\Jobs&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$jobs&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;dir&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;where&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$_&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.lastrunoutcome &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"failed"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$job&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$jobs&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"starting $($job.name)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; invoke-sqlcmd -database msdb &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"sp_start_job '$($job.name)'"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;while&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ((invoke-sqlcmd -database msdb &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"sp_help_jobactivity @job_id = NULL, @job_name =&amp;nbsp; '$($job.name)'"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;).run_status &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-ne&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 1) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"still running..."&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;sleep&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 120&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Completed at $(date)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-349985154079402523?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/349985154079402523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2011/03/using-powershell-to-run-sql-jobs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/349985154079402523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/349985154079402523'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2011/03/using-powershell-to-run-sql-jobs.html' title='Using powershell to run SQL Jobs serially'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-5896949925674458071</id><published>2011-03-08T15:45:00.000Z</published><updated>2011-06-28T11:10:56.548Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='VMWare'/><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><title type='text'>Timeouts Removing VMWare snapshots w/ PowerCLI</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;On commit of several of our vmsnapshots we are getting the annoy “Operation Timed Out” after the vcenter timeout limit is reached.&amp;nbsp; Luckily, the remove snapshot operation is still performed in the background and eventually completes.&amp;nbsp; Below is a quick and dirty way to delete a vm snapshot and wait for the process to complete.&amp;nbsp; I check the existence of the snapshot every 60 seconds and return when it is gone. &amp;nbsp;If it is still going after 2 hours, I throw an error. &amp;nbsp;It is pretty noisy as I wanted to see what was happening but didn't feel like getting into logging, you will probably want to add to it if you need to actually use it.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;This is to be run in a PowerCLI window. &amp;nbsp;Add the function and then you can use&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cadetblue; font-family: 'Courier New'; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;delete-vmsnapshot "VMName"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note: if you add&amp;nbsp;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;-confirm:&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$false&amp;nbsp;&lt;/span&gt;to the remove-snapshot line, you won't be prompted to confirm the delete. I took it out of the below to add some protection against copying and pasting code. &amp;nbsp;B)&lt;br /&gt;&lt;br /&gt;Note 2: if you don't care about how monitoring how long it takes you can just do something like the following. &amp;nbsp;I wanted to loop through several serially and didn't want them starting over each other.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;get-vm -name "VMNAME" | get-snapshot | remove-snapshot&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;delete-vmsnapshot&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;param&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$vmname&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$d1&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;"Starting at $d1"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$vm&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; get-vm -name &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$vmname&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$sn&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$vm&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; | get-snapshot&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;"Deleting:"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$sn&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;fl&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;*&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$sn&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; | remove-snapshot&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$timesleeping&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; ((date) &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;-&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; d1).TotalSeconds&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;while&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; (&lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;-not&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; ((&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$vm&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; | Get-Snapshot) &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$null&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$timesleeping&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; ((date) &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;-&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; d1).TotalSeconds&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$timesleeping&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;-gt&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; 7200) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;throw&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; (&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;"waiting over 2 hours for snapshot to delete"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;} &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;else&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;"Merging for $timesleeping seconds."&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;sleep&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; 60&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;$d2&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; ((date) &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;-&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; d1).TotalSeconds&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;"Complete taking a total of $d2 seconds"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp; &lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-5896949925674458071?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/5896949925674458071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2011/03/timeouts-removing-vmware-snapshots-w.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/5896949925674458071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/5896949925674458071'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2011/03/timeouts-removing-vmware-snapshots-w.html' title='Timeouts Removing VMWare snapshots w/ PowerCLI'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-742474743782104955</id><published>2010-11-28T11:47:00.003Z</published><updated>2011-06-28T11:09:18.075Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCCM'/><title type='text'>SCCM Distribution point tar file error</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I spent all weekend fighting various sccm parent-&amp;gt; Child site replication issues.&amp;nbsp; One I had around some of my software update packages had basically no information on the web despite what I would expect to be a very ‘searchable’ signature.&amp;nbsp; the misspelling in signature in this line:&lt;br /&gt;&lt;blockquote&gt;failed to register the source with the signautre repository   &lt;/blockquote&gt;The full error message I was getting is below but the most obvious lines were (from distmgr.log on the child)&lt;br /&gt;&lt;blockquote&gt;invalid tar file signature     &lt;br /&gt;UnpackFolderW failed; 0x80040299      &lt;br /&gt;UnpackFolder() failed      &lt;br /&gt;failed to register the source with the signautre repository      &lt;br /&gt;UpdateStagedFolderRdcW failed; 0x80070299      &lt;br /&gt;Cannot copy package CEN00004 from e      &lt;br /&gt;Failed to copy package CEN00004 from e      &lt;br /&gt;STATMSG      &lt;br /&gt;Forward package status for pkg CEN00004 to site CEN      &lt;br /&gt;Error occurred.&lt;/blockquote&gt;I was stuck in a loop w/ two of my packages where they would expand to an e:\_S XXXXXXX temp directory but would fail during or just after that step w/ the above errors.&amp;nbsp; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Resolution:&lt;/span&gt;&lt;br /&gt;Short answer:&lt;br /&gt;Delete from dp, turn off binary replication, repush.&lt;br /&gt;&lt;br /&gt;Step by step:&lt;br /&gt;What finally worked was to remove the packages from the child distribution point at the parent server, turn off binary replication, and re-add them to the DP.&amp;nbsp; So, from the parent server Computer Management –&amp;gt; Software Updates –&amp;gt; Deployment Packages –&amp;gt; My Package –&amp;gt; right click on distribution points –&amp;gt; manage distribution points –&amp;gt; delete from selected.&amp;nbsp; Once I saw this go through in the distmgr log of the child site, which looks something like:&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;blockquote&gt;Updated replicated package info for package CEN00004     &lt;br /&gt;Updated replicated package server ["Display=\\childsite\"]MSWNET      &lt;br /&gt;Updated replicated package program info for package CEN00004, program *, dependent program      &lt;br /&gt;Successfully processed C      &lt;br /&gt;Removing package CEN00004 from the active package array.&lt;/blockquote&gt;Right click on your package under Deployment Packages and uncheck ‘Enable Binary Replication’.&lt;br /&gt;Right click on Deployment Packages –&amp;gt; your package –&amp;gt; distribution points and add a new DP.&lt;br /&gt;You should see it uncompress to the _S temp folder and then continue to creating the directory structure and moving the files into your SMSPGKE$ (or whichever drive is appropriate).&lt;br /&gt;Full log of the repeating (erroring) attempt below.&amp;nbsp; &lt;br /&gt;Hopefully this will save somebody an afternoon.&lt;br /&gt;Good luck&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Starting package processing thread,thread ID = 1670   &lt;br /&gt;Sleep 3600 seconds...    &lt;br /&gt;STATMSG    &lt;br /&gt;Retrying package CEN00004    &lt;br /&gt;No action specified for the package CEN00004.    &lt;br /&gt;Start adding package to server ["Display=\\childsite\"]MSWNET    &lt;br /&gt;["Display=\\childsite\"]MSWNET    &lt;br /&gt;Will wait for 1 threads to end.    &lt;br /&gt;Thread Handle = 7056    &lt;br /&gt;Attempting to add or update a package on a distribution point.    &lt;br /&gt;for ["Display=\\childsite\"]MSWNET    &lt;br /&gt;STATMSG    &lt;br /&gt;Established connection to ["Display=\\childsite\"]MSWNET    &lt;br /&gt;Signature share exists on distribution point path MSWNET    &lt;br /&gt;Found the existing package path on MSWNET    &lt;br /&gt;Validating the compressed file E    &lt;br /&gt;Used 1 out of 7 allowed processing threads.    &lt;br /&gt;Sleep 3600 seconds...    &lt;br /&gt;The package file requires a NTFS drive to decompress to.    &lt;br /&gt;Decompressing package E    &lt;br /&gt;Processing incoming file C    &lt;br /&gt;Package CEN00004 is currently being processed    &lt;br /&gt;Processing incoming file C    &lt;br /&gt;Package CEN00004 is currently being processed    &lt;br /&gt;Used 1 out of 7 allowed processing threads.    &lt;br /&gt;Sleep 3600 seconds...    &lt;br /&gt;Used 1 out of 7 allowed processing threads.    &lt;br /&gt;Sleep 3600 seconds...    &lt;br /&gt;Used 1 out of 7 allowed processing threads.    &lt;br /&gt;Sleep 3600 seconds...    &lt;br /&gt;STATMSG    &lt;br /&gt;GetPackageSignature() called for package CEN00004 with version 3. UnpackedSignature = 0    &lt;br /&gt;RDC    &lt;br /&gt;for ["Display=\\childsite\"]MSWNET    &lt;br /&gt;IISPortsList in the SCF is "80".    &lt;br /&gt;IISSSLPortsList in the SCF is "443".    &lt;br /&gt;IISWebSiteName in the SCF is "".    &lt;br /&gt;IISSSLState in the SCF is 0.    &lt;br /&gt;Virtual Directory SMS_DP_SMSPKGE$ for the physical path E    &lt;br /&gt;for ["Display=\\childsite\"]MSWNET    &lt;br /&gt;IISPortsList in the SCF is "80".    &lt;br /&gt;IISSSLPortsList in the SCF is "443".    &lt;br /&gt;IISWebSiteName in the SCF is "".    &lt;br /&gt;IISSSLState in the SCF is 0.    &lt;br /&gt;Virtual Directory SMS_DP_SMSSIG$ for the physical path E    &lt;br /&gt;Get access to the package directory and the number of free bytes at that location.    &lt;br /&gt;Attempting to make an accessible connection to MSWNET    &lt;br /&gt;Established connection to MSWNET    &lt;br /&gt;Getting the NAL path's NOS equivalent.    &lt;br /&gt;The NOS path is \\childsite\SMSPKGE$\CEN00004\    &lt;br /&gt;Getting the number of free bytes.    &lt;br /&gt;The number of free K bytes 221886568    &lt;br /&gt;Successfully made an accessible connection, got a NOS path, and, if requested, got the number of free bytes at this location.    &lt;br /&gt;Attempting to make an accessible connection to MSWNET    &lt;br /&gt;Established connection to MSWNET    &lt;br /&gt;Getting the NAL path's NOS equivalent.    &lt;br /&gt;The NOS path is \\childsite\SMSSIG$\    &lt;br /&gt;The number of free bytes at the specified location has not been requested.    &lt;br /&gt;Successfully made an accessible connection, got a NOS path, and, if requested, got the number of free bytes at this location.    &lt;br /&gt;Successfully set access security on MSWNET    &lt;br /&gt;GetPackageSignature() called for package CEN00004 with version 3. UnpackedSignature = 0    &lt;br /&gt;RDC    &lt;br /&gt;RegisterSignatureUsage() called with for Package CEN00004, Version 3 with Targetpath as E    &lt;br /&gt;invalid tar file signature    &lt;br /&gt;UnpackFolderW failed; 0x80040299    &lt;br /&gt;UnpackFolder() failed    &lt;br /&gt;failed to register the source with the signautre repository    &lt;br /&gt;UpdateStagedFolderRdcW failed; 0x80070299    &lt;br /&gt;Cannot copy package CEN00004 from e    &lt;br /&gt;Failed to copy package CEN00004 from e    &lt;br /&gt;STATMSG    &lt;br /&gt;Forward package status for pkg CEN00004 to site CEN    &lt;br /&gt;Error occurred.    &lt;br /&gt;Performing error cleanup prior to returning.    &lt;br /&gt;DP thread with array index 0 ended.    &lt;br /&gt;DP thread with thread handle 7056 and thread ID 5628 ended.    &lt;br /&gt;Updating package info for package CEN00004    &lt;br /&gt;Only retrying local DP update for package CEN00004, no need to replicate package definition to child sites or DP info to parent site.    &lt;br /&gt;StoredPkgVersion (3) of package CEN00004. StoredPkgVersion in database is 3.    &lt;br /&gt;SourceVersion (3) of package CEN00004. SourceVersion in database is 3.    &lt;br /&gt;STATMSG    &lt;br /&gt;Failed to process package CEN00004 after 3 retries, will retry 97 more times&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-742474743782104955?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/742474743782104955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2010/11/sccm-distribution-point-tar-file-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/742474743782104955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/742474743782104955'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2010/11/sccm-distribution-point-tar-file-error.html' title='SCCM Distribution point tar file error'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-1493572737554264045</id><published>2010-08-03T18:50:00.003Z</published><updated>2011-06-28T11:10:10.049Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><title type='text'>Automatically closing SCOM alerts w/ powershell</title><content type='html'>You may have seen my post earlier about &lt;a href="http://cornasdf.blogspot.com/2010/06/syslog-monitoring-walkthrough-with.html" linkindex="15"&gt;Syslog Monitoring Walkthrough with Systems Center Operations Manager 2007&lt;/a&gt;.&amp;nbsp; Well, I went on vacation and my colleagues got a little overzealous in what we directed at scom.&amp;nbsp; I came back to over 200k warnings from one device that was sending alerts at waaaay too low a threshhold.&amp;nbsp; These were going into a view that wasn’t normally checked (it seems) and now we have a problem.&amp;nbsp; The console crashes when trying to select all of them (surprise) and I do not want to do this by hand.&amp;nbsp; Powershell to the rescue?&lt;br /&gt;After opening the OpsMgr PS console, we can get started.&amp;nbsp; Setting the alert to closed (ResolutionState =255) should be trivial.&amp;nbsp; We mustn’t forget to update the alert after we set the state.&amp;nbsp; The interesting part is that we need to get our collection of alerts with as little impact as possible.&lt;br /&gt;I could just do:&lt;br /&gt;$colAgents = get-alert &lt;br /&gt;but that would crush my database and take forever.&amp;nbsp; To narrow this down a bit, I am going to select by source (as basically all of these came from the same source.)&amp;nbsp; &lt;br /&gt;We could run a get-alert | where {SOMETHING} but that would have to return all the alerts and then parse them which would be very heavy.&amp;nbsp; The SCOM cmdlets have a –criteria to do the filtering in the db, lets use that.&lt;br /&gt;Source seems to translate, at an object level, to MonitoringObjectDisplayName so I set my criteria, do the query and loop through the results like so:&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$criteria&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;“ResolutionState = 0 AND MonitoringObjectDisplayName = ‘SERVERNAME’”&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;     &lt;/span&gt;&lt;/div&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$colSysLogAlerts&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;get-alert&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-criteria $criteria&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;      &lt;/span&gt;&lt;/div&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$Alert&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$colSysLogAlerts&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;) {     &lt;/span&gt;&lt;/div&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$Alert&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.ResolutionState &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; 255     &lt;/span&gt;&lt;/div&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;write-host&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;“Closing $($Alert.id)”&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;     &lt;/span&gt;&lt;/div&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$Alert&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.Update(&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"Closed by Powershell"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)     &lt;/span&gt;&lt;/div&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;}     &lt;/span&gt;&lt;/div&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;Powershell to the rescue indeed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-1493572737554264045?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/1493572737554264045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2010/08/automatically-closing-scom-alerts-w.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/1493572737554264045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/1493572737554264045'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2010/08/automatically-closing-scom-alerts-w.html' title='Automatically closing SCOM alerts w/ powershell'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-1479511430849951814</id><published>2010-06-08T11:17:00.002Z</published><updated>2010-06-08T12:20:12.148Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Operations Manager'/><title type='text'>Syslog Monitoring Walkthrough with Systems Center Operations Manager 2007</title><content type='html'>Building on excellent posts &lt;a href="http://ianblythmanagement.wordpress.com/2007/05/25/syslog/"&gt;here&lt;/a&gt;, &lt;a href="http://contoso.se/blog/?p=158"&gt;here&lt;/a&gt; and &lt;a href="http://blogs.technet.com/b/cliveeastwood/archive/2007/09/07/generating-alerts-from-unix-linux-syslog-messages-in-operations-manager-2007.aspx"&gt;here&lt;/a&gt; and feedback on the forums &lt;a href="http://social.technet.microsoft.com/Forums/en-US/operationsmanagergeneral/thread/18ce5b69-2d1f-4abd-9de3-543a6a1bf630"&gt;here&lt;/a&gt;, I am going to describe our Operations manager 2007 syslog setup.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First step was to build a group of servers that will be our Syslog collectors in Opsmgr.&amp;nbsp; Populate your Syslog Collectors group w/ the servers you will be pointing your syslog messages towards.&amp;nbsp; I created a new management pack called _Default_Syslog that will hold all the work in this section.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_RuRKSkpoFrM/TA4moeUHNxI/AAAAAAAAAS8/3cAdGR4IB1s/s1600-h/image%5B27%5D.png"&gt;&lt;img alt="image" border="0" height="656" src="http://lh3.ggpht.com/_RuRKSkpoFrM/TA4mosfu7JI/AAAAAAAAATA/suce1fa1Enw/image_thumb%5B13%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="745" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Once I have my group, I want to create a new rule.&amp;nbsp; Under the rule wizard, I select Alert Generating Rules –&amp;gt; Event Based-&amp;gt; Syslog (Alert).&amp;nbsp; &lt;br /&gt;&lt;br /&gt;I am going to have 3 Syslog rule.&amp;nbsp; One for each state, warning, error and informational.&amp;nbsp; The first rule I am making is the error rule.&amp;nbsp; So we are going to name it, Syslog Error.&amp;nbsp; (I know, imaginative)&lt;br /&gt;&lt;br /&gt;Since I am collecting Alerts, it seems “Alert” would be a good rule target but I will admit to being a bit hazy on this area of SCOM and what it implies.&amp;nbsp; If you know better, please let me know.&lt;br /&gt;&lt;br /&gt;For rule target, I am just going to pick Windows Computers.&amp;nbsp; Note that at some point I tried to target this at the Agent and this caused problems when I wanted to use a Management server as a collector.&amp;nbsp; To quote Graham Davies from the System Center Operations Manager General &lt;a href="http://social.technet.microsoft.com/Forums/en-US/operationsmanagergeneral/thread/18ce5b69-2d1f-4abd-9de3-543a6a1bf630"&gt;forums&lt;/a&gt;: &lt;br /&gt;&lt;blockquote&gt;If you want the rule to run on the RMS \ Gateway then you'll need to target the appropriate class - management server. Although the Management Servers include "agent capability", they are not agents and hence won't get the rule if you target agent.&lt;/blockquote&gt;MAKE SURE you unselect Rule is Enabled or you will turn on syslog collection for all of your servers.&amp;nbsp; We will override to turn on these rules for our specific group later.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_RuRKSkpoFrM/TA4xBNyt59I/AAAAAAAAAUg/YGf86deQP6g/s1600-h/image%5B80%5D.png"&gt;&lt;img alt="image" border="0" height="569" src="http://lh6.ggpht.com/_RuRKSkpoFrM/TA4xBfFKfdI/AAAAAAAAAUk/J2fu0xiOA88/image_thumb%5B44%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="555" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;For Event Expressions, I want to catch all events w/ a Severity of less than or equal to 3.&amp;nbsp; So I build my Filter like so:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_RuRKSkpoFrM/TA4mp7G4oaI/AAAAAAAAATM/Sm3WgIcc6pg/s1600-h/image%5B14%5D.png"&gt;&lt;img alt="image" border="0" height="155" src="http://lh4.ggpht.com/_RuRKSkpoFrM/TA4mqWOwizI/AAAAAAAAATQ/xTFeR4tFTD4/image_thumb%5B6%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="546" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;For my alerts, I like to get more data so I am going to put the following in the description:&lt;br /&gt;&lt;blockquote&gt;Facility:     &lt;br /&gt;$Data/EventData/DataItem/Facility$ &lt;br /&gt;Severity:     &lt;br /&gt;$Data/EventData/DataItem/Severity$ &lt;br /&gt;Priority:     &lt;br /&gt;$Data/EventData/DataItem/Priority$ &lt;br /&gt;Priority Name     &lt;br /&gt;$Data/EventData/DataItem/PriorityName$ &lt;br /&gt;Time Generated:     &lt;br /&gt;$Data/EventData/DataItem/TimeStamp$ &lt;br /&gt;Hostname:     &lt;br /&gt;$Data/EventData/DataItem/HostName$ &lt;br /&gt;Message:     &lt;br /&gt;$Data/EventData/DataItem/Message$&lt;/blockquote&gt;&lt;a href="http://lh6.ggpht.com/_RuRKSkpoFrM/TA4mrH_LeZI/AAAAAAAAATU/bZ4KnwhXLAM/s1600-h/image%5B18%5D.png"&gt;&lt;img alt="image" border="0" height="420" src="http://lh4.ggpht.com/_RuRKSkpoFrM/TA4mrpcz_QI/AAAAAAAAATY/RAvslM5JZJI/image_thumb%5B8%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="546" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Click create to finish the wizard.&lt;br /&gt;&lt;br /&gt;Repeat the above for the Warning Alerts.&amp;nbsp; You will only need to change the Name, the severity on the alert and make your Filter equal to 4 like so:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_RuRKSkpoFrM/TA4mr1t1MMI/AAAAAAAAATc/U_-0aMNUT0M/s1600-h/image%5B22%5D.png"&gt;&lt;img alt="image" border="0" height="50" src="http://lh4.ggpht.com/_RuRKSkpoFrM/TA4mscKYE7I/AAAAAAAAATg/kWR7uFOT0UM/image_thumb%5B10%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="522" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And again for your Informational alerts.&amp;nbsp; Your filter will be greater than or equal to 5 and don’t forget to change your severity.&lt;br /&gt;&lt;br /&gt;I chose to capture these as infomational alerts for now, I am going to see how spammy this gets.&amp;nbsp; another option is to create these as Event collection rules without alerts.&amp;nbsp; That will allow you to hold on to the data but not alert on it.&amp;nbsp; It will depend on your alerting requirements.&amp;nbsp; You can also manage what you send from your sending device’s syslog configuration.&lt;br /&gt;&lt;br /&gt;To enable these rules on specific servers, right click on your rule and choose ‘Overrides’ –&amp;gt; Override the Rule –&amp;gt; For a group…&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_RuRKSkpoFrM/TA4xB4gesBI/AAAAAAAAAUo/j4RDE9q5Ooc/s1600-h/image%5B88%5D.png"&gt;&lt;img alt="image" border="0" height="219" src="http://lh6.ggpht.com/_RuRKSkpoFrM/TA4xCVJqulI/AAAAAAAAAUs/pn0jKwOiS_o/image_thumb%5B48%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="766" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;Select your Syslog Servers group and override the rule to enable it on these servers.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_RuRKSkpoFrM/TA4xDHWiYQI/AAAAAAAAAUw/mihXOyxdq1A/s1600-h/image%5B92%5D.png"&gt;&lt;img alt="image" border="0" height="726" src="http://lh6.ggpht.com/_RuRKSkpoFrM/TA4xDi-12iI/AAAAAAAAAU0/1OkogmNZV3Y/image_thumb%5B50%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="719" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;You can verify that the syslog listener is enabled by getting on the machine you expect to be listening and checking for UDP 514 in netstat.&amp;nbsp; Open a command windows and type ‘netstat –an | findstr 514’&amp;nbsp; (findstr = grep).&amp;nbsp; You want to see a line like the below.&amp;nbsp; If you don't get anything, you are not listening for syslog packets.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_RuRKSkpoFrM/TA4xEH-X0RI/AAAAAAAAAU4/oU4YYQKBvnI/s1600-h/image%5B96%5D.png"&gt;&lt;img alt="image" border="0" height="35" src="http://lh6.ggpht.com/_RuRKSkpoFrM/TA4xEneFijI/AAAAAAAAAU8/3O5y4Q9T8B8/image_thumb%5B52%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="480" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;In order to make this easy to see, I also created a view.&amp;nbsp; Under the SCOM Console Monitoring view, find your _default_syslog folder –&amp;gt; right click –&amp;gt; New –&amp;gt; Alert View. Include alerts ‘created by specific sources’.&amp;nbsp; Pick your rules that you just created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_RuRKSkpoFrM/TA4xFEMFijI/AAAAAAAAAVA/wtzx0SUIuik/s1600-h/image%5B101%5D.png"&gt;&lt;img alt="image" border="0" height="603" src="http://lh3.ggpht.com/_RuRKSkpoFrM/TA4xFjNW9ZI/AAAAAAAAAVE/8gsY2-Qxzzw/image_thumb%5B55%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="746" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;You should end up w/ a view like (your source will probably be a computer name):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_RuRKSkpoFrM/TA4mtpY6QgI/AAAAAAAAATs/2AVBoVmsDf0/s1600-h/image%5B69%5D.png"&gt;&lt;img alt="image" border="0" height="711" src="http://lh4.ggpht.com/_RuRKSkpoFrM/TA4muEw56gI/AAAAAAAAATw/Te31V3H5pFk/image_thumb%5B39%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="736" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;More info I found two ways to display more info in the line.&amp;nbsp; The first way is the most straightforward and I typed it up first so I am going to show it anyway.&amp;nbsp; You probably want the second way.&amp;nbsp; B)&lt;br /&gt;The first way:&lt;br /&gt;&lt;br /&gt;You can add more information to your alert and then set your view to show it.&amp;nbsp; Under your alert configuration, you can add custom alert fields.&amp;nbsp; I added fields for both my hostname and my priority name.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_RuRKSkpoFrM/TA4muz1XsrI/AAAAAAAAAT4/smtjFSU9ZfE/s1600-h/image%5B37%5D.png"&gt;&lt;img alt="image" border="0" height="484" src="http://lh4.ggpht.com/_RuRKSkpoFrM/TA4mvcFsiYI/AAAAAAAAAT8/JzEtd6uVlBg/image_thumb%5B19%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="590" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Send a few more test syslogs.&amp;nbsp; BTW, the &lt;a href="http://www.kiwisyslog.com/kiwi-sysloggen-download/"&gt;kiwi syslog generator&lt;/a&gt; works perfectly for this.&amp;nbsp; Update your view so that you show Custom Field 1 and Custom Field 2 from the Display tab under your view properties.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_RuRKSkpoFrM/TA4mv3zhLQI/AAAAAAAAAUA/xT7KPPIRVdw/s1600-h/image%5B45%5D.png"&gt;&lt;img alt="image" border="0" height="599" src="http://lh3.ggpht.com/_RuRKSkpoFrM/TA4mwEZQLQI/AAAAAAAAAUE/YgsLSwOVdiY/image_thumb%5B23%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="747" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Note that for some reason my extra columns were not displaying initially.&amp;nbsp; I had to delete and recreate the view.&amp;nbsp; Since my source was always the same, I also stopped showing the source.&amp;nbsp; You can see the syslog entry created after the change has populated the custom fields:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_RuRKSkpoFrM/TA4mwufENyI/AAAAAAAAAUI/_CTKnrDEBxI/s1600-h/image%5B60%5D.png"&gt;&lt;img alt="image" border="0" height="167" src="http://lh6.ggpht.com/_RuRKSkpoFrM/TA4mw8lIkBI/AAAAAAAAAUM/CtAr9qLr5ls/image_thumb%5B32%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="947" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The second way:&lt;br /&gt;&lt;br /&gt;This initially involved some (simple) XML munging so I was going to have an advanced and a simple method, the simple being the one above.&amp;nbsp; Once I figured out how in the XML, it turns out you can do it in the GUI as well.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;I first exported the MP and saw the below XML&lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Syslog Error&amp;lt;/Name&amp;gt;     &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description&amp;gt;Facility:      &lt;br /&gt;{0} &lt;br /&gt;Severity:     &lt;br /&gt;{1} &lt;br /&gt;Priority:     &lt;br /&gt;{2} &lt;br /&gt;Priority Name     &lt;br /&gt;{3} &lt;br /&gt;Time Generated:     &lt;br /&gt;{4} &lt;br /&gt;Hostname:     &lt;br /&gt;{5} &lt;br /&gt;Message:     &lt;br /&gt;{6}&amp;lt;/Description&amp;gt;&lt;/blockquote&gt;Note that the curly bracked enclosed items are expanded to our variables.&amp;nbsp; So {5} is analogous to $Data/EventData/DataItem/HostName$ in our GUI based alert description.&amp;nbsp; Putting $Data/EventData/DataItem/HostName$&amp;nbsp; in the alert name doesn’t work but putting {5} does.&amp;nbsp; So I changed the XML to &lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;span style="color: red;"&gt;&lt;b&gt;&amp;lt;Name&amp;gt;Syslog Error: {5} - {3}&amp;lt;/Name&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;      &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description&amp;gt;Facility:      &lt;br /&gt;{0} &lt;br /&gt;Severity:     &lt;br /&gt;{1} &lt;br /&gt;Priority:     &lt;br /&gt;{2} &lt;br /&gt;Priority Name     &lt;br /&gt;{3} &lt;br /&gt;Time Generated:     &lt;br /&gt;{4} &lt;br /&gt;Hostname:     &lt;br /&gt;{5} &lt;br /&gt;Message:     &lt;br /&gt;{6}&amp;lt;/Description&amp;gt;&lt;/blockquote&gt;When I checked my alert view, voila!, My alert name has changed as in the screen shot below.&amp;nbsp; My next thought was why can’t I do that from the gui?&amp;nbsp; So, i edited my alert name to be: Syslog Warning: {5} - {3}&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_RuRKSkpoFrM/TA4mxSTWfZI/AAAAAAAAAUQ/fbVzAucH-fE/s1600-h/image%5B54%5D.png"&gt;&lt;img alt="image" border="0" height="592" src="http://lh5.ggpht.com/_RuRKSkpoFrM/TA4mxuHUX-I/AAAAAAAAAUU/iSMgx3HfanU/image_thumb%5B28%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="601" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Back to my alert view and, check it out, useful alert names!!&amp;nbsp; Maybe I am too excited about this but it makes it much more supportable in my opinion.&amp;nbsp; B)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_RuRKSkpoFrM/TA4myKHxDxI/AAAAAAAAAUY/a0cT0r44JLk/s1600-h/image%5B73%5D.png"&gt;&lt;img alt="image" border="0" height="573" src="http://lh5.ggpht.com/_RuRKSkpoFrM/TA4mzYiN2MI/AAAAAAAAAUc/OpHk179Iks0/image_thumb%5B41%5D.png?imgmax=800" style="border: 0px none; display: inline;" title="image" width="678" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;One note, I am putting the syslog collector on other running servers.&amp;nbsp; We have only a few devices that are sending data here and only critical events are expected.&amp;nbsp; YMMV, you may want to dedicate a server to this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-1479511430849951814?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/1479511430849951814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2010/06/syslog-monitoring-walkthrough-with.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/1479511430849951814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/1479511430849951814'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2010/06/syslog-monitoring-walkthrough-with.html' title='Syslog Monitoring Walkthrough with Systems Center Operations Manager 2007'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_RuRKSkpoFrM/TA4mosfu7JI/AAAAAAAAATA/suce1fa1Enw/s72-c/image_thumb%5B13%5D.png?imgmax=800' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-4599849029837898502</id><published>2010-05-06T13:59:00.002Z</published><updated>2011-06-28T11:10:10.050Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><title type='text'>Using Powershell to create groups, populate groups and retrieve LDAP distinguished names</title><content type='html'>&lt;div class="WordSection1"&gt;&lt;div class="MsoNormal"&gt;Update: 20100507 - updated the sam search string to do fuzzy matching.&lt;br /&gt;&lt;br /&gt;A couple more functions I needed during a recent project.&amp;nbsp; Using powershell of course, we needed to create a group in ad in a specific OU.&amp;nbsp; We also wanted to populate that group. &amp;nbsp;To do the second, I needed a helper function to get the distinguished name of a group or user.&amp;nbsp; I leverage &lt;a href="http://www.leadfollowmove.com/archives/powershell/managing-group-membership-in-active-directory-with-powershell-part-2"&gt;two&lt;/a&gt; &lt;a href="http://blogs.technet.com/benp/archive/2007/03/26/searching-the-active-directory-with-powershell.aspx"&gt;main&lt;/a&gt; sites for most of these with some light modifications.&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;For create group we pass it the name of our new group and the OU we want to create our group in, such as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Create-group “Newgroup” “OU=ServerGroups,DC=example,DC=com”&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;create-group&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$groupname&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$strOU&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$OU&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; [&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;adsi&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;]&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"LDAP://$strOU"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$group&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$ou&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Create(&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Group"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"CN=$groupname"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$group&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.setinfo()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$g2&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; [&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;adsi&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;]&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"LDAP://CN=$groupname,$strOU"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$g2&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.sAMAccountName &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$groupname&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$g2&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.setinfo()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-Host&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Created $groupname in $strOU"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;F&lt;/span&gt;or add-usertogroup we pass it a user DN.&amp;nbsp; DNs are the full LDAP distinguished name like: &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;LDAP://CN=myuser,OU=Admins,&lt;/span&gt;DC=example,DC=com&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;So we would pass something like&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Add-usertogroup “LDAP://CN=myuser,OU=Admins,DC=example,DC=com” “LDAP://CN=Newgroup,OU=ServerGroups,DC=example,DC=com”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;That is kind of annoying so you could also use the get-dn function below.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;The safe way:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$userDN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;get-dn&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"myuser"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; text-autospace: none;"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$groupDN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;get-dn&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"newgroup"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; text-autospace: none;"&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;add-usertogroup&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$userDN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$groupDN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;or the one liner&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none; text-indent: .5in;"&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;add-usertogroup&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;get-dn&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"myuser"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) (&lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;get-dn&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"newgroup"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;add-usertogroup&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$userDN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$groupDN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$user&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; [&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;adsi&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;]&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$userDN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$group&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; [&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;adsi&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;]&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$groupDN&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Write-Host&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Adding $($user.cn) to $($group.cn)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$members&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$group&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.member&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$group&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.member &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$members&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$user&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.distinguishedName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$group&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.setinfo()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I would further note &lt;a href="http://confluence.atlassian.com/display/DEV/How+to+write+a+LDAP+search+filter"&gt;this&lt;/a&gt; excellent site describing how to write an LDAP filter.&amp;nbsp; It cleared a few things up for me at long last.&amp;nbsp; I can’t believe I never realized that &amp;amp; was a logical AND...&amp;nbsp; Pretty straightforward afterwards but the writeup above helped me bridge the gap.&amp;nbsp; Note that it is for some software or other so ignore the part about escaping the special characters at the top. B)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;get-dn&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$SAMName&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$root&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; [&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;ADSI&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;]&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;''&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$searcher&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;new-object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;System.DirectoryServices.DirectorySearcher&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$root&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&amp;nbsp;#note: if you don't want fuzzy searches, remove the *s from the line below. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;#this will force a match of the search string only - thanks jc for the tip&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;$searcher&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.filter &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"(&amp;amp;(|(objectClass=user)(objectClass=group))(sAMAccountName=*$SAMName*))"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$user&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$searcher&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.findall()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$user&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.count &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-gt&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$count&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$user&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;write-host&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$count&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;": "&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$i&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.path&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$count&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$count&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;+&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$selection&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Read-Host&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: 10pt;"&gt;"Please select item: "&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$user&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;[&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$selection&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;].path&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;else&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$user&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;[0].path&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Note that it matches the SAM Account Name (aka the ‘Pre-Windows 2000’ name in the AD snapin)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Enjoy&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-4599849029837898502?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/4599849029837898502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2010/05/using-powershell-to-create-groups.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/4599849029837898502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/4599849029837898502'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2010/05/using-powershell-to-create-groups.html' title='Using Powershell to create groups, populate groups and retrieve LDAP distinguished names'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-563834398797731985</id><published>2010-05-05T09:59:00.005Z</published><updated>2010-06-12T00:06:20.985Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><title type='text'>Use powershell to quickly backup all TFS Work Item Types</title><content type='html'>&lt;div class="WordSection1"&gt;&lt;span style="color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt;"&gt;Hey all, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt;"&gt;Just a quickie to easily backup all your current work items from all projects in Team Foundation Server 2008 SP1.&amp;nbsp; I wanted to do this ahead of a big migration and I am adverse to manual labor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt;"&gt;It starts w/ a function i found a couple years ago.&amp;nbsp; I don’t recall where or I would give credit here.&amp;nbsp; It is very useful for any tfs powershell manipulation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt;"&gt;Edit below to enter your $TFSHost and update your path if necessary.&amp;nbsp; I recommend running from a blank directory.&amp;nbsp; It will create a directory for each project and export each WIT for that project to the respective directories.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt;"&gt;Update: I added another function from my library test-win32 and had that manage the default paths for x64 and x86 archs. &lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt;"&gt;Good luck&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfshost&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"thshost"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-style-unhide:no; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; color:windowtext;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}@page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.WordSection1 {page:WordSection1;}--&gt;&lt;/style&gt;  &lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Test-Win32&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; [&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;IntPtr&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;]::&lt;/span&gt;&lt;span style="color: saddlebrown; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;size&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; 4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;test-win32&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;) { &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfstoolspath&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;} &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;else&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfstoolspath&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;get-tfs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;#10-08 - cornasdf - i stole this from the web but this is a great way to connect to TFS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# in your code you use: $tfs =&amp;nbsp; get-tfs $TFSHost &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;#some quick examples from resolvedticketsmail.ps1:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;#get select from Stored query&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;#$query = $tfs.WIT.Projects[$ProjectHoldingQuery].StoredQueries | where{$_.Name -eq $QueryViewName}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;#get results of specified query&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;#$oldTickets = $tfs.WIT.Query($query.QueryText)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;param&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;string&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;] &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$serverName&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; $(&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;throw&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'serverName is required'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;begin&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# load the required dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;void&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;][&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;System.Reflection.Assembly&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;]::&lt;/span&gt;&lt;span style="color: saddlebrown; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;LoadWithPartialName&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"Microsoft.TeamFoundation.Client"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$propertiesToAdd&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'VCS'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Microsoft.TeamFoundation.VersionControl.Client'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'WIT'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Microsoft.TeamFoundation.WorkItemTracking.Client'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'CSS'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Microsoft.TeamFoundation'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Microsoft.TeamFoundation.Server.ICommonStructureService'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'GSS'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Microsoft.TeamFoundation'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'Microsoft.TeamFoundation.Server.IGroupSecurityService'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;process&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# fetch the TFS instance, but add some useful properties to make life easier&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# Make sure to "promote" it to a psobject now to make later modification easier&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;psobject&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;] &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]::GetServer(&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$serverName&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$entry&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$propertiesToAdd&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$scriptBlock&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Reflection.Assembly]::LoadWithPartialName("{0}") &amp;gt; $null&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $this.GetService([{1}])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-f&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$entry&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[1],&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$entry&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[2]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;add-member&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;scriptproperty&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$entry&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[0] &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$ExecutionContext&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="color: saddlebrown; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;InvokeCommand&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="color: saddlebrown; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;NewScriptBlock&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$scriptBlock&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;get-tfs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfshost&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$projects&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.wit.Projects &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$proj&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$projects&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; ( &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-not&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Test-Path&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-path&lt;/span&gt;&lt;/i&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; .\$(&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$proj&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.Name))) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;New-Item&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; .\$(&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$proj&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.Name) -type directory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$wit&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$proj&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.WorkItemTypes) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"Exporting $($proj.Name) : $($wit.Name) -&amp;gt; .\$($proj.Name)\$($wit.Name).xml"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"$tfstoolspath\witexport.exe"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp; /p &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"$($proj.Name)"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; /n &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"$($wit.Name)"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; /f &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;".\$($proj.Name)\$($wit.Name).xml"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; /t &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$tfshost&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-563834398797731985?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/563834398797731985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2010/05/use-powershell-to-quickly-backup-all.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/563834398797731985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/563834398797731985'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2010/05/use-powershell-to-quickly-backup-all.html' title='Use powershell to quickly backup all TFS Work Item Types'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-1328015214594922438</id><published>2010-04-20T13:42:00.001Z</published><updated>2011-06-28T11:11:23.422Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Operations Manager'/><category scheme='http://www.blogger.com/atom/ns#' term='OpsMgr'/><title type='text'>Systems Center Operations Manager R2 CU1 Issues and command line update</title><content type='html'>&lt;p&gt;Just a quick one on our recent opsmgr R2 CU1 update.&amp;#160; &lt;/p&gt;  &lt;p&gt;Kevin Holman has a good post about his experiences.&amp;#160; Start &lt;a href="http://blogs.technet.com/kevinholman/archive/2010/01/17/opsmgr-2007-r2-cu1-rollup-hotfix-ships-and-my-experience-installing-it.aspx"&gt;here&lt;/a&gt;.&amp;#160; I would add the below&lt;/p&gt;  &lt;p&gt;1.&amp;#160; The gateway update does not copy the update msp to the agentmanagement folder.&amp;#160; Due to this, when I approved updates for agents on the other side of a gateway, they did not get the update.&amp;#160; You could fix this by copying the files from your gateway server before you approve your pending agent updates.&amp;#160; Copy the files at c:\Program Files\System Center 2007 R2 Hotfix Utility\KB974144\agent to the appropriate directory under c:\Program Files\System Center Operations Manager 2007\AgentManagement.&amp;#160; Make sure you copy the x86 update to the x86 folder.&amp;#160; x64 goes in AMD64 and ia64 goes in ia64.&lt;/p&gt;  &lt;p&gt;2.&amp;#160; Only remotely managed agents will offer an update.&amp;#160; In my case, my only agents that were manually installed were due to troubleshooting or other issues.&amp;#160; Another solution from Kevin Holman shows how to reset your agents to be remotely managed.&amp;#160; Pay attention to the &lt;a href="http://blogs.technet.com/kevinholman/archive/2010/02/20/how-to-get-your-agents-back-to-remotely-manageable-in-opsmgr-2007-r2.aspx"&gt;whole post&lt;/a&gt; to make sure it is right for you.&lt;/p&gt;  &lt;p&gt;3.&amp;#160; If you didn’t realize your gateways were not updated (like me) or put in the wrong password for one of your domains, you may need to update manually.&amp;#160; You can go on each server and run the installer and then choose install agent but that seemed annoying.&amp;#160; You can do it from the server over the network w/:&lt;/p&gt;  &lt;p&gt;&amp;quot;\\GATEWAYSERVER\c$\Program Files\System Center 2007 R2 Hotfix Utility\KB974144\SetupUpdateOM.exe&amp;quot; /silent /x86msp:KB974144-x86.msp /amd64msp:KB974144-x64.msp /UpdateAgent&lt;/p&gt;  &lt;p&gt;4.&amp;#160; or you can do what I did and psexec it w/:&lt;/p&gt;  &lt;p&gt;psexec -u DOMAIN\user &amp;quot;\\comp1,comp2,compN&amp;quot; cmd /c &amp;quot;\\GATEWAYSERVER\c$\Program Files\System Center 2007 R2 Hotfix Utility\KB974144\SetupUpdateOM.exe&amp;quot; /silent /x86msp:KB974144-x86.msp /amd64msp:KB974144-x64.msp /UpdateAgent&lt;/p&gt;  &lt;p&gt;Note that you need to pass the user to psexec (which will query for a password) so you can access network resources.&amp;#160; Also note that I needed to enclose my computer list in “ to get it to pass correctly.&amp;#160; YMMV.&lt;/p&gt;  &lt;p&gt;Also note that this will not work w/ 2k8+ clients as UAC gets in the way.&amp;#160; You could add –s to the the psexec line but then you would need a file share that the machine accounts could get at.&amp;#160; You could also probably do a small script that did a net use and then accessed the files.&amp;#160; I cheesed out and logged on directly as I only had a few that needed to be done manually.&amp;#160; &lt;/p&gt;  &lt;p&gt;Good luck.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-1328015214594922438?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/1328015214594922438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2010/04/systems-center-operations-manager-r2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/1328015214594922438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/1328015214594922438'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2010/04/systems-center-operations-manager-r2.html' title='Systems Center Operations Manager R2 CU1 Issues and command line update'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-3496569068591246608</id><published>2010-04-15T12:24:00.005Z</published><updated>2011-07-04T22:28:44.978Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='SSL/TLS'/><title type='text'>How does windows determine a cipher strength for an encrypted connection OR SQL Server data in transit cipher strength</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This question is really just “how does windows determine a cipher strength for an encrypted connection” as SQL server just hands off to the windows schannel.dll to deal w/ this. But I was looking to determine the answer for SQL Data in transit encryption.   &lt;br /&gt;&lt;br /&gt;This was pretty muddy to track down. There are some reference details &lt;a href="http://blogs.msdn.com/sql_protocols/archive/2007/06/30/ssl-cipher-suites-used-with-sql-server.aspx"&gt;here&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/aa374757%28VS.85%29.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/aa380123%28VS.85%29.aspx"&gt;here&lt;/a&gt;.   &lt;br /&gt;&lt;div&gt;&lt;br /&gt;At the end of the day, it comes down to an OS version question (potentially influenced by some OS/registry settings or patches). I couldn’t find any matrix anywhere so I am going to start one here. I am going to start out w/ the few I tested and hopefully fill this in w/ reader submissions (hint, hint).&amp;nbsp; The guidance I can find seems to say that Win 2k8R2 and Win 7 have the same schannel capabilities so I am going to list them together.&amp;nbsp; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;table align="center" border="1" cellpadding="0" cellspacing="0" style="width: 774px;"&gt;&lt;tbody&gt;&lt;tr&gt;         &lt;td valign="top" width="131"&gt;&lt;b&gt;Client\Server&lt;/b&gt;&lt;/td&gt;          &lt;td valign="top" width="253"&gt;&lt;b&gt;Windows 2008 R2&lt;/b&gt;&lt;/td&gt;          &lt;td valign="top" width="199"&gt;&lt;b&gt;Windows 2003 SP2&lt;/b&gt;&lt;/td&gt;          &lt;td valign="top" width="189"&gt;&lt;b&gt;Windows 2000 SP4&lt;/b&gt;&lt;/td&gt;       &lt;/tr&gt;&lt;tr&gt;         &lt;td valign="top" width="131"&gt;&lt;b&gt;Windows 2008R2/7&lt;/b&gt;&lt;/td&gt;          &lt;td valign="top" width="253"&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;          &lt;td valign="top" width="199"&gt;SSL_RSA_WITH_RC4_128_MD5&lt;/td&gt;          &lt;td valign="top" width="189"&gt;SSL_RSA_WITH_RC4_128_MD5&lt;/td&gt;       &lt;/tr&gt;&lt;tr&gt;         &lt;td valign="top" width="131"&gt;&lt;b&gt;Windows 2003 SP2&lt;/b&gt;&lt;/td&gt;          &lt;td valign="top" width="253"&gt;SSL_RSA_WITH_RC4_128_SHA&lt;/td&gt;          &lt;td valign="top" width="199"&gt;SSL_RSA_WITH_RC4_128_MD5&lt;/td&gt;          &lt;td valign="top" width="189"&gt;SSL_RSA_WITH_RC4_128_MD5 &lt;/td&gt;       &lt;/tr&gt;&lt;tr&gt;         &lt;td valign="top" width="131"&gt;&lt;b&gt;Windows XP SP3&lt;/b&gt;&lt;/td&gt;          &lt;td valign="top" width="253"&gt;SSL_RSA_WITH_RC4_128_SHA&lt;/td&gt;          &lt;td valign="top" width="199"&gt;SSL_RSA_WITH_RC4_128_MD5&lt;/td&gt;          &lt;td valign="top" width="189"&gt;SSL_RSA_WITH_RC4_128_SHA&lt;/td&gt;       &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;How to use this table: Find the client OS listed vertically down the left side and then find the server OS listed horizontally across the top.&amp;nbsp; Where the row and column meet is your the cipher which, under the default settings, they should negotiate to use. More on the ciphers &lt;a href="http://msdn.microsoft.com/en-us/library/aa374757%28VS.85%29.aspx"&gt;here&lt;/a&gt;.     &lt;br /&gt;&lt;br /&gt;How did we determine this? The only way I was able to find was to sniff the beginning of the SSL conversation. &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=983b941d-06cb-4658-b7f6-3088333d062f"&gt;Netmon 3.3&lt;/a&gt; is an excellent tool for this.&amp;nbsp; Note that you may need to set your Windows parsers from stub to full in order to decrypt the TDS packets.&amp;nbsp; You can do this in Tools -&amp;gt; options -&amp;gt; Parser. Set Windows to ‘Full’     &lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_RuRKSkpoFrM/S8cFdefr5ZI/AAAAAAAAAQQ/RFEHeEcLflk/s1600-h/image%5B23%5D.png"&gt;&lt;img alt="image" border="0" height="343" src="http://lh3.ggpht.com/_RuRKSkpoFrM/S8cFd1esObI/AAAAAAAAAQU/nD6uSaBw67Y/image_thumb%5B13%5D.png?imgmax=800" style="border-width: 0px; display: inline;" title="image" width="423" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;br /&gt;Start your trace before you start your encrypted connection. I like netmon b/c it will separate the network traffic into conversations. Find the conversation you are looking for by IP and port. For my purposes I was looking for my web server IP and my DB IP going to port 1433 on my DB.     &lt;br /&gt;&lt;br /&gt;Once you have found your conversation, you are going to want to find the SSL conversation. In netmon, it will look like this:     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_RuRKSkpoFrM/S8cFfOBdAXI/AAAAAAAAAQY/KuclLGoY69E/s1600-h/clip_image001%5B7%5D.png"&gt;&lt;img alt="clip_image001" border="0" height="33" src="http://lh4.ggpht.com/_RuRKSkpoFrM/S8cFfgn2v-I/AAAAAAAAAQc/7wg1d8Q4yOE/clip_image001_thumb%5B4%5D.png?imgmax=800" style="border-width: 0px; display: inline;" title="clip_image001" width="757" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;br /&gt;What happens here, generally, is that the client offers a list of supported ciphers in the SSL: Client Hello. In netmon, you can see this by selecting that packet as I have done above. In the ‘Frame details’ pane, you can expand ssl: Client Hello.–&amp;gt; TlsRecordLayer: –&amp;gt; SSLHandshake –&amp;gt; Client Hello:.&amp;nbsp; You should see a list of CipherSuites listed in order of preference.&amp;nbsp; See the bottom of the picture below.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_RuRKSkpoFrM/S8cFgJQCCJI/AAAAAAAAAQg/LygCkrXOZIQ/s1600-h/image%5B11%5D.png"&gt;&lt;img alt="image" border="0" height="527" src="http://lh4.ggpht.com/_RuRKSkpoFrM/S8cFgnxmNSI/AAAAAAAAAQk/1n_ct1YwGGk/image_thumb%5B5%5D.png?imgmax=800" style="border-width: 0px; display: inline;" title="image" width="642" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;br /&gt;The server will respond with cipher it wants.&amp;nbsp; You can see this in the (likely) next packet under ssl –&amp;gt; TlsRecofdLayer-&amp;gt; SSLHandshake –&amp;gt; ServerHello –&amp;gt; CipherSuite.&amp;nbsp; In this case, both client and server are running Win 2k8 r2.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_RuRKSkpoFrM/S8cFhO8qKvI/AAAAAAAAAQo/sjB9Kw7YNro/s1600-h/image%5B17%5D.png"&gt;&lt;img alt="image" border="0" height="393" src="http://lh6.ggpht.com/_RuRKSkpoFrM/S8cFhlNE3rI/AAAAAAAAAQs/_Dd-aO2n0_U/image_thumb%5B9%5D.png?imgmax=800" style="border-width: 0px; display: inline;" title="image" width="618" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;br /&gt;As you can see, between Win 2k8r2 and Win 2k8r2 we attain TLS_RSA_WITH_AES_128_CBC_SHA.     &lt;br /&gt;There are several methods to influence the SSL Handshake.&amp;nbsp; The links above will be useful in starting that journey.     &lt;br /&gt;&lt;br /&gt;One note on AES-128 cipher strength.&amp;nbsp; For a measure of scale, a computer with a billion processing elements, each capable of trying a billion keys every second, would be able to try (2^60 keys/second).&amp;nbsp; That means it would take (2^128 keys) / (2^60 keys/second) = 2^68 seconds to brute-force check all 128-bit keys. That is about 10^13 years to crack the key, or about 1000 times the age of the universe. Realistically, you would only need to try half the keys on average so that would be 500 times the age of the universe.     &lt;br /&gt;&lt;br /&gt;Or you could find a flaw in the algorithm...     &lt;br /&gt;or steal the certificate/password...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-3496569068591246608?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/3496569068591246608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2010/04/sql-server-data-in-transit-cipher.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/3496569068591246608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/3496569068591246608'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2010/04/sql-server-data-in-transit-cipher.html' title='How does windows determine a cipher strength for an encrypted connection OR SQL Server data in transit cipher strength'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_RuRKSkpoFrM/S8cFd1esObI/AAAAAAAAAQU/nD6uSaBw67Y/s72-c/image_thumb%5B13%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-9069647655051509980</id><published>2010-03-31T16:43:00.006Z</published><updated>2010-03-31T18:30:07.855Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><title type='text'>Using powershell to get ntfs info (such as cluster size)</title><content type='html'>&lt;div class="WordSection1"&gt;&lt;div class="MsoNormal"&gt;20100331 - slight update.&amp;nbsp; Converting the hex items to dec and allowing passing of multiple drives.&lt;br /&gt;&lt;br /&gt;A new function for my library.&amp;nbsp; &amp;nbsp;Base idea copped from Jacques Barathon [MS] at the bottom of &lt;a href="http://www.vistax64.com/powershell/77645-getting-cluster-size-your-hard-disk-2.html"&gt;this&lt;/a&gt; thread and hashed out to get all the properties.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Arial Rounded MT Bold"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-style-unhide:no; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; color:windowtext;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}@page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.WordSection1 {page:WordSection1;}--&gt;&lt;/style&gt;  &lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;get-ntfsinfo&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;param&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; ([&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;char&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[]]&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$drive&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"c"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$drive&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;test-path&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"$($_):"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$cs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;new-object&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;PSObject&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$cs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;add-member&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;NoteProperty&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Drive&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$_&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$output&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (fsutil fsinfo ntfsinfo &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"$($_):"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$line&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$output&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$info&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$line&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.split(&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;':'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;#if the value is hex, convert to dec and put hex in ()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$info&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[1].trim().startswith(&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'0x0'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;)) { &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$info&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[1] &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; [&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Convert&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;]::&lt;/span&gt;&lt;span style="color: saddlebrown; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;ToInt32&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;((&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$info&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[1].Trim()),16).&lt;/span&gt;&lt;span style="color: saddlebrown; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;toString&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;() &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;+&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;" ("&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;+&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$info&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[1].Trim().toString() &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;+&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;")"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$cs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;add-member&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;NoteProperty&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$info&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[0].trim().Replace(&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;' '&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;'_'&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;) &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$info&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;[1].trim()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$info&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$null&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$cs&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;else&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;throw&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"Drive '$_' not found"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;A basic run gives you:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;PS C:\Windows\system32&amp;gt; get-ntfsinfo e&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Drive&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : e&lt;br /&gt;NTFS_Volume_Serial_Number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0xeabe7aefbe7ab423&lt;br /&gt;Version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 3.1&lt;br /&gt;Number_Sectors&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 558614527 (0x00000000214bc7ff)&lt;br /&gt;Total_Clusters&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 69826815 (0x00000000042978ff)&lt;br /&gt;Free_Clusters&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 36249097 (0x0000000002291e09)&lt;br /&gt;Total_Reserved&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0 (0x0000000000000000)&lt;br /&gt;Bytes_Per_Sector&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 512&lt;br /&gt;Bytes_Per_Cluster&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 4096&lt;br /&gt;Bytes_Per_FileRecord_Segment&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1024&lt;br /&gt;Clusters_Per_FileRecord_Segment : 0&lt;br /&gt;Mft_Valid_Data_Length&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 262144 (0x0000000000040000)&lt;br /&gt;Mft_Start_Lcn&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 786432 (0x00000000000c0000)&lt;br /&gt;Mft2_Start_Lcn&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 2 (0x0000000000000002)&lt;br /&gt;Mft_Zone_Start&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 786496 (0x00000000000c0040)&lt;br /&gt;Mft_Zone_End&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 837664 (0x00000000000cc820)&lt;br /&gt;RM_Identifier&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 04E578BF-2D2F-11DF-9782-18A9055883A2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But the nice thing here is being able to say&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;PS C:\Windows\system32&amp;gt; (get-ntfsinfo e).Bytes_Per_Cluster&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;4096&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I then looped it to check cluster size (what I really wanted) on each drive on the server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;foreach&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$drive&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;in&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Get-PSDrive&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;where&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; {&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$_&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.Provider.name &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-eq&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"FileSystem"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;}) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; (&lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$drive&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;.free &lt;/span&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-ne&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;$null&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;"$drive - $((get-ntfsinfo $drive.name).bytes_per_cluster)"&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;gives output like:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Arial Rounded MT Bold"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-style-unhide:no; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; color:windowtext;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}@page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.WordSection1 {page:WordSection1;}--&gt;&lt;/style&gt;  &lt;br /&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;C - 4096&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;E - 4096&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;G - 65536&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;J - 4096&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;K - 4096&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;L - 4096&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;M - 65536&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;N - 65536&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;O - 65536&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Q - 4096&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;S - 65536&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;T - 65536&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Z – 4096&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;br /&gt;Let me know if you use it…&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-9069647655051509980?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/9069647655051509980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2010/03/using-powershell-to-get-ntfs-info-such.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/9069647655051509980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/9069647655051509980'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2010/03/using-powershell-to-get-ntfs-info-such.html' title='Using powershell to get ntfs info (such as cluster size)'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-5957241361716645127</id><published>2010-03-29T17:09:00.005Z</published><updated>2011-03-09T09:10:17.923Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><title type='text'>powershell: delete files older than X</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;It really is that easy.&lt;br /&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Arial Rounded MT Bold"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-style-unhide:no; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; color:windowtext;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}@page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.WordSection1 {page:WordSection1;}--&gt;&lt;/style&gt;  &lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Get-ChildItem&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$env:temp&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;/myfiles&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;where&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$_&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Lastwritetime &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-lt&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (date).addminutes(&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;15)} | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;remove-item&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;E&lt;/b&gt;verybody has needed the 'delete files older than X' script.&amp;nbsp; One more thing that is easier in powershell.&amp;nbsp; In this case I have&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt; $env:temp&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;/myfiles&lt;/span&gt; as my directory containing the files.&amp;nbsp; I could also add -recurse to get-childitem if I wanted to get subdirectories as well. &amp;nbsp;Anonymous noted below that you can add a test to exclude directories if you just want to clean the files out of the directory structure.&amp;nbsp; I am using addminutes to delete files older than now - 15 minutes but you have other options.&amp;nbsp; More on that &lt;a href="http://msdn.microsoft.com/en-us/library/system.datetime_members.aspx"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;Note that if we want to delete all files older than X we would use -lt.&amp;nbsp; ie, the timestamp of the file is older than 15 minutes ago.&amp;nbsp; If we want to delete files newer than X we would use -gt.&amp;nbsp; ie, the timestamp of the file is newer than 15 minutes ago.&amp;nbsp; X, in our case, is the time now minus 15 minutes.&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&amp;nbsp;We are going to 'at' it.&amp;nbsp; Although the Vista and later scheduling engine is vastly improved and renamed to schtasks.&lt;br /&gt;&lt;br /&gt;We are going to run this every 15 minutes.&lt;br /&gt;schtasks /create /ru "NT Authority\NETWORK SERVICE" /F /sc daily /mo 1 /ri 15 &amp;nbsp;/st 00:00 /du 0023:50 /tr "powershell -command {&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;Get-ChildItem&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$env:temp/myfiles&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;where&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; {`&lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;$_&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;.Lastwritetime &lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-lt&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; (date).addminutes(&lt;/span&gt;&lt;span style="color: red; font-family: 'Courier New'; font-size: 10pt;"&gt;-&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;15)} | &lt;/span&gt;&lt;b&gt;&lt;span style="color: cadetblue; font-family: 'Courier New'; font-size: 10pt;"&gt;remove-item -recurse&lt;/span&gt;&lt;/b&gt;" &amp;nbsp;/TN "File Delete"}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Updated: 20110310 - fixed some issues w/ the schtask line (notice the `) and added a note about the pscontainers test noted by anonymous below.&lt;/div&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10074565-5957241361716645127?l=cornasdf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cornasdf.blogspot.com/feeds/5957241361716645127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cornasdf.blogspot.com/2010/03/powershell-delete-files-older-than-x.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/5957241361716645127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10074565/posts/default/5957241361716645127'/><link rel='alternate' type='text/html' href='http://cornasdf.blogspot.com/2010/03/powershell-delete-files-older-than-x.html' title='powershell: delete files older than X'/><author><name>cornasdf</name><uri>http://www.blogger.com/profile/02328281836126704285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_RuRKSkpoFrM/S8cF2OqMjHI/AAAAAAAAAQ0/O0TKpi8-kj4/S220/suitsat1_nasa_crop_small.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10074565.post-2150429721966857738</id><published>2010-03-26T13:11:00.007Z</published><updated>2010-06-21T11:27:26.888Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Updates'/><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='Patches'/><title type='text'>Fully patch a server using powershell and vbs</title><content type='html'>&lt;p&gt;Update: 201006018 – changed the reboot portion of the script to watch uptime instead of ping, some of my servers weren’t coming down fast enough.&amp;#160; B)&lt;/p&gt;  &lt;p&gt;For our last patch cycle we used Harry Johnston's vbs script to manage our updates.&amp;#160; His script is &lt;a href="http://www.scms.waikato.ac.nz/%7Eharry/wsusupdate.vbs" linkindex="16"&gt;here&lt;/a&gt;. (His very basic home page is &lt;a href="http://www.scms.waikato.ac.nz/%7Eharry" linkindex="17"&gt;here&lt;/a&gt;. I found the script from a newsgroup post or I would ping back or similar.&amp;#160; Thanks Harry if you see this.)&lt;/p&gt;  &lt;p&gt;If you want to do this completely with powershell, James O’Neill has posted is a pretty definitive discussion, &lt;a href="http://blogs.technet.com/b/jamesone/archive/2009/01/27/managing-windows-update-with-powershell.aspx"&gt;Managing Windows Update with PowerShell&lt;/a&gt;.&amp;#160; I don’t have powershell on all of my servers and don’t want to make that a requirement for this solution.&amp;#160; As such, we are doing the actual work w/ the already present cscript engine and just managing the process w/ powershell.    &lt;br /&gt;    &lt;br /&gt;Harry’s very useful script works whether you are pointing to windows updates or your own WSUS server.&amp;#160; It checks for new updates, downloads, installs and reports whether you need a reboot.&amp;#160; If you don't need a reboot, it runs itself again until it either needs a reboot or finds no patches.&amp;#160; Cool script.&amp;#160; we modified it slightly to spit out the hostname we were working w/ as we psexec'd it to run on a bunch of computers.    &lt;br /&gt;    &lt;br /&gt;When we did this at first, we ran a few loops.&amp;#160; First we copied the winupdates.vbs script to the c:\ on each computer to be updated.&amp;#160; We would have run it from the fileshare but we wanted to have a single solution for our servers.&amp;#160; Win2k8 servers run into a UAC problem w/ psexec.&amp;#160; there may be a better way but we decided to pass -s to psexec to run as system (thus avoiding the UAC issues).&amp;#160; Because we need to run as system, we cannot call the script from a network location (more specifically, we didn’t want to manage opening a network location that could be read by all the machine accounts)    &lt;br /&gt;    &lt;br /&gt;We then ran a loop to pop out a command window for each server and run the script through sysinternal's psexec.&amp;#160; When the script finished, it would report if it needed a boot.&amp;#160; We would boot and then run the script again until the script had nothing to do.    &lt;br /&gt;    &lt;br /&gt;This was much easier than getting on the servers and doing it but meh, it was still too much work.    &lt;br /&gt;    &lt;br /&gt;The below powershell script will automate the copying the script and then loop the running, booting, waiting until there are no more patches to install.&amp;#160; I did put in a 10 boot limit and a 15 minute limit waiting for reboots.    &lt;br /&gt;    &lt;br /&gt;Save the script below as PSPatch.ps1.&amp;#160; you will need to update the path to your winupdates.vbs and psexec at the top.&amp;#160;&amp;#160; To run it, just pass it a server name.    &lt;br /&gt;./pspatch.ps1 servertopath    &lt;br /&gt;    &lt;br /&gt;Let me know if you use it...     &lt;br /&gt;&lt;style&gt;&lt;br /&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Times New Roman"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-style-unhide:no; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; color:windowtext;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}@page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.WordSection1 {page:WordSection1;}--&gt;&lt;/style&g
