

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title>Drowning In Technical Debt</title>
		<link href="/Skins/Aggregate/Simple/Style.css" type="text/css" rel="stylesheet">
<link href="/Skins/Aggregate/Simple/blue.css" type="text/css" rel="stylesheet">
<link href="/Scripts/Lightbox.css" type="text/css" rel="stylesheet">
		<script type="text/javascript" src="/Scripts/common.js" ></script>
        <script type="text/javascript">
			var subtextBlogInfo = new blogInfo('/', '/');
		</script>
		<script type="text/javascript" src="/Scripts/prototype.js" ></script>
		<script type="text/javascript" src="/Scripts/scriptaculous.js" ></script>
		<script type="text/javascript" src="/Scripts/effects.js" ></script>
        <script type="text/javascript" src="/Scripts/lightbox.js" ></script>
	</head>
	<body>
		<form method="post" action="./privaterss.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEwMDUxNTM4MzlkZB7MKUbK1o4OVKzHZ+Uo0M51w4w1Q3GJyKJpVEJSh8XU" />

<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="CA0B0334" />
			<div id="header">
				<h1><a id="TitleLink" href="http://www.DrowningInTechnicalDebt.com/">Drowning In Technical Debt</a></h1>
			</div>
			<div id="authors">
				<h2>Welcome</h2>
				<p>
					
				</p>
				<p>
					
				</p>
				<p>
					Powered By:<br />
					<a id="HyperLink1" title="Powered By Subtext" href="http://subtextproject.com/" style="display:inline-block;"><img title="Powered By Subtext" src="../../images/PoweredBySubtext85x33.png" alt="" /></a>
				</p>
                
<div id="aggsyndication">
<h2>Syndication</h2>
<ul>
<li><a id="AggSyndication1_OpmlLink" href="../../Opml.aspx">OPML (list of bloggers)</a></li>
<li><a id="AggSyndication1_RssLink" href="../../MainFeed.aspx">RSS (list of recent posts)</a></li>

<li><a id="AggSyndication1_blogGroupRepeater_groupRssLink_0" href="../../MainFeed.aspx?GroupID=1">RSS (Default Group)</a></li>

</ul>
</div>
				
                
<div id="aggblogstats">
<h2>Blog Stats</h2>
<ul>
<li>Blogs -	7</li>
<li>Posts - 959</li>
<li>Articles - 2</li>
<li>Comments - 14605</li>
<li>Trackbacks - 90</li>
</ul>
</div>
				
				
<div id="aggbloggers">
<h2>Bloggers (posts, last update)</h2>
<ul><li><h3>Default Group</h3><ul><li><a href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/">Shawn Weisfeld</a><small><br />365, 3/31/2017 6:04 AM</small></li><li><a href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/">Roy Ashbrook</a><small><br />198, 3/24/2018 1:19 PM</small></li><li><a href="http://www.DrowningInTechnicalDebt.com/DennisBottjer/">Dennis Bottjer</a><small><br />168, 3/30/2011 11:12 PM</small></li><li><a href="http://www.DrowningInTechnicalDebt.com/ChrisBarba/">Chris Barba</a><small><br />132, 11/15/2013 10:44 AM</small></li><li><a href="http://www.DrowningInTechnicalDebt.com/DavidStrommer/">David Strommer</a><small><br />76, 10/18/2009 6:08 AM</small></li><li><a href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a><small><br />20, 3/18/2015 5:24 PM</small></li></ul></li></ul>
</div>

			</div>
			<div id="main">
			    <!-- Update EntryID in the next line to the ID of a post you want pinned here-->
			    <!--
			    
<div id="pinnedpost">
<h2>Welcome All</h2>
<p><p>Many Web Developers and Designers still choose HTML Tables over CSS and Table Free site design.  CSS comes with a learning curve and cross browser compatibility can be frustrating at times.  However, CSS does offer several benefits including smaller overall site downloads and easier maintenance.  This can translate into faster update times and better site performance.</p>
<p>While I am the first to admit that I am not a CSS expert I do find this topic very interesting  especially since it can improve performance.  The following links are from the DotNetNuke forums on <a href="http://www.asp.net/">www.asp.net</a> and contained some great information on this topic.</p>
<p><a href="http://www.powerhousedata.com/DotNetNuke/Templates/tabid/56/Default.aspx">http://www.powerhousedata.com/DotNetNuke/Templates/tabid/56/Default.aspx</a> This is a free pure CSS DNN Skin.</p>
<p><a href="http://www.tableless.com.br/en/converted.asp">http://www.tableless.com.br/en/converted.asp</a> Shows several popular sites reproduced as tabless CSS only designs. Examples include Dell, Apple, HP, etc.</p>
<p><a href="http://www.csscreator.com/version2/pagelayout.php">http://www.csscreator.com/version2/pagelayout.php</a> </p></p>
</div>

				-->
				
<div id="aggrecentposts">
<h2>Latest Posts</h2>

		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_0" href="http://www.DrowningInTechnicalDebt.com/GregTate/archive/2015/03/18/using-exchange-web-services-managed-api-in-powershell.aspx">Using Exchange Web Services Managed API in PowerShell</a></h3>
			<p>I’ve been finding myself in the Exchange 2013 world for the last few months, helping with some administration and updates. As a result I stumbled across an unknown, yet cool (to me)  Exchange API. Naturally I couldn’t resist trying this out in PowerShell. For those who just want working script, here it is. This script will return the most recent 10 items.</p> <font color="#000000" size="2" face="Lucida Console">   <p align="left" />   <font color="#006400" size="1" face="Lucida Console"># This requires the Exchange Web Services Managed API to be installed on the computer where this script is being ran</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#006400" size="1" face="Lucida Console"># Download at - http://www.microsoft.com/en-us/download/confirmation.aspx?id=42022</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#0000ff" size="1" face="Lucida Console">Add-Type</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#000080" size="1" face="Lucida Console">-Path</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8b0000" size="1" face="Lucida Console">"C:\Program Files (x86)\Microsoft\Exchange\Web Services\2.1\Microsoft.Exchange.WebServices.dll"</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />    <p align="left" />   <font color="#006400" size="1" face="Lucida Console">#Connetion - https://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeversion%28v=exchg.80%29.aspx</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" size="1" face="Lucida Console">$EmailAccount</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#a9a9a9" size="1" face="Lucida Console">=</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8b0000" size="1" face="Lucida Console">"your email address"</font></font>  <p align="left"><font color="#006400" size="1" face="Lucida Console">#Change the Exchange Version to work with your environment</font><font color="#000000" size="1" face="Lucida Console" />    </p><p align="left" />   <font color="#ff4500" size="1" face="Lucida Console">$EWS</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#a9a9a9" size="1" face="Lucida Console">=</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#0000ff" size="1" face="Lucida Console">New-Object</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">Microsoft.Exchange.WebServices.Data.ExchangeService</font><font color="#000000" size="1" face="Lucida Console">(</font><font color="#a9a9a9" size="1" face="Lucida Console">[</font><font color="#008080" size="1" face="Lucida Console">Microsoft.Exchange.WebServices.Data.ExchangeVersion</font><font color="#a9a9a9" size="1" face="Lucida Console">]::</font><font color="#000000" size="1" face="Lucida Console">Exchange2013_SP1)</font>  <p align="left"><font color="#006400" size="1" face="Lucida Console">#Change the “UseDefaultCredentials” to false if you want to specify alternate creds </font></p> <font color="#000000" size="2" face="Lucida Console">   <p align="left" />   <font color="#006400" size="1" face="Lucida Console">#$EWS.UseDefaultCredentials = $false </font></font><font color="#000000" size="1" face="Lucida Console">   <p align="left" />   <font color="#ff4500" size="1" face="Lucida Console">$EWS</font><font color="#a9a9a9" size="1" face="Lucida Console">.</font><font color="#000000" size="1" face="Lucida Console">AutodiscoverUrl(</font><font color="#ff4500" size="1" face="Lucida Console">$EmailAccount</font><font color="#000000" size="1" face="Lucida Console">) </font>    <p align="left" />    <p align="left" />   <font color="#ff4500" size="1" face="Lucida Console">$inbox</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#a9a9a9" size="1" face="Lucida Console">=</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#a9a9a9" size="1" face="Lucida Console">[</font><font color="#008080" size="1" face="Lucida Console">Microsoft.Exchange.WebServices.Data.Folder</font><font color="#a9a9a9" size="1" face="Lucida Console">]::</font><font color="#000000" size="1" face="Lucida Console">Bind(</font><font color="#ff4500" size="1" face="Lucida Console">$ews</font><font color="#a9a9a9" size="1" face="Lucida Console">,[</font><font color="#008080" size="1" face="Lucida Console">Microsoft.Exchange.WebServices.Data.WellKnownFolderName</font><font color="#a9a9a9" size="1" face="Lucida Console">]::</font><font color="#000000" size="1" face="Lucida Console">Inbox)</font>    <p align="left" />   <font color="#ff4500" size="1" face="Lucida Console">$mailitems</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#a9a9a9" size="1" face="Lucida Console">=</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#ff4500" size="1" face="Lucida Console">$inbox</font><font color="#a9a9a9" size="1" face="Lucida Console">.</font><font color="#000000" size="1" face="Lucida Console">FindItems(</font><font color="#800080" size="1" face="Lucida Console">10</font><font color="#000000" size="1" face="Lucida Console">)</font>    <p align="left" />   <font color="#ff4500" size="1" face="Lucida Console">$mailitems</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#a9a9a9" size="1" face="Lucida Console">|</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#0000ff" size="1" face="Lucida Console">ForEach</font><font color="#000000" size="1" face="Lucida Console"> {</font><font color="#ff4500" size="1" face="Lucida Console">$_</font><font color="#a9a9a9" size="1" face="Lucida Console">.</font><font color="#000000" size="1" face="Lucida Console">Load()}</font>    <p align="left" />   <font color="#ff4500" size="1" face="Lucida Console">$mailitems</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#a9a9a9" size="1" face="Lucida Console">|</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#0000ff" size="1" face="Lucida Console">Select</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">Sender</font><font color="#a9a9a9" size="1" face="Lucida Console">,</font><font color="#8a2be2" size="1" face="Lucida Console">Subject</font><font color="#a9a9a9" size="1" face="Lucida Console">,</font><font color="#8a2be2" size="1" face="Lucida Console">Body </font></font>  <p align="left">For those of you who are still with me…a little history.</p>  <p align="left">The Exchange Web Services (EWS) Managed API appears to have come onto the scene in early 2009 (Where was I?) with it’s Beta 1.0 release. Fast forward to today, it’s in its 2.2 release and is applicable to Exchange 2007 SP1 and UP including Office 365.  This API can be used to work with e-mail messages, calendar, task, and contact information…Translation it’s so much easier for a non-developer (like me!) to harness Exchange resources without dealing with the underlying SOAP interface of EWS. I mean how cool is it that Microsoft took the time to make a wrapper to get to the EWS. </p>  <p align="left">The construction was super simple, and is executed like this.</p>  <p align="left">1.) Create the client object which looks like this</p>  <p align="left"><a href="http://www.drowningintechnicaldebt.com/images/www_drowningintechnicaldebt_com/GregTate/Windows-Live-Writer/Exchange-Web-Services-Managed-API_BEE7/image_2.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.drowningintechnicaldebt.com/images/www_drowningintechnicaldebt_com/GregTate/Windows-Live-Writer/Exchange-Web-Services-Managed-API_BEE7/image_thumb.png" width="416" height="234" /></a></p>  <p align="left">2.) Set the URL by passing the “AutodiscoverURL()” method your email address. This will go out to your Exchange environment to get and fill the object with the correct “Exchange.asmx” web service.   <br />This might be something like “https://mail.contoso.com/EWS/Exchange.asmx”</p>  <p align="left">3.) Create a variable for the inbox folder</p>  <p align="left">4.) Create a variable for mailitems filling it with a search from the inbox using the “FindItems()” method. Incidentally this is where you might decide to do other things like use the “MarkAllItemsAsRead()” method to take care of those pesky unread items should you desire.</p>  <p align="left">5.) Loop through each of the mail items so they are loaded into PowerShell using the “Load()” method</p>  <p align="left">6.) Display them selecting whatever fields you deem important. For the sake of this demonstration it “Sender,Subject,Body”</p>  <p align="left"> </p>  <p align="left">All this to say I really am wildly excited about being able to use this as an alternative method to send e-mail from PowerShell Scripts where I use the .net method. Not to mention demonstrating how powerful and friendly powershell really is. Past that I can think of application within SharePoint synchronizing a calendar and task items from a mailbox without a third party program. I’m not saying this is the end all be all by any means but it’s a nice new egg of putty I can make immediate use of to fill some gaps until a better solution can be designed and implemented. </p>  <p align="left">It certainly made me think…”Hmm…This might work”  for this,that, and the other thing too! <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-bottom-style: none; border-right-style: none; border-left-style: none" alt="Smile" src="http://www.drowningintechnicaldebt.com/images/www_drowningintechnicaldebt_com/GregTate/Windows-Live-Writer/Exchange-Web-Services-Managed-API_BEE7/wlEmoticon-smile_2.png" /></p>
			<p class="postfoot">
				posted @
				3/18/2015 5:24 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_0" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_1" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/archive/2015/02/06/p2v-windows-10-and-parallels.aspx">P2V Windows 10 and Parallels</a></h3>
			<p>I have been running Windows 10 since the preview was released. My experience, so far, would be positive. It has been very smooth transition. As someone using a machine without a touchscreen, I would say it is a lot more functional than Windows 8/8.1. I still find the full screen apps lacking, but the operating system is smoother, overall, to me, and I enjoy using it.
</p><p>I own, and generally enjoy using, a MacBook Pro 15. My only complaint on the MacBook is the lack of physical Home, End, Insert, and Delete keys. I have run Windows of various versions on it in the past using Parallels to great success.
</p><p>Windows 10 has been happily living on my PC laptop, but I wanted to consolidate it, if I could, onto the MacBook Pro, so I could carry one thing. The resolution on the MacBook Pro is much higher as well and makes some of my work much easier. I am typing this on my Windows 10 VM that was restored onto Parallels on the MacBook Pro, and it's been working for a few days like a champ. I thought I would document the steps I took to move from the Physical machine to this Virtual machine if anyone else needed, as it was not that complicated once I located the information I needed.
</p><ol><li>Make a system image backup of Windows 10
</li><li>Restore the system image backup of Windows 10 onto Parallels VM
</li></ol><p>That is the high level, now I'm going to go through the steps I took to get there.
</p><ol><li><div>Make a system image backup of Windows 10
</div><ol><li>I grabbed a USB drive, and plugged it in where it was recognized as F:
</li><li><div>Ran the following command
</div><ol><li><span style="color:#222222; font-family:Courier New; background-color:#f9f9f9">wbAdmin start backup -backupTarget:F: -include:C: -allCritical -quiet</span>
						</li></ol></li><li>Note that you will need to replace F: with whatever drive you want to use.
</li></ol></li><li><div>Restore the system image backup of Windows 10 onto Parallels VM
</div><ol><li>Note: This was, for me a little trickier because my VM didn't seem to see my USB drive however I mounted it to the machine, so I used my NAS.
</li><li>Connected to a share on my NAS from my PC
</li><li>Copied the folder with the backup from my USB drive to the share.
</li><li>On Mac, Open Parallels, selected my WinX ISO
</li><li>Let Parallels do the entire install (I happened to be going somewhere for a while, so this just completed while I was gone. It's not really required)
</li><li>Held SHIFT and restart to get into the recovery console
</li><li>Went to repair, advanced, system image recovery (path may be a little different, but as long as you get to system image recovery, it's ok)
</li><li>Stepped through wizard and mapped drive to NAS share
</li><li>Picked backup and restored
</li><li>Restarts happened after that as needed.
</li><li>Once Windows was started, took a snapshot and began cleaning
</li><li>Installed Parallels tools and removed the driver software for my hardware I had installed
</li><li>Took another snapshot when all was stable and start working.
</li></ol></li></ol><p>One thing to note is that the Parallels tools need quite a few reboots. So if you are rebooting over and over again manually, you may think something is wrong, but it is probably fine. I wasn't being super observant, but I think it was 4 or 5 reboots that all looked like they did the same thing when they started.
</p><p>This was my first time using the system image recovery tool, and I have to say compared to Time Machine, it's a bit ridiculous and convoluted. It *did* work though once I found the commands and figured out what to do. By contrast, when I got my new mac, I just pointed it at my Time Machine location (which setup found automatically for me) and pushed a button. I imagine a OSX VM would work the same way. Apple! Why don't you have HOMEENDINSERTDELETE KEYS!!! Then you would be perfect! 
</p><p>
 </p><p>=P  
</p><p>For the page that I drew my inspiration from, look here:
</p><p><a href="http://www.howtogeek.com/167984/how-to-create-and-restore-system-image-backups-on-windows-8.1/">http://www.howtogeek.com/167984/how-to-create-and-restore-system-image-backups-on-windows-8.1/</a>
	</p>
			<p class="postfoot">
				posted @
				2/6/2015 6:44 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_1" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/">Roy Ashbrook</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_2" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/archive/2014/09/10/simple-riak-and-c-example.aspx">Simple RIAK and C# Example</a></h3>
			<p> </p>  <p>Install It:</p>  <ol>   <li>Have a linux box somewhere. i spun up a new centos 7.0 droplet on digital ocean for 5 bucks and turned it off when i was done with it.</li>    <li><a href="http://docs.basho.com/riak/latest/ops/building/installing/rhel-centos/">http://docs.basho.com/riak/latest/ops/building/installing/rhel-centos/</a></li>    <ol>     <li>Basically, I logged into my new machine and ran:</li>      <li>sudo yum install <a href="http://yum.basho.com/gpg/basho-release-5-1.noarch.rpm">http://yum.basho.com/gpg/basho-release-5-1.noarch.rpm</a></li>      <li>sudo yum install riak</li>   </ol>    <li>If you want this to be available outside of your machine, you need to modify the ip address riak is bound to.</li>    <ol>     <li>If you were logged in as root, go to the /etc/riak folder and edit the app.config</li>      <li>Modify the "http" area to have your public ip address as well as the 'PB' area up top.</li>   </ol>    <li>Run "riak start" to start up riak</li>    <li>Check <a href="http://&lt;your">http://&lt;your</a> ip&gt;:8098/riak/status should return some json</li> </ol>  <p> </p>  <p>Use it:</p>  <ol>   <li>Open LINQpad (or whatever you want)</li>    <li>NuGet search for riak</li>    <li>Install CorrugatedIron</li>    <li>Create a app.config file that is something like this:</li>    <ol>     <li>&lt;configuration&gt;       <br />&lt;configSections&gt;        <br />    &lt;section name="riakConfig" type="CorrugatedIron.Config.RiakClusterConfiguration, CorrugatedIron"/&gt;        <br />&lt;/configSections&gt;        <br />&lt;riakConfig nodePollTime="5000" defaultRetryWaitTime="200" defaultRetryCount="3"&gt;        <br />    &lt;nodes&gt;        <br />        &lt;node name="mynodename" hostAddress="actualnodeaddress" pbcPort="8087" restPort="8098" poolSize="0" /&gt;        <br />    &lt;/nodes&gt;        <br />&lt;/riakConfig&gt;        <br />&lt;/configuration&gt;</li>      <li>I think this file can be named anything really, I actually called it riak.config and included a path down below.</li>   </ol>    <li>try some c# code like this:</li>    <ol>     <pre class="brush: csharp;">void Main()<br />{<br />    //config file location<br />    var fl = @"path to my app.config";<br />    //name of the config section in the config file above<br />    var cs = "riakConfig";<br />    //name of our riak bucket to store things in<br />    var b = "mybucket";<br />    //connect to the cluster using our config file<br />    var clst = RiakCluster.FromConfig(cs,fl);<br />    //create a client<br />    var clnt = clst.CreateClient();<br />    //create an object to store<br />    var kvp = new KeyValuePair&lt;string,string&gt;("0","zero");<br />    //put it in a bucket in riak, key it, and drop the object in there<br />    var o = new RiakObject(b,kvp.Key, kvp);<br />    //put the object in riak<br />     clnt.Put(o);<br />    //go get the object using the same key as above<br />    var r = clnt.Get(b,kvp.Key);<br />    //dump the value we got back<br />    r.Value.GetObject&lt;KeyValuePair&lt;string,string&gt;&gt;().Dump();<br />}</pre>
  </ol>
</ol>
			<p class="postfoot">
				posted @
				9/10/2014 12:49 AM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_2" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/">Roy Ashbrook</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_3" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/archive/2014/07/11/pulling-a-sharepoint-2007-list-into-excel-as-raw-xml.aspx">Pulling a Sharepoint 2007 list into Excel as Raw XML</a></h3>
			<p>I recently had a need to mash-up some data from a SharePoint 2007 list in an Excel document I was working on. I already knew that I could work with SharePoint 2007 data in Excel by using the following instructions from Microsoft:</p>  <blockquote>   <ol>     <li>Do one the following on a SharePoint site:</li>   </ol>    <h6>Windows SharePoint Services 3.0</h6>    <ol>     <li>If your list is not already open, click its name on the Quick Launch. If the name of your list doesn't appear, click <b>View All Site Content</b>, and then click the name of your list. </li>      <li>On the <b>Actions</b> menu <img title="Actions menu" border="0" alt="Actions menu" src="http://officeimg.vo.msecnd.net/en-us/files/819/809/ZA010100999.gif" />, click <b>Export to Spreadsheet</b>. </li>      <li>If you are prompted to confirm the operation, click <b>OK</b>.</li>   </ol>    <h6>Windows SharePoint Services 2.0</h6>    <ol>     <li>If your list is not already open, click <b>Documents and Lists</b>, and then click the name of your list. </li>      <li>On the page that displays the list, under <b>Actions</b>, click <b>Export to spreadsheet.</b></li>   </ol>    <ol>     <li>In the <b>File Download</b> dialog box, click <b>Open</b>. </li>      <li>If you are prompted whether to enable data connections on your computer, click <b>Enable</b> if you believe the connection to the data on the SharePoint site is safe to enable. </li>      <li>Do one of the following:</li>   </ol>    <ul>     <li>If no workbook is open, Excel creates a new blank workbook and inserts the data as a table on a new worksheet. </li>      <li>If a workbook is open, do the following in the <b>Import Data</b> dialog box that appears:         <ol>         <li>Under <b>Select how you want to view this data in your workbook</b>, click <b>Table</b>, <b>PivotTable Report</b>, or<b>PivotChart and PivotTable Report</b>. </li>          <li>Under <b>Where do you want to put the data</b>, click <b>Existing worksheet</b>, <b>New worksheet</b>, or <b>New workbook</b>.</li>       </ol>     </li>   </ul>    <p>If you click <b>Existing worksheet</b>, click the cell where you want to place the upper-left corner of the list.</p>    <ol start="start">     <li>Click <b>OK</b>.</li>   </ol> </blockquote>  <p><a title="http://office.microsoft.com/en-us/excel-help/import-data-from-a-sharepoint-list-HA010131473.aspx" href="http://office.microsoft.com/en-us/excel-help/import-data-from-a-sharepoint-list-HA010131473.aspx">http://office.microsoft.com/en-us/excel-help/import-data-from-a-sharepoint-list-HA010131473.aspx</a></p>  <p> </p>  <p>That’s all very well, but in my case I had an existing spreadsheet with quite a few tables and an existing excel model. I didn’t want to go through these gyrations. Isn’t there some way to just get the data right off the list as a web page?</p>  <p>Yes. Enter the “Import XML data” feature in Excel. MS Offers the following following guidance for getting XML data from a web service:</p>  <blockquote>   <h4>Import XML data from a Web service</h4>    <p>To do the following procedure, you must have access to a server that is running pnSTS11. A default installation of pnSTS11 provides a data retrieval service for connecting to data in SharePoint lists. A SharePoi<a name="_GoBack"></a>nt site administrator can install the Microsoft Office Web Parts and Components to add additional data retrieval services for Microsoft SQL Server and Microsoft Business Solutions. The installation program for Microsoft Office Web Parts and Components is available from the <a href="http://office.microsoft.com/en-us/excel-help/redir/XT001032664.aspx?CTT=5&amp;origin=HP001042351">Downloads on Microsoft Office Online</a>.</p>    <ol>     <li>On the <b>Data</b> menu, point to <b>Import External Data</b>, and then click <b>Import Data</b>. </li>      <li>Do one of the following:</li>   </ol>    <p><a href="http://office.microsoft.com/en-us/excel-help/"><img title="Show" border="0" alt="Show" src="http://officeimg.vo.msecnd.net/en-us/files/785/945/ZA079005000.gif" />Open an existing data source</a></p>    <p><a href="http://office.microsoft.com/en-us/excel-help/"><img title="Show" border="0" alt="Show" src="http://officeimg.vo.msecnd.net/en-us/files/785/945/ZA079005000.gif" />Create and open a new data source connection</a></p>    <ol>     <li>Select one of the following options:</li>   </ol>    <ul>     <li><b>XML list in existing worksheet</b></li>   </ul>    <p>The contents of the XML data file are imported into an XML list in the existing worksheet at the specified cell location.</p>    <ul>     <li><b>XML list in new worksheet</b></li>   </ul>    <p>The contents of the file are imported into an XML list in a new worksheet starting at cell A1.</p>    <ol start="start">     <li>If the XML data file does not refer to a schema, then Excel will infer the schema from the XML data file. </li>      <li>To control the behavior of XML data, such as data binding, format, and layout, click <b>Properties</b> which displays the <b>XML Map properties</b> dialog box. For example, existing data in a mapped range will be overwritten when you import data by default, but you can change this.</li>   </ol> </blockquote>  <p><a title="http://office.microsoft.com/en-us/excel-help/import-xml-data-HP001042351.aspx#BMimport_xml_data_from_a_web_service" href="http://office.microsoft.com/en-us/excel-help/import-xml-data-HP001042351.aspx#BMimport_xml_data_from_a_web_service">http://office.microsoft.com/en-us/excel-help/import-xml-data-HP001042351.aspx#BMimport_xml_data_from_a_web_service</a></p>  <p> </p>  <p>But how to get the URL to call for the XML data? The following link holds the key:</p>  <p><a href="http://{0}/_vti_bin/owssvr.dll?Cmd=Display&amp;List={1}&amp;View={2}&amp;XMLDATA=TRUE">http://{0}/_vti_bin/owssvr.dll?Cmd=Display&amp;List={1}&amp;View={2}&amp;XMLDATA=TRUE</a></p>  <p>You have to replace {0} with your site URL and the {1} with your GUID for the list ID on SharePoint and {2} with the view GUID. How to get these? Well the easiest way (I think) is to go to your list, then select the view you want. Click view dropdown and select “Modify this view.” This will open the link to the screen where you can modify that view. The URL in the browser should have a View and List value. I stripped the %7B and %7D off as those are the { and } respectively. You don’t need to use a view and can omit that completely if you want to connect directly to the list. But I found I normally wanted to just get a certain view or I wanted to create a special view just for this activity.</p>  <p>Regardless, you can now follow the auto prompts to get the data into a spreadsheet. You can also open the developer tab and dive into the XML itself (see the MS link above for more instructions) and drag and drop the fields to other locations. Now when you get the data it will put it wherever you bound it.</p>  <p>By default it will dump it into a table and will include the schema items which you don’t need. You can open the Developer tab, select “Source” in the XML section and then just deselect the ns2 : Schema element. It will stop syncing those fields and you’ll have to clean up your table to get rid of them. I was able to rename the columns etc as needed, but since this is a read only feed I was typically using it to calculate other columns so I frequently stick with the ows_* columns that are the defaults for the data element.</p>  <p>Screenshot of the XML section from Developer tab in Excel:</p>  <p><img alt="XML Refresh Data" src="http://officeimg.vo.msecnd.net/en-us/files/376/918/ZA102921552.jpg" /></p>  <p> </p>  <p>Once I figured out I needed to find the XML import stuff for Excel, I was able to find lots of articles on it online to help. The following was my favorite and links to a lot of other ones.</p>  <p><a title="http://blogs.msdn.com/b/kaevans/archive/2009/05/01/getting-xml-data-from-a-sharepoint-list-the-easy-way.aspx" href="http://blogs.msdn.com/b/kaevans/archive/2009/05/01/getting-xml-data-from-a-sharepoint-list-the-easy-way.aspx">http://blogs.msdn.com/b/kaevans/archive/2009/05/01/getting-xml-data-from-a-sharepoint-list-the-easy-way.aspx</a></p>
			<p class="postfoot">
				posted @
				7/11/2014 3:39 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_3" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/">Roy Ashbrook</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_4" href="http://www.DrowningInTechnicalDebt.com/GregTate/archive/2014/06/30/new-selfsignedcertificate-and-cert-provider.aspx">New-SelfSignedCertificate and CERT Provider</a></h3>
			<p> </p>  <p>Well the non-whimsical title aside I must say “hats off “ to those PowerShell gurus at Microsoft. You’ve made my live a bit easier.    <br />This quick post is a look at the <a href="http://technet.microsoft.com/en-us/library/hh848633.aspx">New-SelfSignedCertificate</a> CMDLET and how the PowerShell <a href="http://technet.microsoft.com/en-us/library/hh847807(v=wps.620).aspx">Certificate (CERT) Provider</a>. </p>  <p>I realize both are rather self explanatory, the first creating a self signed certificate where as the other providing directory   <br />like interaction / access within PowerShell to the certificate stores. Essentially making the need to spin ye old mcc certificate    <br />console a moot point. </p>  <p>Suppose you’re tasked with building a functional lab {insert Microsoft software title here} environment, naturally you want to   <br /> automate as much as possible yet those pesky certificates cause you to break open IIS to create a self signed certificates.     <br />Sure, it’s only an extra manual step or two but my take, why do manual when automation isn’t but half the effort more? </p>  <p>That said what if the requirements are for a SharePoint 2013 LAB, with a functioning APP Model. The app model requirements bring   <br />along with it the requirements for wildcard certificates.  Now I could be missing something but my testing within IIS8 didn’t allow    <br /> for specifying the FQDN (CN).     <br />    <br />I guess at this point, one could consider a few options. First one might be inclined to stand up a lab PKI(or leverage an existing one)    <br />Of course a more simple but costly route would be to use public certificates. </p>  <p>If time and money are constraints then our friendly neighborhood PowerShell cmdlet and CERT provider can quickly help us out.   <br />After all the New-SelfSignedCertificate will let us specify our DNS name or DNS names. Yes…That was plural of names, as in more    <br /> than one. And since we are talking DNS names, well then we only find ourselves limited by what is defined in DNS or the server     <br />HOSTS file (none of us do that – right?) </p>  <p>So take this snippet and incorporate it into your automated lab builds or conversely offer your own opinion <font color="#006400" size="1" face="Lucida Console" />       <font color="#000000" size="1" face="Lucida Console" />    </p><p align="left" />   <font color="#006400" size="1" face="Lucida Console">#Issue A Self Signed Cert</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#0000ff" size="1" face="Lucida Console">New-SelfSignedCertificate</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#000080" size="1" face="Lucida Console">-CertStoreLocation</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">Cert:\LocalMachine\My</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#000080" size="1" face="Lucida Console">-DnsName</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">*.subdomain1.subdomain.domain.org</font><font color="#a9a9a9" size="1" face="Lucida Console">,</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">hostname.subdomain1.subdomain.subdomain.org</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#006400" size="1" face="Lucida Console">#Export Self Signed Cert To Temp Location</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#0000ff" size="1" face="Lucida Console">Get-ChildItem</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">Cert:\LocalMachine\My</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#a9a9a9" size="1" face="Lucida Console">|</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#0000ff" size="1" face="Lucida Console">Where</font><font color="#000000" size="1" face="Lucida Console"> {</font><font color="#ff4500" size="1" face="Lucida Console">$_</font><font color="#a9a9a9" size="1" face="Lucida Console">.</font><font color="#000000" size="1" face="Lucida Console">Subject </font><font color="#a9a9a9" size="1" face="Lucida Console">-like</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8b0000" size="1" face="Lucida Console">"*subdomain.domain.org"</font><font color="#000000" size="1" face="Lucida Console">} </font><font color="#a9a9a9" size="1" face="Lucida Console">|</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#0000ff" size="1" face="Lucida Console">Export-Certificate</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#000080" size="1" face="Lucida Console">-Type</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">CERT</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#000080" size="1" face="Lucida Console">-FilePath</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">E:\Temp\SelfSign.cert</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#006400" size="1" face="Lucida Console">#Import To TRUSTED ROOT AUTHORITY – This prevents browser Errors</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#0000ff" size="1" face="Lucida Console">Import-Certificate</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#000080" size="1" face="Lucida Console">-FilePath</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">E:\temp\SelfSign.cert</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#000080" size="1" face="Lucida Console">-CertStoreLocation</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">Cert:\LocalMachine\Root</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#006400" size="1" face="Lucida Console">#Clean Up Temp </font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" />   <font color="#0000ff" size="1" face="Lucida Console">Remove-Item</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#000080" size="1" face="Lucida Console">-Path</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">E:\Temp\SelfSign.cert</font><font color="#000000" size="1" face="Lucida Console" /><font color="#000000" size="2" face="Lucida Console">     <p align="left" />     <font color="#006400" size="1" face="Lucida Console">#Move Certificate From Personal To WebHosting</font><font color="#000000" size="1" face="Lucida Console" />      <p align="left" />     <font color="#0000ff" size="1" face="Lucida Console">Get-ChildItem</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">Cert:\LocalMachine\My</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#a9a9a9" size="1" face="Lucida Console">|</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#0000ff" size="1" face="Lucida Console">Where</font><font color="#000000" size="1" face="Lucida Console"> {</font><font color="#ff4500" size="1" face="Lucida Console">$_</font><font color="#a9a9a9" size="1" face="Lucida Console">.</font><font color="#000000" size="1" face="Lucida Console">Subject </font><font color="#a9a9a9" size="1" face="Lucida Console">-like</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8b0000" size="1" face="Lucida Console">"*arlpdevapps.arlp.org"</font><font color="#000000" size="1" face="Lucida Console">} </font><font color="#a9a9a9" size="1" face="Lucida Console">|</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#0000ff" size="1" face="Lucida Console">Move-Item</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#000080" size="1" face="Lucida Console">-Destination</font><font color="#000000" size="1" face="Lucida Console"> </font><font color="#8a2be2" size="1" face="Lucida Console">Cert:\LocalMachine\WebHosting </font></font>  <p> </p>  <p>Hope this helps someone. </p>
			<p class="postfoot">
				posted @
				6/30/2014 4:49 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_4" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_5" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/archive/2014/06/30/generating-a-date-dimension-table-in-c.aspx">Generating a Date Dimension table in C#</a></h3>
			<p>I use a table similar to this quite frequently for my own personal reporting and analytics on various things. I figured I would polish it slightly and publish it in case anyone else needed it. =)</p> <script src="https://gist.github.com/royashbrook/d6bd1635afdd44ea8984.js"></script>
			<p class="postfoot">
				posted @
				6/30/2014 11:05 AM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_5" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/">Roy Ashbrook</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_6" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/archive/2014/06/25/list-fieldsformfields-data-in-a-word-document-using-c-and.aspx">List Fields/Formfields data in a Word Document using C# and Microsoft.Office.Interop.Word</a></h3>
			<p>I have a set of documents I need to review regularly. They are *mostly* form data in word so I wanted to write a simple script to extract the data I need from all of the documents and put it into a table. I wasn't sure how to do this so I wrote a little script to iterate over the data in the document. The documents I review have several versions, different form fields, and other irregularities. I wanted to save a little script I wrote that uses various methods to iterate through the document. I use <a href="http://www.linqpad.net/">LINQPad</a> regularly, so I wrote this in there in C# as a method for opening and handling the word document, and an extension for iterating it.  </p>  <script src="https://gist.github.com/royashbrook/a74375d367f90f3a3214.js"></script>  <p>References: </p><p><a href="http://stackoverflow.com/questions/6777422/disposing-of-microsoft-office-interop-word-application">http://stackoverflow.com/questions/6777422/disposing-of-microsoft-office-interop-word-application</a> 	</p><p><a href="http://stackoverflow.com/questions/1976503/iterating-over-word-document-fields-using-comautomationfactory-in-silverlight-4">http://stackoverflow.com/questions/1976503/iterating-over-word-document-fields-using-comautomationfactory-in-silverlight-4</a></p>
			<p class="postfoot">
				posted @
				6/25/2014 9:28 AM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_6" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/">Roy Ashbrook</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_7" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/archive/2014/06/04/find-recent-items-in-windows-8.aspx">Find Recent Items in Windows 8</a></h3>
			<ol><li>Hit Windows + R (Opens "Run" command)
</li><li>Type "Recent"
</li><li>Hit Enter!
</li></ol><p>Google search yields a ton of sources for this. I'm just going to reference the first one that I looked at:
</p><p><a href="http://superuser.com/questions/492223/is-there-a-windows-8-equivalent-of-recent-items-my-recent-documents?s=0793feb0-9bec-4828-8325-e1650b31aadf">http://superuser.com/questions/492223/is-there-a-windows-8-equivalent-of-recent-items-my-recent-documents?s=0793feb0-9bec-4828-8325-e1650b31aadf</a>
	</p><p>
 </p>
			<p class="postfoot">
				posted @
				6/4/2014 3:05 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_7" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/">Roy Ashbrook</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_8" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/archive/2014/06/04/amazon-workspaces-usage-notes.aspx">Amazon Workspaces – Usage Notes</a></h3>
			<p>Pros:
</p><ul><li>Reasonably Priced
</li><li>Easy to setup
</li><li>Easy to add other users
</li><li>Easy to reset to zero and retain data
</li><li>Expensive plan has good response
</li></ul><p>Cons:
</p><ul><li>No usage based pricing
</li><li>Requires usage of the Amazon Workspaces Client
</li><li>Can't save password, makes complex passwords a pain
</li><li>Can't move to different workspace easily
</li><li>Cheap plan not really fast enough for me.
</li></ul><p>Summary:
</p><p>I think the <a href="http://aws.amazon.com/workspaces/pricing/">standard plan</a> would be great for most people. Reasonably priced if you need office or not. I think using the <a href="http://office.microsoft.com/en-us/office365home/">MS Office 365</a> would be a better deal for most, but it's certainly nice to get turnkey with no work on office and anti-virus. I'm surprised MS doesn't offer something like this yet really. I wish there was a save password option for the client to make use of complex passwords easier, but this could be solved by a password reset policy I suppose.
</p><p>My Profile:
</p><p>My computer time is split between Communication and Content Creation about 70/30. Communication is via the usual Email, Chat, and Screen Sharing. Most content creation is in MS Office or some type of coding application. The most important thing for me when utilizing a VDI platform is that it is fairly responsive when I'm working in multiple applications and need to alt-tab back and forth. VDI doesn't exactly shine in this capacity when you are working remotely, but I feel like I can get a good sense of a worst case scenario for typical users when I am testing.
</p><p>Verdict:
</p><p>Good, but I am not going to replace my standard solution for this (local use of <a href="http://www.parallels.com/">Parallels</a> on my MBPro), yet.
</p><p>Pricing, Setup, Experience, Recovery, Performance</p>
			<p class="postfoot">
				posted @
				6/4/2014 1:18 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_8" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/RoyAshbrook/">Roy Ashbrook</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_9" href="http://www.DrowningInTechnicalDebt.com/GregTate/archive/2014/05/29/ad-user-account-creationndashscript.aspx">AD User Account Creation&ndash;Script</a></h3>
			<p>I’m throwing this script out there for any developers or admins who are seeking a quick SharePoint focused script for user account creation.</p>  <p>In my environment we’re working towards automated unattended install of SharePoint, including account creation. AutoSPInstaller is cool   <br />but it seems too complicated for me. Put another way, if I’m going to spend time learning I’m choosing to learn PowerShell and SharePoint    <br />in more detail. </p>  <p>With that said, here is my script. This script could easily import from a CSV (or other file), read a SharePoint List, or any other means of    <br />input. For the purpose of an example, an array is used. </p>  <p> </p>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: darkgreen"><font style="font-weight: normal">#Make Use Of An Array Just for example. This could easily be a csv but since this was for dev it was easier</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;">        </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: darkgreen"><font style="font-weight: normal">#In Case of CSV Column Order would be "SamAccountNAme,FName,LName,Description,Password</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;">        </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: darkgreen"><font style="font-weight: normal">#$UserList = Import-CSV -Path &lt;csv path here&gt;</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;">        </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: orangered"><font style="font-weight: normal">$UserList</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal"> </font><span style="color: darkgray"><font style="font-weight: normal">=</font></span><font style="font-weight: normal"> @(</font>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">@(</font><span style="color: darkred"><font style="font-weight: normal">"&lt;SamAccountName&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;FName&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;LName&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;Description&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;PassworD&gt;"</font></span><font style="font-weight: normal">)</font><span style="color: darkgray"><font style="font-weight: normal">,</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">@(</font><span style="color: darkred"><font style="font-weight: normal">"&lt;SamAccountName1&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;FName1&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;LName1&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;Description1&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;PassworD1&gt;"</font></span><font style="font-weight: normal">)</font><span style="color: darkgray"><font style="font-weight: normal">,</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">@(</font><span style="color: darkred"><font style="font-weight: normal">"&lt;SamAccountName2&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;FName2&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;LName2&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;Description2&gt;"</font></span><span style="color: darkgray"><font style="font-weight: normal">,</font></span><span style="color: darkred"><font style="font-weight: normal">"&lt;PassworD2&gt;"</font></span><font style="font-weight: normal">)</font>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">)</font>         </span></h2> <span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;">    </span>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: darkgreen"><font style="font-weight: normal">#Loop Through Each Nested Array</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;">        </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: darkblue"><font style="font-weight: normal">ForEach</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal"> (</font><span style="color: orangered"><font style="font-weight: normal">$User</font></span><font style="font-weight: normal"> </font><span style="color: darkblue"><font style="font-weight: normal">in</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$UserList</font></span><font style="font-weight: normal">) {</font>         </span></h2> <span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;">    </span>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: orangered"><font style="font-weight: normal">$SamAccountName</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal"> </font><span style="color: darkgray"><font style="font-weight: normal">=</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$User</font></span><span style="color: darkgray"><font style="font-weight: normal">[</font></span><span style="color: purple"><font style="font-weight: normal">0</font></span><span style="color: darkgray"><font style="font-weight: normal">]</font></span><span style="color: darkgreen"><font style="font-weight: normal">#(Read-Host -Prompt "Please Enter SamAccountName")</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: darkgreen"><font style="font-weight: normal">#Check To See If SamAccountName Already Exists, If It Doesnt Create It</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;">        </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: darkblue"><font style="font-weight: normal">If</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal"> (</font><span style="color: darkgray"><font style="font-weight: normal">!</font></span><font style="font-weight: normal">(</font><span style="color: blue"><font style="font-weight: normal">Get-ADUser</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-Filter</font></span><font style="font-weight: normal"> {</font><span style="color: blue"><font style="font-weight: normal">SamAccountNAme</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-eq</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$SamAccountName</font></span><font style="font-weight: normal">})){</font>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    </font><span style="color: orangered"><font style="font-weight: normal">$OUPath</font></span><font style="font-weight: normal"> </font><span style="color: darkgray"><font style="font-weight: normal">=</font></span><font style="font-weight: normal"> </font><span style="color: darkred"><font style="font-weight: normal">"OU=&lt;OUName&gt;,OU=&lt;OUName&gt;,DC=&lt;DomainRoot&gt;,DC=&lt;dot suffix&gt;"</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    </font><span style="color: orangered"><font style="font-weight: normal">$DomainSuffix</font></span><font style="font-weight: normal"> </font><span style="color: darkgray"><font style="font-weight: normal">=</font></span><font style="font-weight: normal"> </font><span style="color: darkred"><font style="font-weight: normal">"@&lt;domain.org&gt;"</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    </font><span style="color: orangered"><font style="font-weight: normal">$FName</font></span><font style="font-weight: normal"> </font><span style="color: darkgray"><font style="font-weight: normal">=</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$User</font></span><span style="color: darkgray"><font style="font-weight: normal">[</font></span><span style="color: purple"><font style="font-weight: normal">1</font></span><span style="color: darkgray"><font style="font-weight: normal">]</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    </font><span style="color: orangered"><font style="font-weight: normal">$LName</font></span><font style="font-weight: normal"> </font><span style="color: darkgray"><font style="font-weight: normal">=</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$User</font></span><span style="color: darkgray"><font style="font-weight: normal">[</font></span><span style="color: purple"><font style="font-weight: normal">2</font></span><span style="color: darkgray"><font style="font-weight: normal">]</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    </font><span style="color: orangered"><font style="font-weight: normal">$Description</font></span><font style="font-weight: normal"> </font><span style="color: darkgray"><font style="font-weight: normal">=</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$User</font></span><span style="color: darkgray"><font style="font-weight: normal">[</font></span><span style="color: purple"><font style="font-weight: normal">3</font></span><span style="color: darkgray"><font style="font-weight: normal">]</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    </font><span style="color: orangered"><font style="font-weight: normal">$PassWord</font></span><font style="font-weight: normal"> </font><span style="color: darkgray"><font style="font-weight: normal">=</font></span><font style="font-weight: normal"> </font><span style="color: blue"><font style="font-weight: normal">ConvertTo-SecureString</font></span><font style="font-weight: normal"> (</font><span style="color: orangered"><font style="font-weight: normal">$User</font></span><span style="color: darkgray"><font style="font-weight: normal">[</font></span><span style="color: purple"><font style="font-weight: normal">4</font></span><span style="color: darkgray"><font style="font-weight: normal">]</font></span><font style="font-weight: normal">) </font><span style="color: navy"><font style="font-weight: normal">-AsPlainText</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-Force</font></span><font style="font-weight: normal"> </font><span style="color: darkgreen"><font style="font-weight: normal">#(Read-Host -Prompt "Enter Account Password" -AsSecureString)</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    </font><span style="color: blue"><font style="font-weight: normal">New-ADUser</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-Name</font></span><font style="font-weight: normal"> (</font><span style="color: orangered"><font style="font-weight: normal">$FName</font></span><span style="color: darkgray"><font style="font-weight: normal">+</font></span><span style="color: darkred"><font style="font-weight: normal">" "</font></span><span style="color: darkgray"><font style="font-weight: normal">+</font></span><span style="color: orangered"><font style="font-weight: normal">$LName</font></span><font style="font-weight: normal">) </font><span style="color: navy"><font style="font-weight: normal">-SamAccountName</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$SamAccountName</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-GivenName</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$FName</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-Surname</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$LName</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-DisplayName</font></span><font style="font-weight: normal"> (</font><span style="color: orangered"><font style="font-weight: normal">$FName</font></span><span style="color: darkgray"><font style="font-weight: normal">+</font></span><span style="color: darkred"><font style="font-weight: normal">" "</font></span><span style="color: darkgray"><font style="font-weight: normal">+</font></span><span style="color: orangered"><font style="font-weight: normal">$LName</font></span><font style="font-weight: normal">) </font><span style="color: navy"><font style="font-weight: normal">-Path</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$OUPath</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-UserPrincipalName</font></span><font style="font-weight: normal"> (</font><span style="color: orangered"><font style="font-weight: normal">$SamAccountName</font></span><span style="color: darkgray"><font style="font-weight: normal">+</font></span><span style="color: orangered"><font style="font-weight: normal">$domainsuffix</font></span><font style="font-weight: normal">) </font><span style="color: navy"><font style="font-weight: normal">-Description</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$Description</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-AccountPassword</font></span><font style="font-weight: normal"> </font><span style="color: orangered"><font style="font-weight: normal">$PassWord</font></span><font style="font-weight: normal">  </font><span style="color: navy"><font style="font-weight: normal">-PasswordNeverExpires:</font></span><span style="color: orangered"><font style="font-weight: normal">$true</font></span><font style="font-weight: normal"> </font><span style="color: navy"><font style="font-weight: normal">-Enabled:</font></span><span style="color: orangered"><font style="font-weight: normal">$true</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    }</font>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;; color: darkblue"><font style="font-weight: normal">Else</font></span><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;">        </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    {</font>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    </font><span style="color: blue"><font style="font-weight: normal">Write-Host</font></span><font style="font-weight: normal"> </font><span style="color: darkred"><font style="font-weight: normal">"</font></span><span style="color: orangered"><font style="font-weight: normal">$SamAccountName</font></span><span style="color: darkred"><font style="font-weight: normal"> already exists within AD. It will not be created"</font></span>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">    }</font>         </span></h2>  <h2><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;"><font style="font-weight: normal">} </font></span></h2>  <p class="MsoNormal" style="background: white; text-autospace: "><span style="font-size: 9pt; font-family: &quot;Lucida Console&quot;">     </span></p>
			<p class="postfoot">
				posted @
				5/29/2014 4:18 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_9" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_10" href="http://www.DrowningInTechnicalDebt.com/GregTate/archive/2014/05/29/disable-loopback-script-sharepoint.aspx">Disable LoopBack Script - SharePoint</a></h3>
			<p>A friend of mine and I were discussing the topic of Disabling LoopBack and which is the better route to go when it comes to creating a new SharePoint 2013 farm. </p>  <p>My perspective, when possible, abide by Microsoft’s recommendations. In <a href="http://support.microsoft.com/kb/896861">this case</a> Microsoft seems to take the classic “it depends” stance on disabling ye old loopback. </p>  <p>Being me, I asked my self why not have both? After all I’m sure PowerShell could help out here. To those who know me or have read this blog; I’m not a developer and</p>  <p>it probably shows in various scripts. That said, the following script does accomplish the desired result of one script allowing you to choose if you are going to take the</p>  <p>“Developer” route and disable the loopback, or take the “Admin” route and call out your exceptions. If you are a new SharePoint Admin this might be useful, if you arent</p>  <p>new to SharePoint then I’m sure you’ve already clicked off of this post a few lines back…lol</p> <font color="#000000" face="Lucida Console" /><font color="#000000" face="Lucida Console">   <h2 align="left"><font color="#006400" size="2" face="Lucida Console"><font style="font-weight: normal">#Disable LoopBack Or Enter Back Connection Name</font></font></h2>    <h2 align="left"><font color="#006400" size="2" face="Lucida Console"><font style="font-weight: normal">#Use this to avoid disabling loopback - http://support.microsoft.com/kb/896861</font></font><font color="#000000" face="Lucida Console" /></h2>   <font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font color="#006400" size="2" face="Lucida Console"><font style="font-weight: normal">#Define in CSV format your FDQNs </font></font><font color="#000000" face="Lucida Console" /></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$DisableLoopBack</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">=</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$null</font></font><font color="#000000" face="Lucida Console" /></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#00008b" face="Lucida Console"><font style="font-weight: normal">Do</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> {</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$DisableLoopBack</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">=</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> (</font></font><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">Read-Host</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"Would you like to disable loopback? (Yes / No)"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">) }</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#00008b" face="Lucida Console"><font style="font-weight: normal">Until</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> (</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$DisableLoopBack</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">-eq</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"Yes"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">-or</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$DisableLoopBack</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">-eq</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"No"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">)</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#00008b" face="Lucida Console"><font style="font-weight: normal">If</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> (</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$DisableLoopBack</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">-eq</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"Yes"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">){</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">Write-Warning</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"According To Microsoft You Should NOT disable loopback, HOWEVER it's a common development practice."</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">New-ItemProperty</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8a2be2" face="Lucida Console"><font style="font-weight: normal">HKLM:\System\CurrentControlSet\Control\Lsa</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#000080" face="Lucida Console"><font style="font-weight: normal">-Name</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"DisableLoopbackCheck"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#000080" face="Lucida Console"><font style="font-weight: normal">-value</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"1"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#000080" face="Lucida Console"><font style="font-weight: normal">-PropertyType</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8a2be2" face="Lucida Console"><font style="font-weight: normal">dword</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#000080" face="Lucida Console"><font style="font-weight: normal">-Force</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">|</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">Out-Null</font></font><font color="#000000" face="Lucida Console" /></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">IISReset</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8a2be2" face="Lucida Console"><font style="font-weight: normal">/noforce</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font size="2"><font style="font-weight: normal">}</font></font></h2>      <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#00008b" face="Lucida Console"><font style="font-weight: normal">Elseif</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> (</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$DisableLoopBack</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">-eq</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"No"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">){</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$HostNames</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">=</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> @()</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$HostNames</font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">+=</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">(</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$env:COMPUTERNAME</font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">+</font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"."</font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">+</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$env:USERDNSDOMAIN</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">)</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$More</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">=</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$null</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#00008b" face="Lucida Console"><font style="font-weight: normal">Do</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> {</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">Write-Host</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"Here are the host names that will be added to the BackConnectionHostNames Exception List"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">Write-Host</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$HostNames</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#000080" face="Lucida Console"><font style="font-weight: normal">-ForegroundColor</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8a2be2" face="Lucida Console"><font style="font-weight: normal">Green</font></font><font color="#000000" face="Lucida Console" /></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$More</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">=</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> (</font></font><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">Read-Host</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"Would you like to add others? (Yes / No)"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">)</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#00008b" face="Lucida Console"><font style="font-weight: normal">If</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> (</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$More</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">-eq</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"Yes"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">){</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$AddHost</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">=</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> (</font></font><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">Read-Host</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"Enter FQDN Host Name"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">)</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$HostNames</font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">+=</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$AddHost</font></font><font color="#000000" face="Lucida Console" /></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">Write-Host</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$AddHost</font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal"> has been added to the list of names above"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#000080" face="Lucida Console"><font style="font-weight: normal">-ForegroundColor</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8a2be2" face="Lucida Console"><font style="font-weight: normal">Green</font></font><font color="#000000" face="Lucida Console" /></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$More</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">=</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> (</font></font><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">Read-Host</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"Would you like to add others? (Yes / No)"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">)</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font size="2"><font style="font-weight: normal">}</font></font></h2>      <h2 align="left"><font size="2"><font style="font-weight: normal">}</font></font></h2>      <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#00008b" face="Lucida Console"><font style="font-weight: normal">Until</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> (</font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$More</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#a9a9a9" face="Lucida Console"><font style="font-weight: normal">-eq</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"No"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal">)</font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">New-ItemProperty</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8a2be2" face="Lucida Console"><font style="font-weight: normal">HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#000080" face="Lucida Console"><font style="font-weight: normal">-Name</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8b0000" face="Lucida Console"><font style="font-weight: normal">"BackConnectionHostNames"</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#000080" face="Lucida Console"><font style="font-weight: normal">-Value</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#ff4500" face="Lucida Console"><font style="font-weight: normal">$HostNames</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#000080" face="Lucida Console"><font style="font-weight: normal">-PropertyType</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8a2be2" face="Lucida Console"><font style="font-weight: normal">MultiString</font></font><font color="#000000" face="Lucida Console" /></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" face="Lucida Console" /><font size="2"><font color="#0000ff" face="Lucida Console"><font style="font-weight: normal">IISReset</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font><font color="#8a2be2" face="Lucida Console"><font style="font-weight: normal">/noforce</font></font><font color="#000000" face="Lucida Console"><font style="font-weight: normal"> </font></font></font></h2>   </font><font color="#000000" face="Lucida Console">     <h2 align="left"><font color="#000000" size="2" face="Lucida Console"><font style="font-weight: normal">} </font></font></h2>   </font></font>
			<p class="postfoot">
				posted @
				5/29/2014 4:05 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_10" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_11" href="http://www.DrowningInTechnicalDebt.com/GregTate/archive/2014/01/02/uploading-files-to-sharepoint-using-powershell.aspx">Uploading Files to SharePoint using PowerShell</a></h3>
			<p>Today I had to fall in line and do something I’m not entirely proud of. I had to create a script to replicate files from a fileshare to Sharepoint. Struggling to find value in the efforts, I figured a blog post to remind me of this event was fitting. The script was rather basic, something good, and I took the opportunity to grow, exploring the world of Powershell – SharePoint interaction outside of the SharePoint PS SnapIn.</p>  <p>Surprisingly, it was a bit easier than I had imagined. While I wish I could take 100% of the credit, inspiration for this function comes from this <a href="http://spmaster.wordpress.com/2011/08/15/uploading-documents-to-sharepoint-via-powershell/">article</a></p> <font color="#000000" face="Lucida Console">   <p align="left" />   <font color="#00008b" face="Lucida Console">Function</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Upload-SPFile</font><font color="#000000" face="Lucida Console"> { </font>    <p align="left" />   <font color="#00008b" face="Lucida Console">Param</font><font color="#000000" face="Lucida Console"> ( </font>    <p align="left" />   <font color="#006400" face="Lucida Console">#Local or Network Path</font><font color="#000000" face="Lucida Console"> </font>    <p align="left" />   <font color="#a9a9a9" face="Lucida Console">[</font><font color="#00bfff" face="Lucida Console">parameter</font><font color="#000000" face="Lucida Console">(Mandatory</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#ff4500" face="Lucida Console">$true</font><font color="#000000" face="Lucida Console">)</font><font color="#a9a9a9" face="Lucida Console">][</font><font color="#008080" face="Lucida Console">string</font><font color="#a9a9a9" face="Lucida Console">]</font><font color="#ff4500" face="Lucida Console">$UncPath</font><font color="#a9a9a9" face="Lucida Console">,</font><font color="#000000" face="Lucida Console"> </font>    <p align="left" />   <font color="#006400" face="Lucida Console">#SharePoint URL including folder </font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#006400" face="Lucida Console">#https://baseurl/serverrelativeurl</font><font color="#000000" face="Lucida Console"> </font>    <p align="left" />   <font color="#a9a9a9" face="Lucida Console">[</font><font color="#00bfff" face="Lucida Console">parameter</font><font color="#000000" face="Lucida Console">(Mandatory</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#ff4500" face="Lucida Console">$true</font><font color="#000000" face="Lucida Console">)</font><font color="#a9a9a9" face="Lucida Console">][</font><font color="#008080" face="Lucida Console">string</font><font color="#a9a9a9" face="Lucida Console">]</font><font color="#ff4500" face="Lucida Console">$SPURL</font><font color="#000000" face="Lucida Console"> </font>    <p align="left">) </p>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$UploadPath</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SPURL</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">+</font><font color="#000000" face="Lucida Console"> $(</font><font color="#0000ff" face="Lucida Console">split-path</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Leaf</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$UncPath</font><font color="#000000" face="Lucida Console">) </font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$WebClient</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">New-Object</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">System.Net.WebClient</font><font color="#000000" face="Lucida Console"> </font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$WebClient</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">Credentials </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">[</font><font color="#008080" face="Lucida Console">System.Net.CredentialCache</font><font color="#a9a9a9" face="Lucida Console">]::</font><font color="#000000" face="Lucida Console">DefaultCredentials </font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$WebClient</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">UploadFile(</font><font color="#ff4500" face="Lucida Console">$UploadPath</font><font color="#a9a9a9" face="Lucida Console">,</font><font color="#8b0000" face="Lucida Console">"Put"</font><font color="#a9a9a9" face="Lucida Console">,</font><font color="#ff4500" face="Lucida Console">$UncPath</font><font color="#000000" face="Lucida Console">) </font>    <p align="left">} </p> </font>  <p>So that’s the basic of uploading a file to SharePoint using the .net webclient…to many this is old hat…To me something new to start out the new year. </p>
			<p class="postfoot">
				posted @
				1/2/2014 3:44 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_11" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_12" href="http://www.DrowningInTechnicalDebt.com/ChrisBarba/archive/2013/11/15/using-c-to-interface-with-sqlite.aspx">Using C# to interface with SQLite</a></h3>
			<p>If you need to interface with SQLite there are a couple of steps.</p>  <p>1) You need to get the .net provider for SQLite from <a href="http://sourceforge.net/projects/sqlite-dotnet2/" target="_blank">sourceforge.net</a>     <br />2) Then add a reference to System.Data.SQLite to your project.     <br />3) You need to make sure the reference is marked to be copied locally.</p>  <p>Here is a C# class to for doing select, insert, update, and delete.    <br />    <br /></p>  <pre class="code"><span style="background: white; color: black"> </span><span style="background: white; color: blue">public class </span><span style="background: white; color: #2b91af">SqlLiteHelper
    </span><span style="background: white; color: black">{
        </span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">dbConnection;

        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Single Param Constructor for specifying the DB file.
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;param name="inputFile"&gt;</span><span style="background: white; color: green">The File containing the DB</span><span style="background: white; color: gray">&lt;/param&gt;
        </span><span style="background: white; color: blue">public </span><span style="background: white; color: black">SqlLiteHelper(</span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">inputFile)
        {
            dbConnection = </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">.Format(</span><span style="background: white; color: #a31515">"Data Source={0}"</span><span style="background: white; color: black">, inputFile);
        }

        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Single Param Constructor for specifying advanced connection options.
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;param name="connectionOpts"&gt;</span><span style="background: white; color: green">A dictionary containing all desired options and their values</span><span style="background: white; color: gray">&lt;/param&gt;
        </span><span style="background: white; color: blue">public </span><span style="background: white; color: black">SqlLiteHelper(</span><span style="background: white; color: #2b91af">Dictionary</span><span style="background: white; color: black">&lt;</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">, </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">&gt; connectionOpts)
        {
            </span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">str = </span><span style="background: white; color: #a31515">""</span><span style="background: white; color: black">;
            </span><span style="background: white; color: blue">foreach </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">KeyValuePair</span><span style="background: white; color: black">&lt;</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">, </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">&gt; row </span><span style="background: white; color: blue">in </span><span style="background: white; color: black">connectionOpts)
            {
                str += </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">.Format(</span><span style="background: white; color: #a31515">"{0}={1}; "</span><span style="background: white; color: black">, row.Key, row.Value);
            }
            str = str.Trim().Substring(0, str.Length - 1);
            dbConnection = str;
        }


        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Allows the programmer to run a query against the Database.
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;param name="sql"&gt;</span><span style="background: white; color: green">The SQL to run</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;returns&gt;</span><span style="background: white; color: green">A DataTable containing the result set.</span><span style="background: white; color: gray">&lt;/returns&gt;
        </span><span style="background: white; color: blue">public </span><span style="background: white; color: #2b91af">DataTable </span><span style="background: white; color: black">GetDataTable(</span><span style="background: white; color: blue">string </span><span style="background: white; color: black">sql)
        {
            </span><span style="background: white; color: #2b91af">DataTable </span><span style="background: white; color: black">dt = </span><span style="background: white; color: blue">new </span><span style="background: white; color: #2b91af">DataTable</span><span style="background: white; color: black">();
            </span><span style="background: white; color: blue">try
            </span><span style="background: white; color: black">{
                </span><span style="background: white; color: blue">using </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">SQLiteConnection </span><span style="background: white; color: black">cnn = </span><span style="background: white; color: blue">new </span><span style="background: white; color: #2b91af">SQLiteConnection</span><span style="background: white; color: black">(dbConnection))
                {
                    cnn.Open();
                    </span><span style="background: white; color: blue">using </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">SQLiteCommand </span><span style="background: white; color: black">mycommand = </span><span style="background: white; color: blue">new </span><span style="background: white; color: #2b91af">SQLiteCommand</span><span style="background: white; color: black">(cnn))
                    {
                        mycommand.CommandText = sql;
                        </span><span style="background: white; color: blue">using </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">SQLiteDataReader </span><span style="background: white; color: black">reader = mycommand.ExecuteReader())
                        {
                            dt.Load(reader);
                            reader.Close();
                        }
                    }
                    cnn.Close();
                }
            }
            </span><span style="background: white; color: blue">catch </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">Exception </span><span style="background: white; color: black">e)
            {
                </span><span style="background: white; color: blue">throw new </span><span style="background: white; color: #2b91af">Exception</span><span style="background: white; color: black">(e.Message);
            }
            </span><span style="background: white; color: blue">return </span><span style="background: white; color: black">dt;
        }

        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Allows the programmer to interact with the database for purposes other than a query.
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;param name="sql"&gt;</span><span style="background: white; color: green">The SQL to be run.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;returns&gt;</span><span style="background: white; color: green">An Integer containing the number of rows updated.</span><span style="background: white; color: gray">&lt;/returns&gt;
        </span><span style="background: white; color: blue">public int </span><span style="background: white; color: black">ExecuteNonQuery(</span><span style="background: white; color: blue">string </span><span style="background: white; color: black">sql)
        {
            </span><span style="background: white; color: blue">int </span><span style="background: white; color: black">rowsUpdated = 0;

            </span><span style="background: white; color: blue">using </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">SQLiteConnection </span><span style="background: white; color: black">cnn = </span><span style="background: white; color: blue">new </span><span style="background: white; color: #2b91af">SQLiteConnection</span><span style="background: white; color: black">(dbConnection))
            {
                cnn.Open();
                </span><span style="background: white; color: blue">using </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">SQLiteCommand </span><span style="background: white; color: black">mycommand = </span><span style="background: white; color: blue">new </span><span style="background: white; color: #2b91af">SQLiteCommand</span><span style="background: white; color: black">(cnn))
                {
                    mycommand.CommandText = sql;
                    rowsUpdated = mycommand.ExecuteNonQuery();
                }
                cnn.Close();
            }
            </span><span style="background: white; color: blue">return </span><span style="background: white; color: black">rowsUpdated;
        }

        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Allows the programmer to retrieve single items from the DB.
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;param name="sql"&gt;</span><span style="background: white; color: green">The query to run.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;returns&gt;</span><span style="background: white; color: green">A string.</span><span style="background: white; color: gray">&lt;/returns&gt;
        </span><span style="background: white; color: blue">public string </span><span style="background: white; color: black">ExecuteScalar(</span><span style="background: white; color: blue">string </span><span style="background: white; color: black">sql)
        {
            </span><span style="background: white; color: blue">using </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">SQLiteConnection </span><span style="background: white; color: black">cnn = </span><span style="background: white; color: blue">new </span><span style="background: white; color: #2b91af">SQLiteConnection</span><span style="background: white; color: black">(dbConnection))
            {
                cnn.Open();
                </span><span style="background: white; color: blue">using </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">SQLiteCommand </span><span style="background: white; color: black">mycommand = </span><span style="background: white; color: blue">new </span><span style="background: white; color: #2b91af">SQLiteCommand</span><span style="background: white; color: black">(cnn))
                {
                    mycommand.CommandText = sql;
                    </span><span style="background: white; color: blue">object </span><span style="background: white; color: black">value = mycommand.ExecuteScalar();
                    cnn.Close();
                    </span><span style="background: white; color: blue">if </span><span style="background: white; color: black">(value != </span><span style="background: white; color: blue">null</span><span style="background: white; color: black">)
                    {
                        </span><span style="background: white; color: blue">return </span><span style="background: white; color: black">value.ToString();
                    }
                }
            }
            </span><span style="background: white; color: blue">return </span><span style="background: white; color: #a31515">""</span><span style="background: white; color: black">;
        }

        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Allows the programmer to easily update rows in the DB.
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;param name="tableName"&gt;</span><span style="background: white; color: green">The table to update.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;param name="data"&gt;</span><span style="background: white; color: green">A dictionary containing Column names and their new values.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;param name="where"&gt;</span><span style="background: white; color: green">The where clause for the update statement.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;returns&gt;</span><span style="background: white; color: green">A boolean true or false to signify success or failure.</span><span style="background: white; color: gray">&lt;/returns&gt;
        </span><span style="background: white; color: blue">public bool </span><span style="background: white; color: black">Update(</span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">tableName, </span><span style="background: white; color: #2b91af">Dictionary</span><span style="background: white; color: black">&lt;</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">, </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">&gt; data, </span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">where)
        {
            </span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">vals = </span><span style="background: white; color: #a31515">""</span><span style="background: white; color: black">;
            </span><span style="background: white; color: #2b91af">Boolean </span><span style="background: white; color: black">returnCode = </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">;
            </span><span style="background: white; color: blue">if </span><span style="background: white; color: black">(data.Count &gt;= 1)
            {
                </span><span style="background: white; color: blue">foreach </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">KeyValuePair</span><span style="background: white; color: black">&lt;</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">, </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">&gt; val </span><span style="background: white; color: blue">in </span><span style="background: white; color: black">data)
                {
                    vals += </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">.Format(</span><span style="background: white; color: #a31515">" {0} = '{1}',"</span><span style="background: white; color: black">, val.Key.ToString(), val.Value.ToString());
                }
                vals = vals.Substring(0, vals.Length - 1);
            }
            </span><span style="background: white; color: blue">try
            </span><span style="background: white; color: black">{
                </span><span style="background: white; color: blue">this</span><span style="background: white; color: black">.ExecuteNonQuery(</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">.Format(</span><span style="background: white; color: #a31515">"update {0} set {1} where {2};"</span><span style="background: white; color: black">, tableName, vals, where));
            }
            </span><span style="background: white; color: blue">catch
            </span><span style="background: white; color: black">{
                returnCode = </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">;
            }
            </span><span style="background: white; color: blue">return </span><span style="background: white; color: black">returnCode;
        }

        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Allows the programmer to easily delete rows from the DB.
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;param name="tableName"&gt;</span><span style="background: white; color: green">The table from which to delete.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;param name="where"&gt;</span><span style="background: white; color: green">The where clause for the delete.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;returns&gt;</span><span style="background: white; color: green">A boolean true or false to signify success or failure.</span><span style="background: white; color: gray">&lt;/returns&gt;
        </span><span style="background: white; color: blue">public bool </span><span style="background: white; color: black">Delete(</span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">tableName, </span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">where)
        {
            </span><span style="background: white; color: #2b91af">Boolean </span><span style="background: white; color: black">returnCode = </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">;
            </span><span style="background: white; color: blue">try
            </span><span style="background: white; color: black">{
                </span><span style="background: white; color: blue">this</span><span style="background: white; color: black">.ExecuteNonQuery(</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">.Format(</span><span style="background: white; color: #a31515">"delete from {0} where {1};"</span><span style="background: white; color: black">, tableName, where));
            }
            </span><span style="background: white; color: blue">catch </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">Exception </span><span style="background: white; color: black">ex)
            {
                returnCode = </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">;
            }
            </span><span style="background: white; color: blue">return </span><span style="background: white; color: black">returnCode;
        }

        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Allows the programmer to easily insert into the DB
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;param name="tableName"&gt;</span><span style="background: white; color: green">The table into which we insert the data.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;param name="data"&gt;</span><span style="background: white; color: green">A dictionary containing the column names and data for the insert.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;returns&gt;</span><span style="background: white; color: green">A boolean true or false to signify success or failure.</span><span style="background: white; color: gray">&lt;/returns&gt;
        </span><span style="background: white; color: blue">public bool </span><span style="background: white; color: black">Insert(</span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">tableName, </span><span style="background: white; color: #2b91af">Dictionary</span><span style="background: white; color: black">&lt;</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">, </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">&gt; data)
        {
            </span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">columns = </span><span style="background: white; color: #a31515">""</span><span style="background: white; color: black">;
            </span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">values = </span><span style="background: white; color: #a31515">""</span><span style="background: white; color: black">;
            </span><span style="background: white; color: #2b91af">Boolean </span><span style="background: white; color: black">returnCode = </span><span style="background: white; color: blue">true</span><span style="background: white; color: black">;
            </span><span style="background: white; color: blue">foreach </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">KeyValuePair</span><span style="background: white; color: black">&lt;</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">, </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">&gt; val </span><span style="background: white; color: blue">in </span><span style="background: white; color: black">data)
            {
                columns += </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">.Format(</span><span style="background: white; color: #a31515">" {0},"</span><span style="background: white; color: black">, val.Key.ToString());
                values += </span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">.Format(</span><span style="background: white; color: #a31515">" '{0}',"</span><span style="background: white; color: black">, val.Value);
            }
            columns = columns.Substring(0, columns.Length - 1);
            values = values.Substring(0, values.Length - 1);
            </span><span style="background: white; color: blue">try
            </span><span style="background: white; color: black">{
                </span><span style="background: white; color: blue">this</span><span style="background: white; color: black">.ExecuteNonQuery(</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">.Format(</span><span style="background: white; color: #a31515">"insert into {0}({1}) values({2});"</span><span style="background: white; color: black">, tableName, columns, values));
            }
            </span><span style="background: white; color: blue">catch </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">Exception </span><span style="background: white; color: black">ex)
            {
                returnCode = </span><span style="background: white; color: blue">false</span><span style="background: white; color: black">;
            }
            </span><span style="background: white; color: blue">return </span><span style="background: white; color: black">returnCode;
        }

        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Allows the programmer to easily delete all data from the DB.
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;returns&gt;</span><span style="background: white; color: green">A boolean true or false to signify success or failure.</span><span style="background: white; color: gray">&lt;/returns&gt;
        </span><span style="background: white; color: blue">public bool </span><span style="background: white; color: black">ClearDB()
        {
            </span><span style="background: white; color: #2b91af">DataTable </span><span style="background: white; color: black">tables;
            </span><span style="background: white; color: blue">try
            </span><span style="background: white; color: black">{
                tables = </span><span style="background: white; color: blue">this</span><span style="background: white; color: black">.GetDataTable(</span><span style="background: white; color: #a31515">"select NAME from SQLITE_MASTER where type='table' order by NAME;"</span><span style="background: white; color: black">);
                </span><span style="background: white; color: blue">foreach </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">DataRow </span><span style="background: white; color: black">table </span><span style="background: white; color: blue">in </span><span style="background: white; color: black">tables.Rows)
                {
                    </span><span style="background: white; color: blue">this</span><span style="background: white; color: black">.ClearTable(table[</span><span style="background: white; color: #a31515">"NAME"</span><span style="background: white; color: black">].ToString());
                }
                </span><span style="background: white; color: blue">return true</span><span style="background: white; color: black">;
            }
            </span><span style="background: white; color: blue">catch
            </span><span style="background: white; color: black">{
                </span><span style="background: white; color: blue">return false</span><span style="background: white; color: black">;
            }
        }

        </span><span style="background: white; color: gray">/// &lt;summary&gt;
        ///     </span><span style="background: white; color: green">Allows the user to easily clear all data from a specific table.
        </span><span style="background: white; color: gray">/// &lt;/summary&gt;
        /// &lt;param name="table"&gt;</span><span style="background: white; color: green">The name of the table to clear.</span><span style="background: white; color: gray">&lt;/param&gt;
        /// &lt;returns&gt;</span><span style="background: white; color: green">A boolean true or false to signify success or failure.</span><span style="background: white; color: gray">&lt;/returns&gt;
        </span><span style="background: white; color: blue">public bool </span><span style="background: white; color: black">ClearTable(</span><span style="background: white; color: #2b91af">String </span><span style="background: white; color: black">table)
        {
            </span><span style="background: white; color: blue">try
            </span><span style="background: white; color: black">{

                </span><span style="background: white; color: blue">this</span><span style="background: white; color: black">.ExecuteNonQuery(</span><span style="background: white; color: #2b91af">String</span><span style="background: white; color: black">.Format(</span><span style="background: white; color: #a31515">"delete from {0};"</span><span style="background: white; color: black">, table));
                </span><span style="background: white; color: blue">return true</span><span style="background: white; color: black">;
            }
            </span><span style="background: white; color: blue">catch
            </span><span style="background: white; color: black">{
                </span><span style="background: white; color: blue">return false</span><span style="background: white; color: black">;
            }
        }
    }</span></pre>
			<p class="postfoot">
				posted @
				11/15/2013 10:44 AM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_12" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/ChrisBarba/">Chris Barba</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_13" href="http://www.DrowningInTechnicalDebt.com/GregTate/archive/2013/11/13/using-powershell-to-check-ad-schema.aspx">Using PowerShell to Check AD Schema</a></h3>
			<p>Here we are, a cold crisp 20 degree Wednesday in November. I thought to myself…this is not cool (no pun), but you know what is cool?  Yeah, I’m sure you guessed PowerShell’s ActiveDirectory module. </p>  <p>Just a quick blog note to show how PowerShell quickly settled a dispute during an upgrade of our AD schema to handle a Windows 2012 DC. Of course this wasn’t a big dispute, many other tools could have been used. The question was had the Schema already been changed to support a 2012 Server. Again, there are many tools that could provide the answer, but what made this so cool was being able to share the experience with others who didn’t know PowerShell could replace some of the old stand by AD tools. So this is more of an AH-HA moment that felt right to share (and the script)…All brought to us by PowerShell and the ActiveDirectory module.</p>  <p><font style="background-color: #ffff00" /><em><font size="1"><font style="style">(An academic honesty note here</font><font style="background-color: #ffff00" />…this script is not 100% my own work...More like 5% – 10% my work, I can’t remember where I snagged the meat of this script so the credit remains unknown.)</font></em></p> <font color="#000000" face="Lucida Console">   <p align="left" />   <font color="#006400" face="Lucida Console">#This script will query AD for the Schema Version of AD,Exchange and Lync. Can be ran as least privilaged user.</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left" />   <font color="#0000ff" face="Lucida Console">Import-Module</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">ActiveDirectory</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#006400" face="Lucida Console">#Array</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaVersions</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> @()</font>    <p align="left" />   <font color="#006400" face="Lucida Console">#AD Portion</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaHashAD</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> @{ </font>    <p align="left" />   <font color="#800080" face="Lucida Console">13</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Windows 2000 Server"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">30</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Windows Server 2003"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">31</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Windows Server 2003 R2"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">44</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Windows Server 2008"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">47</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Windows Server 2008 R2"</font><font color="#000000" face="Lucida Console">;</font>    <p align="left" />   <font color="#800080" face="Lucida Console">56</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Windows Server 2012"</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left">}</p>    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaPartition</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> (</font><font color="#0000ff" face="Lucida Console">Get-ADRootDSE</font><font color="#000000" face="Lucida Console">)</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">NamingContexts </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Where-Object</font><font color="#000000" face="Lucida Console"> {</font><font color="#ff4500" face="Lucida Console">$_</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">-like</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"*Schema*"</font><font color="#000000" face="Lucida Console">} </font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaVersionAD</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> (</font><font color="#0000ff" face="Lucida Console">Get-ADObject</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SchemaPartition</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Property</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">*</font><font color="#000000" face="Lucida Console">)</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">objectVersion </font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$AdSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">New-Object</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">System.Object</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$AdSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Type</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Schema</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SchemaVersionAD</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$AdSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Type</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Product</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"AD"</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$AdSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Type</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Version</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SchemaHashAD</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">Item(</font><font color="#ff4500" face="Lucida Console">$SchemaVersionAD</font><font color="#000000" face="Lucida Console">)</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaVersions</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">+=</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$AdSchema</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left" />   <font color="#006400" face="Lucida Console">#Exchange Portion</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaHashExchange</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> @{ </font>    <p align="left" />   <font color="#800080" face="Lucida Console">4397</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange Server 2000 RTM"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">4406</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange Server 2000 SP3"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">6870</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange Server 2003 RTM"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">6936</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange Server 2003 SP3"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">10628</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange Server 2007 RTM"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">10637</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange Server 2007 RTM"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">11116</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange 2007 SP1"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">14622</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange 2007 SP2 or Exchange 2010 RTM"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">14726</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange 2010 SP1"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">14732</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange 2010 SP2"</font><font color="#000000" face="Lucida Console">;</font>    <p align="left" />   <font color="#800080" face="Lucida Console">15137</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Exchange 2013"</font><font color="#000000" face="Lucida Console"> </font>    <p align="left">}</p>    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaPathExchange</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"CN=ms-Exch-Schema-Version-Pt,</font><font color="#ff4500" face="Lucida Console">$SchemaPartition</font><font color="#8b0000" face="Lucida Console">"</font><font color="#000000" face="Lucida Console"> </font>    <p align="left" />   <font color="#00008b" face="Lucida Console">If</font><font color="#000000" face="Lucida Console"> (</font><font color="#0000ff" face="Lucida Console">Test-Path</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"AD:</font><font color="#ff4500" face="Lucida Console">$SchemaPathExchange</font><font color="#8b0000" face="Lucida Console">"</font><font color="#000000" face="Lucida Console">) { </font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaVersionExchange</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> (</font><font color="#0000ff" face="Lucida Console">Get-ADObject</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SchemaPathExchange</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Property</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">rangeUpper</font><font color="#000000" face="Lucida Console">)</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">rangeUpper </font>    <p align="left">}</p>    <p align="left" />   <font color="#00008b" face="Lucida Console">Else</font><font color="#000000" face="Lucida Console"> { </font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$ExchangeErr</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#800080" face="Lucida Console">1</font><font color="#000000" face="Lucida Console" />    <p align="left">}</p>    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$ExchSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">New-Object</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">System.Object</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$ExchSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Type</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Schema</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SchemaVersionExchange</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$ExchSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Type</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Product</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"Exchange"</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$ExchSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Type</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Version</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SchemaHashExchange</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">Item(</font><font color="#ff4500" face="Lucida Console">$SchemaVersionExchange</font><font color="#000000" face="Lucida Console">)</font>    <p align="left" />    <p align="left" />   <font color="#00008b" face="Lucida Console">If</font><font color="#000000" face="Lucida Console"> (</font><font color="#ff4500" face="Lucida Console">$ExchSchema</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">Schema </font><font color="#a9a9a9" face="Lucida Console">-ne</font><font color="#000000" face="Lucida Console"> </font><font color="#800080" face="Lucida Console">0</font><font color="#000000" face="Lucida Console">) {</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaVersions</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">+=</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$ExchSchema</font><font color="#000000" face="Lucida Console" />    <p align="left">}</p>    <p align="left" />    <p align="left" />   <font color="#006400" face="Lucida Console">#Lync Portion</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaHashLync</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> @{ </font>    <p align="left" />   <font color="#800080" face="Lucida Console">1006</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"LCS 2005"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">1007</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"OCS 2007 R1"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">1008</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"OCS 2007 R2"</font><font color="#000000" face="Lucida Console">; </font>    <p align="left" />   <font color="#800080" face="Lucida Console">1100</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Lync Server 2010"</font><font color="#000000" face="Lucida Console">;</font>    <p align="left" />   <font color="#800080" face="Lucida Console">1150</font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#8b0000" face="Lucida Console">"Lync Server 2013"</font><font color="#000000" face="Lucida Console" />    <p align="left">}</p>    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaPathLync</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"CN=ms-RTC-SIP-SchemaVersion,</font><font color="#ff4500" face="Lucida Console">$SchemaPartition</font><font color="#8b0000" face="Lucida Console">"</font><font color="#000000" face="Lucida Console"> </font>    <p align="left" />   <font color="#00008b" face="Lucida Console">If</font><font color="#000000" face="Lucida Console"> (</font><font color="#0000ff" face="Lucida Console">Test-Path</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"AD:</font><font color="#ff4500" face="Lucida Console">$SchemaPathLync</font><font color="#8b0000" face="Lucida Console">"</font><font color="#000000" face="Lucida Console">) { </font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaVersionLync</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> (</font><font color="#0000ff" face="Lucida Console">Get-ADObject</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SchemaPathLync</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Property</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">rangeUpper</font><font color="#000000" face="Lucida Console">)</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">rangeUpper </font>    <p align="left">}</p>    <p align="left" />   <font color="#00008b" face="Lucida Console">Else</font><font color="#000000" face="Lucida Console"> { </font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$LyncErr</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#800080" face="Lucida Console">1</font><font color="#000000" face="Lucida Console"> </font>    <p align="left">}</p>    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$LyncSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">New-Object</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">System.Object</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$LyncSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Type</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Schema</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SchemaVersionLync</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$LyncSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Type</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Product</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"Lync"</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$LyncSchema</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Type</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Version</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$SchemaHashLync</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">Item(</font><font color="#ff4500" face="Lucida Console">$SchemaVersionLync</font><font color="#000000" face="Lucida Console">)</font>    <p align="left" />    <p align="left" />   <font color="#00008b" face="Lucida Console">If</font><font color="#000000" face="Lucida Console"> (</font><font color="#ff4500" face="Lucida Console">$LyncSchema</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">Schema </font><font color="#a9a9a9" face="Lucida Console">-ne</font><font color="#000000" face="Lucida Console"> </font><font color="#800080" face="Lucida Console">0</font><font color="#000000" face="Lucida Console">){</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaVersions</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">+=</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$LyncSchema</font><font color="#000000" face="Lucida Console" />    <p align="left">}</p>    <p align="left" />    <p align="left" />    <p align="left" />   <font color="#006400" face="Lucida Console">#OutPut Section</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left" />   <font color="#0000ff" face="Lucida Console">Write-Host</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"Known current schema version of products:"</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$SchemaVersions</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Format-Table</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">*</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-AutoSize</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left" />   <font color="#006400" face="Lucida Console">#I think this error handling is probably better off in the setting of the note property but this takes care of it for now</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#00008b" face="Lucida Console">If</font><font color="#000000" face="Lucida Console"> (</font><font color="#ff4500" face="Lucida Console">$LyncErr</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">-eq</font><font color="#000000" face="Lucida Console"> </font><font color="#800080" face="Lucida Console">1</font><font color="#000000" face="Lucida Console">){</font>    <p align="left" />   <font color="#0000ff" face="Lucida Console">Write-Host</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"Lync or OCS not present"</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-ForegroundColor</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Yellow</font><font color="#000000" face="Lucida Console" />    <p align="left">}</p>    <p align="left" />   <font color="#00008b" face="Lucida Console">If</font><font color="#000000" face="Lucida Console"> (</font><font color="#ff4500" face="Lucida Console">$ExchangeErr</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">-eq</font><font color="#000000" face="Lucida Console"> </font><font color="#800080" face="Lucida Console">1</font><font color="#000000" face="Lucida Console">){</font>    <p align="left" />   <font color="#0000ff" face="Lucida Console">Write-Host</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"Exchange not present"</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-ForegroundColor</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Yellow</font><font color="#000000" face="Lucida Console"> </font>    <p align="left">}</p>    <p align="left" />    <p align="left" />   <font color="#006400" face="Lucida Console">#---------------------------------------------------------------------------&gt;&lt;&gt;</font><font color="#000000" size="1" face="Lucida Console" />    <p align="left" /> </font>  <p>So there you have it, another way PowerShell rocks.</p>
			<p class="postfoot">
				posted @
				11/13/2013 10:22 AM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_13" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_14" href="http://www.DrowningInTechnicalDebt.com/GregTate/archive/2013/11/12/hiding-disabled-users-from-exchange-address-book.aspx">Hiding Disabled Users From Exchange Address Book</a></h3>
			<p>The other day while reviewing an Exchange 2010 Environment, I noticed a few active mailboxes belonging to disabled users. For obvious reasons this isn’t a good thing, if for nothing else it clutters up the Exchange Address Book. </p>  <p>Next thought in my mind…So what’s the best way to hide these disabled users? Having the PowerShell bias that I do in fact have, I had to spend 15 minutes reviewing the options. </p>  <ol>   <li>Use a manual process. This would include disabling the user in AD, followed up with the steps described <a href="http://technet.microsoft.com/en-us/magazine/ff381467.aspx">here</a>. </li>    <li>Use Exchange Address Book Policies(ABP). As indicated in <a href="http://blog.jasonsherry.net/2013/04/22/exchange-abp-hide/">this article</a>, APB’s have a dependency on Exchange 2010 SP2. That said it seems like a viable and interesting approach.</li>    <li>Use PowerShell. As I started from the outset, I’m biased right now…So a PowerShell only approach seems “more better”.</li> </ol>  <p>Here is the script I used in a resource / user environment. Keep in mind this is a down and dirty version, a proof of concept. I would limit the use of this example as an inspiration only. (good or bad)</p> <font color="#000000" face="Lucida Console">   <p align="left" />   <font color="#006400" face="Lucida Console">#This script will query for all LinkedMailboxes when ran on an Exchange Server</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#006400" face="Lucida Console">#It will return a user set who show their Linked Master Accounts as disabled</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#006400" face="Lucida Console">#Use the results with "Set-Mailbox -HiddenFromAddressListsEnabled $true" to change</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#006400" face="Lucida Console">#all of the disabled users to hidden from the address book. Example Below</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#0000ff" face="Lucida Console">add-pssnapin</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Microsoft.Exchange.Management.PowerShell.E2010</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-ErrorAction</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Continue</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#0000ff" face="Lucida Console">Import-Module</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">ActiveDirectory</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$linkmbx</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">get-mailbox</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-RecipientTypeDetails</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">LinkedMailbox</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$alcusers</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Get-Aduser</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Filter</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">*</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Server</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">&lt;</font><font color="#8a2be2" face="Lucida Console">your</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">domain</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">here&gt;</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Properties</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Enabled</font><font color="#000000" face="Lucida Console" />    <p align="left" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$userrpt</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> @()</font>    <p align="left" />    <p align="left" />   <font color="#00008b" face="Lucida Console">foreach</font><font color="#000000" face="Lucida Console"> (</font><font color="#ff4500" face="Lucida Console">$mbx</font><font color="#000000" face="Lucida Console"> </font><font color="#00008b" face="Lucida Console">in</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$linkmbx</font><font color="#000000" face="Lucida Console">){</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$name</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$mbx</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">linkedmasteraccount</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$user</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$name</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">split(</font><font color="#8b0000" face="Lucida Console">"\"</font><font color="#000000" face="Lucida Console">)</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$alcuser</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$alcusers</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">where</font><font color="#000000" face="Lucida Console"> {</font><font color="#ff4500" face="Lucida Console">$_</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">samaccountname </font><font color="#a9a9a9" face="Lucida Console">-eq</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$user</font><font color="#a9a9a9" face="Lucida Console">[</font><font color="#800080" face="Lucida Console">1</font><font color="#a9a9a9" face="Lucida Console">]</font><font color="#000000" face="Lucida Console">}</font>    <p align="left" />   <font color="#00008b" face="Lucida Console">if</font><font color="#000000" face="Lucida Console"> (</font><font color="#ff4500" face="Lucida Console">$alcuser</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">Enabled </font><font color="#a9a9a9" face="Lucida Console">-eq</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$false</font><font color="#000000" face="Lucida Console">){</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$rpt</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">=</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">New-Object</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">System.Object</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$rpt</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-MemberType</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Name</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$alcuser</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">Name</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$rpt</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-MemberType</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">Alias</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$mbx</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">alias</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$rpt</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">|</font><font color="#000000" face="Lucida Console"> </font><font color="#0000ff" face="Lucida Console">Add-Member</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-MemberType</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">NoteProperty</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Name</font><font color="#000000" face="Lucida Console"> </font><font color="#8a2be2" face="Lucida Console">HidFromAddBook</font><font color="#000000" face="Lucida Console"> </font><font color="#000080" face="Lucida Console">-Value</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$mbx</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">HiddenFromAddressListsEnabled</font>    <p align="left" />   <font color="#ff4500" face="Lucida Console">$userrpt</font><font color="#000000" face="Lucida Console"> </font><font color="#a9a9a9" face="Lucida Console">+=</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$rpt</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#ff4500" face="Lucida Console">$rpt</font><font color="#000000" face="Lucida Console" />    <p align="left">}</p>    <p align="left" />    <p align="left">} </p>    <p align="left" />    <p align="left" />    <p align="left" />   <font color="#0000ff" face="Lucida Console">Write-Host</font><font color="#000000" face="Lucida Console"> </font><font color="#8b0000" face="Lucida Console">"There are"</font><font color="#000000" face="Lucida Console"> </font><font color="#ff4500" face="Lucida Console">$userrpt</font><font color="#a9a9a9" face="Lucida Console">.</font><font color="#000000" face="Lucida Console">count </font><font color="#8b0000" face="Lucida Console">"linked mailboxes with disabled user accounts in user domain"</font><font color="#000000" face="Lucida Console" />    <p align="left" />   <font color="#006400" face="Lucida Console">&lt;#</font>    <p align="left">#Uncomment this section if you want to include changing the address book visability</p>    <p align="left">Foreach ($user in $usrrpt){ </p>    <p align="left">Write-Host "Changing address book visability for" $user.alias </p>    <p align="left">Set-Mailbox -Identity $user.alias -HiddenFromAddressListsEnabled $true</p>    <p align="left">}</p>    <p align="left">#&gt; </p> </font>  <p>Of course the next thought of automation comes to mind…but that’s a different post.  </p>
			<p class="postfoot">
				posted @
				11/12/2013 3:15 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_14" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_15" href="http://www.DrowningInTechnicalDebt.com/ChrisBarba/archive/2013/11/11/how-to-get-a-list-of-all-identity-columns-in.aspx">How to get a list of all identity columns in a database</a></h3>
			<p>Here is some code to get a list of identity columns in database.</p>  <pre class="code"><span style="color: blue">select  </span>so<span style="color: gray">.</span>name <span style="color: blue">as </span>TableName<span style="color: gray">,  + </span>o<span style="color: gray">.</span>list <span style="color: blue">as </span>IdentityColumnName 
<span style="color: blue">from    </span><span style="color: green">sysobjects </span>so
<span style="color: gray">cross apply
    (</span><span style="color: blue">SELECT 
        </span>column_name
         <span style="color: gray">+ 
           </span><span style="color: blue">case when </span><span style="color: gray">exists ( 
        </span><span style="color: blue">select </span>id <span style="color: blue">from </span><span style="color: green">syscolumns
        </span><span style="color: blue">where </span><span style="color: magenta">object_name</span><span style="color: gray">(</span>id<span style="color: gray">)=</span>so<span style="color: gray">.</span>name
        <span style="color: gray">and </span>name<span style="color: gray">=</span>column_name
        <span style="color: gray">and </span><span style="color: magenta">columnproperty</span><span style="color: gray">(</span>id<span style="color: gray">,</span>name<span style="color: gray">,</span><span style="color: red">'IsIdentity'</span><span style="color: gray">) = </span>1 
        <span style="color: gray">) </span><span style="color: blue">then
        </span><span style="color: red">''
        </span><span style="color: blue">end </span><span style="color: gray">+ </span><span style="color: red">' '
     </span><span style="color: blue">from </span><span style="color: green">information_schema</span><span style="color: gray">.</span><span style="color: green">columns </span><span style="color: blue">where </span>table_name <span style="color: gray">= </span>so<span style="color: gray">.</span>name
    <span style="color: gray">) </span>o <span style="color: gray">(</span>list<span style="color: gray">)
</span><span style="color: blue">where   </span>xtype <span style="color: gray">= </span><span style="color: red">'U'
</span><span style="color: gray">AND </span>o<span style="color: gray">.</span>list <span style="color: gray">is not null
AND </span>name    <span style="color: gray">NOT IN (</span><span style="color: red">'dtproperties'</span><span style="color: gray">)
</span></pre>
			<p class="postfoot">
				posted @
				11/11/2013 4:14 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_15" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/ChrisBarba/">Chris Barba</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_16" href="http://www.DrowningInTechnicalDebt.com/ChrisBarba/archive/2013/11/11/check-if-a-database-exists-on-a-server.aspx">Check if a database exists on a server</a></h3>
			<p>Here is some code to use to check if a database exists.    <br />Just replace the string <span style="color: red">'DATABASE NAME’.</span></p>  <pre class="code"><span style="color: blue">SELECT </span><span style="color: gray">* </span><span style="color: blue">FROM </span>[master]<span style="color: gray">.</span>[sys]<span style="color: gray">.</span>[databases] <span style="color: blue">WHERE </span>name<span style="color: gray">=</span><span style="color: red">'DATABASE NAME'</span></pre>
			<p class="postfoot">
				posted @
				11/11/2013 4:11 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_16" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/ChrisBarba/">Chris Barba</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_17" href="http://www.DrowningInTechnicalDebt.com/ChrisBarba/archive/2013/11/11/how-to-switch-entity-framework-database-connected-to.aspx">How to switch Entity Framework database connected to</a></h3>
			<p>If you have a connection to a database through entity framework and you need to switch it to another database (with the exact same structure) you just need to set the Connection.ConnectionString (as seen below).    <br />I had an application where we created a copy of the Master database when setting up a new client.  So using Entity Framework I switched from the master database to the client (depending on what the admin was doing).</p>  <pre class="code"><span style="background: white; color: blue">using </span><span style="background: white; color: black">(</span><span style="background: white; color: #2b91af">MasterEntities </span><span style="background: white; color: black">aEntities = </span><span style="background: white; color: blue">new </span><span style="background: white; color: #2b91af">MasterEntities</span><span style="background: white; color: black">())
{
<blockquote><p /></blockquote></span><span style="background: white; color: green">//Switch db connected to<p>      </p></span><span style="background: white; color: black"><span style="background: white; color: black">aEntities</span>.Database.Connection.ConnectionString = aEntities.Database.Connection.ConnectionString.Replace(</span><span style="background: white; color: #a31515">"OldDatabaseName"</span><span style="background: white; color: black">, <span style="background: white; color: #a31515">"NewDatabaseName"</span>);
                 
      <span style="background: white; color: green">//Some Query</span></span><p><span style="background: white; color: black"><span style="background: white; color: green" /></span><span style="background: white; color: black">}</span></p></pre>
			<p class="postfoot">
				posted @
				11/11/2013 4:01 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_17" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/ChrisBarba/">Chris Barba</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_18" href="http://www.DrowningInTechnicalDebt.com/GregTate/archive/2013/11/07/create-sharepoint-2013-result-source-with-powershell.aspx">Create SharePoint 2013 Result Source with PowerShell</a></h3>
			<p>In my continued automation efforts, I was looking to convert documentation provided from a consultant into something more…well…automated. In this first of four parts I’ll list out creating a Result Source with Powershell.</p>  <p>Subsequent posts (part 2 – 4) will give example of creating Result Types, Query Rules, and Search Navigation. The aim of this effort is to make use of PowerShell in rebuilding, essentially cloning without data, a search service application. This is useful when Microsoft support gives the classic solution of “rebuild” your service application. Doh!</p>  <p>It should be noted:</p>  <ul>   <li>This will create the Result Source at the Site Collection level. </li>    <li>This isn't 100% my original work, it’s inspired (taken mostly and modified) from <a href="http://blogs.technet.com/b/searchguys/archive/2013/06/14/creating-result-sources-using-powershell.aspx">the SearchGuys</a> blog post. </li>    <ul>     <li>The blog had Bing and Federation as an example, this example is a local SharePoint Result Set to Query BCS</li>   </ul> </ul>  <p> </p> <font color="#000000">   <p align="left" />   <font face="Lucida Console"><font color="#0000ff">Add-PSSnapin</font><font color="#000000"> </font><font color="#8a2be2">Microsoft.SharePoint.PowerShell</font></font><font color="#000000" />    <p align="left"><font face="Lucida Console" /></p>    <p align="left" />   <font color="#006400" face="Lucida Console">#Change These Variables To Fit</font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$SPWeb</font><font color="#000000"> </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#8b0000">"Your SP Site Collection Here"</font></font><font color="#000000"><font face="Lucida Console"> </font></font>    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$resultSourceName</font><font color="#000000"> </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#8b0000">"Your Content Source Friendly Name Here"</font></font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$resultSourceDescription</font><font color="#000000"> </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#8b0000">"Description for (BCS) Data Source"</font></font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$qT</font><font color="#000000"> </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#8b0000">'{searchTerms?} (ContentSource="&lt;Content Source Friendly Name Here&gt;" IsContainer=false)'</font></font><font color="#000000" />    <p align="left"><font face="Lucida Console" /></p>    <p align="left" />   <font color="#006400" face="Lucida Console">#Begin The Process</font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$ssa</font><font color="#000000"> </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#0000ff">Get-SPEnterpriseSearchServiceApplication</font></font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$fedman</font><font color="#000000"> </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#0000ff">New-Object</font><font color="#000000"> </font><font color="#8a2be2">Microsoft.Office.Server.Search.Administration.Query.FederationManager</font><font color="#000000">(</font><font color="#ff4500">$ssa</font></font><font color="#000000"><font face="Lucida Console">)</font></font>    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$searchOwner</font><font color="#000000"> </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#0000ff">Get-SPEnterpriseSearchOwner</font><font color="#000000"> </font><font color="#000080">-SPWeb</font><font color="#000000"> </font><font color="#ff4500">$SPWeb</font><font color="#000000"> </font><font color="#000080">-Level</font><font color="#000000"> </font><font color="#8a2be2">SPSite</font></font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$resultSource</font><font color="#000000"> </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#ff4500">$fedman</font><font color="#a9a9a9">.</font><font color="#000000">GetSourceByName(</font><font color="#ff4500">$resultSourceName</font><font color="#a9a9a9">,</font><font color="#000000"> </font><font color="#ff4500">$searchOwner</font></font><font color="#000000"><font face="Lucida Console">)</font></font>    <p align="left"><font face="Lucida Console" /></p>    <p align="left" />   <font color="#006400" face="Lucida Console">#Check To See if it exists</font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#00008b">if</font><font color="#000000">(</font><font color="#a9a9a9">!</font><font color="#ff4500">$resultSource</font></font><font color="#000000"><font face="Lucida Console">){</font></font>    <p align="left" />   <font face="Lucida Console"><font color="#0000ff">Write-Host</font><font color="#000000"> </font><font color="#8b0000">"Result source does not exist. Creating."</font></font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$resultSource</font><font color="#000000"> </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#ff4500">$fedman</font><font color="#a9a9a9">.</font><font color="#000000">CreateSource(</font><font color="#ff4500">$searchOwner</font></font><font color="#000000"><font face="Lucida Console">)</font></font>    <p align="left"><font face="Lucida Console">}</font></p>    <p align="left" />   <font face="Lucida Console"><font color="#00008b">else</font><font color="#000000"> { </font><font color="#0000ff">Write-Host</font><font color="#000000"> </font><font color="#8b0000">"Using existing result source."</font></font><font color="#000000"><font face="Lucida Console"> }</font></font>    <p align="left"><font face="Lucida Console" /></p>    <p align="left" />   <font color="#006400" face="Lucida Console">#Finish It Up </font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$resultSource</font><font color="#a9a9a9">.</font><font color="#000000">Name </font><font color="#a9a9a9">=</font><font color="#ff4500">$resultSourceName</font></font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$resultSource</font><font color="#a9a9a9">.</font><font color="#000000">ProviderId </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#ff4500">$fedman</font><font color="#a9a9a9">.</font><font color="#000000">ListProviders()</font><font color="#a9a9a9">[</font><font color="#8b0000">'Local SharePoint Provider'</font><font color="#a9a9a9">].</font></font><font color="#000000"><font face="Lucida Console">Id</font></font>    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$resultSource</font><font color="#a9a9a9">.</font><font color="#000000">Description </font><font color="#a9a9a9">=</font><font color="#000000"> </font><font color="#ff4500">$resultSourceDescription</font></font><font color="#000000" />    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$resultSource</font><font color="#a9a9a9">.</font><font color="#000000">CreateQueryTransform(</font><font color="#ff4500">$qT</font></font><font color="#000000"><font face="Lucida Console">)</font></font>    <p align="left" />   <font face="Lucida Console"><font color="#ff4500">$resultSource</font><font color="#a9a9a9">.</font></font><font color="#000000"><font face="Lucida Console">Commit()</font> </font></font>
			<p class="postfoot">
				posted @
				11/7/2013 7:55 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_18" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a>
			</p>
		</div>
	
		<div class="post">
			<h3>
				<a id="AggRecentPosts1_RecentPosts_Hyperlink2_19" href="http://www.DrowningInTechnicalDebt.com/GregTate/archive/2013/11/07/working-with-sharepoint-web-parts-using-powershell.aspx">Working with SharePoint Web Parts using PowerShell</a></h3>
			<p>First things first. I’m not a developer. I seem to do ok working my way through the SharePoint object model with PowerShell and writing automation scripts, but that doesn’t make me a developer.</p>
<p>With that out the way, I do find myself in an odd place with developers neglecting (for whatever reason) to automate population of web parts in the content pages their solution has deployed. An example might be Search Content web part needing to have the proper display template selected for displaying conversations. Ah…My Dev friends (don’t hate me) but why not go that extra mile?  If I can do it through script, surely you can employ your superior coding skills to include it in the solution (wsp)!</p>
<p>For those of you who may find yourself in my shoes, here is a script I created to help ease that cross farm (environment pain). Essentially the script is a function with a few parameters. This is the core, from here you can customize to your needs. It’s a great starting point for anyone who wants to automate changes to web parts via PowerShell.  You can copy and paste the script below into PowerShell ISE and save it to whatever name you like</p>
<p> </p>
<font color="#000000" face="Lucida Console" size="2">
<p align="left">   <font color="#0000ff" face="Lucida Console" size="1">Add-PSSnapin</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#8a2be2" face="Lucida Console" size="1">Microsoft.SharePoint.Powershell</font><font color="#000000" face="Lucida Console" size="1">    </font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#----Start of Function-------</font><font color="#000000" face="Lucida Console" size="1">    </font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#00008b" face="Lucida Console" size="1">Function</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#8a2be2" face="Lucida Console" size="1">Set-WebParts</font><font color="#000000" face="Lucida Console" size="1"> {</font>    </font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#a9a9a9" face="Lucida Console" size="1">[</font><font color="#00bfff" face="Lucida Console" size="1">CmdLetBinding</font><font color="#000000" face="Lucida Console" size="1">()</font><font color="#a9a9a9" face="Lucida Console" size="1">]</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></p>
</font>
<p align="left"><font color="#000000" face="Lucida Console" size="2"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#00008b" face="Lucida Console" size="1">Param</font><font color="#000000" face="Lucida Console" size="1">(</font>    </font></font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#a9a9a9" face="Lucida Console" size="1">[</font><font color="#00bfff" face="Lucida Console" size="1">Parameter</font><font color="#000000" face="Lucida Console" size="1">(Mandatory</font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#ff4500" face="Lucida Console" size="1">$True</font><font color="#a9a9a9" face="Lucida Console" size="1">,</font><font color="#000000" face="Lucida Console" size="1">Position</font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#800080" face="Lucida Console" size="1">0</font><font color="#000000" face="Lucida Console" size="1">)</font><font color="#a9a9a9" face="Lucida Console" size="1">]</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#a9a9a9" face="Lucida Console" size="1">[</font><font color="#008080" face="Lucida Console" size="1">String</font><font color="#a9a9a9" face="Lucida Console" size="1">]</font><font color="#ff4500" face="Lucida Console" size="1">$SiteUrl</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> $(</font><font color="#0000ff" face="Lucida Console" size="1">Read-Host</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#8b0000" face="Lucida Console" size="1">"Please Enter Site URL"</font><font color="#000000" face="Lucida Console" size="1">)</font><font color="#a9a9a9" face="Lucida Console" size="1">,</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#a9a9a9" face="Lucida Console" size="1">[</font><font color="#00bfff" face="Lucida Console" size="1">Parameter</font><font color="#000000" face="Lucida Console" size="1">(Mandatory</font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#ff4500" face="Lucida Console" size="1">$True</font><font color="#a9a9a9" face="Lucida Console" size="1">,</font><font color="#000000" face="Lucida Console" size="1">Position</font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#800080" face="Lucida Console" size="1">1</font><font color="#000000" face="Lucida Console" size="1">)</font><font color="#a9a9a9" face="Lucida Console" size="1">]</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#a9a9a9" face="Lucida Console" size="1">[</font><font color="#008080" face="Lucida Console" size="1">String</font><font color="#a9a9a9" face="Lucida Console" size="1">]</font><font color="#ff4500" face="Lucida Console" size="1">$PageUrl</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> $(</font><font color="#0000ff" face="Lucida Console" size="1">Read-Host</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#8b0000" face="Lucida Console" size="1">"Please Enter Page URL"</font><font color="#000000" face="Lucida Console" size="1">)</font>    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">)</font></font></p>
<font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">
<p align="left">    </p>
<p align="left">   <font color="#ff4500" face="Lucida Console" size="1">$web</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#0000ff" face="Lucida Console" size="1">Get-SPWeb</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#ff4500" face="Lucida Console" size="1">$SiteUrl</font><font color="#000000" face="Lucida Console" size="1">    </font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#+Get and Checkout Page</font><font color="#000000" face="Lucida Console" size="1">    </font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#+-Get Page</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$page</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#ff4500" face="Lucida Console" size="1">$web</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">GetFile(</font><font color="#ff4500" face="Lucida Console" size="1">$pageURL</font><font color="#000000" face="Lucida Console" size="1">)</font>    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#+-CheckOut The Page</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$page</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">CheckOut()</font>    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#+-Load Limited Web Part Manager</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$wpm</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#ff4500" face="Lucida Console" size="1">$web</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">GetLimitedWebPartManager(</font><font color="#ff4500" face="Lucida Console" size="1">$pageURL</font><font color="#a9a9a9" face="Lucida Console" size="1">,</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">[</font><font color="#008080" face="Lucida Console" size="1">System.Web.UI.WebControls.WebParts.PersonalizationScope</font><font color="#a9a9a9" face="Lucida Console" size="1">]::</font><font color="#000000" face="Lucida Console" size="1">Shared)</font>    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">    </font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#+Change Conversations WebPart - In my example I had some webparts titled "Conversations" and some Titled "Content Search"</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$wp</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#ff4500" face="Lucida Console" size="1">$wpm</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">WebParts </font><font color="#a9a9a9" face="Lucida Console" size="1">|</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#0000ff" face="Lucida Console" size="1">Where</font><font color="#000000" face="Lucida Console" size="1"> {</font><font color="#ff4500" face="Lucida Console" size="1">$_</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">Title </font><font color="#a9a9a9" face="Lucida Console" size="1">-eq</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#8b0000" face="Lucida Console" size="1">"Conversations"</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">-or</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#ff4500" face="Lucida Console" size="1">$_</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">Title </font><font color="#a9a9a9" face="Lucida Console" size="1">-eq</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#8b0000" face="Lucida Console" size="1">"Content Search"</font><font color="#000000" face="Lucida Console" size="1">}</font>    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#+-This is the base url for the template - Change this to whatever meets the need</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$base</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#8b0000" face="Lucida Console" size="1">"~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/"</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#+-This is the template name</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$template</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#8b0000" face="Lucida Console" size="1">"Item_Discussion.js"</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$NewItemTemplateId</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#ff4500" face="Lucida Console" size="1">$base</font><font color="#a9a9a9" face="Lucida Console" size="1">+</font><font color="#ff4500" face="Lucida Console" size="1">$template</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#+-Actually Setting The Part</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$wp</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">ItemTemplateId </font><font color="#a9a9a9" face="Lucida Console" size="1">=</font><font color="#000000" face="Lucida Console" size="1"> </font><font color="#ff4500" face="Lucida Console" size="1">$NewItemTemplateId</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$wpm</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">SaveChanges(</font><font color="#ff4500" face="Lucida Console" size="1">$wp</font><font color="#000000" face="Lucida Console" size="1">)</font>    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">    </font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">    </font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#006400" face="Lucida Console" size="1">#+CheckIn and Publish Page</font><font color="#000000" face="Lucida Console" size="1">    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$page</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">CheckIn(</font><font color="#8b0000" face="Lucida Console" size="1">"Scripted Change"</font><font color="#000000" face="Lucida Console" size="1">)</font>    </font></font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$page</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">Publish(</font><font color="#8b0000" face="Lucida Console" size="1">"Scripted Publish"</font><font color="#000000" face="Lucida Console" size="1">)</font>    </font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">   <font color="#ff4500" face="Lucida Console" size="1">$web</font><font color="#a9a9a9" face="Lucida Console" size="1">.</font><font color="#000000" face="Lucida Console" size="1">Dispose()</font>    </font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">}</font></font></p>
<font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1">
<p align="left">   <font color="#006400" face="Lucida Console" size="1">#----End Of Function----</font><font color="#000000" face="Lucida Console" size="1">    </font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1">   <font color="#0000ff" face="Lucida Console" size="1">SetWebParts.ps1</font><font color="#000000" face="Lucida Console" size="1"> </font></font></p>
<p align="left"><font color="#000000" face="Lucida Console" size="1"><font color="#000000" face="Lucida Console" size="1"> </font>  </font></p>
<p>As I said, I’m not a developer so while functional, there is probably a better way to accomplish what I’ve published here. </p>
</font></font></font></font>
			<p class="postfoot">
				posted @
				11/7/2013 5:31 PM
				by
				<a id="AggRecentPosts1_RecentPosts_Hyperlink3_19" class="clsSubtext" href="http://www.DrowningInTechnicalDebt.com/GregTate/">Greg Tate</a>
			</p>
		</div>
	
</div>

			</div>
			<div id="extra">
                
<div id="aggrecentimages">
<h2>Latest Images</h2>

		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_0" title="replication03.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_replication03.png"><img title="replication03.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_replication03.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_0" title="replication03.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_1" title="replication02.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_replication02.png"><img title="replication02.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_replication02.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_1" title="replication02.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_2" title="replication01.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_replication01.png"><img title="replication01.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_replication01.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_2" title="replication01.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_3" title="sqlaadgroup14.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup14.png"><img title="sqlaadgroup14.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup14.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_3" title="sqlaadgroup14.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_4" title="sqlaadgroup13.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup13.png"><img title="sqlaadgroup13.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup13.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_4" title="sqlaadgroup13.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_5" title="sqlaadgroup12.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup12.png"><img title="sqlaadgroup12.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup12.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_5" title="sqlaadgroup12.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_6" title="sqlaadgroup11.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup11.png"><img title="sqlaadgroup11.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup11.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_6" title="sqlaadgroup11.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_7" title="sqlaadgroup10.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup10.png"><img title="sqlaadgroup10.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup10.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_7" title="sqlaadgroup10.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_8" title="sqlaadgroup09.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup09.png"><img title="sqlaadgroup09.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup09.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_8" title="sqlaadgroup09.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_9" title="sqlaadgroup08.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup08.png"><img title="sqlaadgroup08.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup08.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_9" title="sqlaadgroup08.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_10" title="sqlaadgroup07.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup07.png"><img title="sqlaadgroup07.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup07.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_10" title="sqlaadgroup07.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_11" title="sqlaadgroup06.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup06.png"><img title="sqlaadgroup06.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup06.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_11" title="sqlaadgroup06.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_12" title="sqlaadgroup05.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup05.png"><img title="sqlaadgroup05.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup05.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_12" title="sqlaadgroup05.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_13" title="sqlaadgroup04.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup04.png"><img title="sqlaadgroup04.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup04.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_13" title="sqlaadgroup04.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_14" title="sqlaadgroup03.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup03.png"><img title="sqlaadgroup03.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup03.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_14" title="sqlaadgroup03.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_15" title="sqlaadgroup02.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup02.png"><img title="sqlaadgroup02.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup02.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_15" title="sqlaadgroup02.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_16" title="sqlaadgroup01.png" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_sqlaadgroup01.png"><img title="sqlaadgroup01.png" src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_sqlaadgroup01.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_16" title="sqlaadgroup01.png" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_17" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_Uverse%20Settings.png"><img src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_Uverse%20Settings.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_17" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_18" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_speedtest.png"><img src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_speedtest.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_18" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
		<div>
            <a id="AggRecentImages1_RecentImages_HyperLink2_19" rel="lightbox" href="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/r_ipconfig.png"><img src="http://www.DrowningInTechnicalDebt.com/images/www_DrowningInTechnicalDebt_com/ShawnWeisfeld/130/t_ipconfig.png" alt="" /></a>
	From <a id="AggRecentImages1_RecentImages_HyperLink1_19" href="http://www.DrowningInTechnicalDebt.com/ShawnWeisfeld/Gallery/130.aspx">shawns images</a>
		</div>
	
</div>

            </div>
		</form>
	</body>
</html>
