<feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
    <title>Technically Speaking</title>
    <link rel="self" type="application/xml" href="http://geekswithblogs.net/TechnicallySpeaking/Atom.aspx" />
    <subtitle type="html"> .NET Bloggers Sharing Ideas</subtitle>
    <id>http://geekswithblogs.net/TechnicallySpeaking/Default.aspx</id>
    <author>
        <name>TechnicallySpeaking</name>
        <uri>http://geekswithblogs.net/TechnicallySpeaking/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 0.0.0.0">Subtext</generator>
    <updated>2009-01-02T10:25:32Z</updated>
    <entry>
        <title>Lenovo W500 BSOD on Vista 64 ATI Display Driver crash</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TechnicallySpeaking/archive/2009/01/02/lenovo-w500-bsod-on-vista-64-ati-display-driver-crash.aspx" />
        <id>http://geekswithblogs.net/TechnicallySpeaking/archive/2009/01/02/lenovo-w500-bsod-on-vista-64-ati-display-driver-crash.aspx</id>
        <published>2009-01-02T10:23:45-06:00:00</published>
        <updated>2009-01-02T10:25:32Z</updated>
        <summary type="html">After days of battling blue screen's of death (BSOD's) on Vista 64 being caused by the ATI display driver "amdkmdap", I landed on this post: http://forums.lenovo.com/lnv/board/message?board.id=T_Series_Thinkpads&amp;thread.id=20582.
</summary>
        <content type="html">&lt;p&gt;After days of battling blue screen's of death (BSOD's) on Vista 64 being caused by the ATI display driver "amdkmdap", I landed on this post: &lt;font face="Arial"&gt;&lt;a href="http://forums.lenovo.com/lnv/board/message?board.id=T_Series_Thinkpads&amp;amp;thread.id=20582"&gt;http://forums.lenovo.com/lnv/board/message?board.id=T_Series_Thinkpads&amp;amp;thread.id=20582&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here's my response to Zilla's post:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;zilla's post on 12/26/2008 worked for me. I have a Lenovo W500 (about a month old). Prior to applying this fix, Vista 64 BSOD'd 3 times. I am also in the process of encrypting a disk with BitLocker, which caused the fan to run hard most of the day. In addition, I am attached to both the standard VGA and DVI ports. BitLocker encryption continues and the fan is running constantly, but no BSOD.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I sure wish Lenovo or ATI could feel the pain they are causing in the community right now. I'm surprised that Microsoft and hardware vendors wouldn't be pushing ATI hard to find a solution. Problems like this only add to the negative perception the community has about Vista. Also, thanks has to go to the authors of mobility modder. Without it, we would still be waiting for a solution from computer manufacturers.&lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TechnicallySpeaking/aggbug/128301.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TechnicallySpeaking/comments/128301.aspx</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TechnicallySpeaking/comments/commentRss/128301.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TechnicallySpeaking/services/trackbacks/128301.aspx</trackback:ping>
    </entry>
    <entry>
        <title>More on the BDC</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TechnicallySpeaking/archive/2008/12/23/more-on-the-bdc.aspx" />
        <id>http://geekswithblogs.net/TechnicallySpeaking/archive/2008/12/23/more-on-the-bdc.aspx</id>
        <published>2008-12-23T17:17:05-06:00:00</published>
        <updated>2008-12-23T17:18:06Z</updated>
        <summary type="html">Helpful tips for integrating your BDC Application Definition into MOSS.</summary>
        <content type="html">&lt;p&gt;The BDC is a great first effort by Microsoft, but there are some items (including the documentation) that needs work. As I mentioned in another post on the BDC, Sahil Malik does a terrific job on getting you started running BDC Application Definitions. It's true that tools like the BDC Metaman and Microsoft's BDC Definition Editor can help, but there simply is no replacement for understanding, as Sahil describes it, "The XML goo" in an Application Definition. I highly recommend you get comfortable with it to make troubleshooting a bit easier.&lt;/p&gt;
&lt;p&gt;Here are some points and references that I've found particularly useful:&lt;/p&gt;
&lt;p&gt;1. If you want all items to appear in the Business Data List Web Part, modify the Shared Web Part and on the toolbar (not inside of the Tool Part), click Edit View. From there, you can select to show all items in the list. Microsoft explains this at the following location: &lt;font face="Arial"&gt;&lt;a href="http://office.microsoft.com/en-us/sharepointserver/HA102164281033.aspx"&gt;http://office.microsoft.com/en-us/sharepointserver/HA102164281033.aspx&lt;/a&gt; (it's buried).&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;2. After you have enabled search within your application definition, there is still work to do in the search interface. It's hard to find really succinct information on getting this working nicely. One of the best references I've found is on Ton Segeman's blog at: &lt;font face="Arial"&gt;&lt;a href="http://www.sharepointblogs.com/tonstegeman/archive/2007/01/09/creating-a-custom-search-page-for-searching-a-specific-search-scope-in-sharepoint-2007.aspx"&gt;http://www.sharepointblogs.com/tonstegeman/archive/2007/01/09/creating-a-custom-search-page-for-searching-a-specific-search-scope-in-sharepoint-2007.aspx&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;4. The ProfileRedirect page doesn't work when you've created Alternate Access Mappings in MOSS. You can read more about this bug at: &lt;font face="Arial"&gt;&lt;a href="http://social.technet.microsoft.com/forums/en-US/sharepointbdc/thread/bb01fcd4-afce-4335-a096-4abefbb39969/"&gt;http://social.technet.microsoft.com/forums/en-US/sharepointbdc/thread/bb01fcd4-afce-4335-a096-4abefbb39969/&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;5. If you want the links that appear in BDC search results to work properly, you have to make sure that the Shared Service Provider (SSP) hosting your search and BDC application is accessible to users. I've run into an instance where this is not the case and clicking the returned links fails. Server Mappings do not fix this issue. The solution is to make sure that the SSP is accessible to your users.&lt;/p&gt;
&lt;p&gt;Technically Speaking author, Ethan Wilansky&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TechnicallySpeaking/aggbug/128144.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TechnicallySpeaking/comments/128144.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TechnicallySpeaking/comments/commentRss/128144.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TechnicallySpeaking/services/trackbacks/128144.aspx</trackback:ping>
    </entry>
    <entry>
        <title>IPConfig Hangs</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TechnicallySpeaking/archive/2008/12/18/ipconfig-hangs.aspx" />
        <id>http://geekswithblogs.net/TechnicallySpeaking/archive/2008/12/18/ipconfig-hangs.aspx</id>
        <published>2008-12-18T17:42:41-06:00:00</published>
        <updated>2008-12-18T17:45:19Z</updated>
        <summary type="html">If you're dealing with IPConfig hangs, see if this doesn't resolve the issue.</summary>
        <content type="html">&lt;p&gt;While there are loads of reasons why this can happen, I identified an odd one that, hopefully, will help you if you an encounter an IPConfig hang. &lt;/p&gt;
&lt;p&gt;Scenario and solution: &lt;/p&gt;
&lt;p&gt;1. Start a Viftual PC 2007 Virtual Machine running MOSS 2007 w/SQL Server 2005 on Windows Server 2003 SP2.&lt;/p&gt;
&lt;p&gt;2. Open a command prompt and type &lt;strong&gt;IPConfig&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;3. IPConfig hangs.&lt;/p&gt;
&lt;p&gt;4. Break-out of the hung IPConfig command or open a new command window.&lt;/p&gt;
&lt;p&gt;5. type &lt;strong&gt;net stop mssqlserver&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;6. type &lt;strong&gt;net start mssqlserver&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This resolves the IPConfig hang error and is probably related to a timing issue on boot. There is probably a more elegant solution, but this will get your TCP/IP protocol stack functional again.&lt;/p&gt;
&lt;p&gt;Technically Speaking author, Ethan Wilansky&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TechnicallySpeaking/aggbug/128041.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TechnicallySpeaking/comments/128041.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TechnicallySpeaking/comments/commentRss/128041.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TechnicallySpeaking/services/trackbacks/128041.aspx</trackback:ping>
    </entry>
    <entry>
        <title>BDC Learnings</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TechnicallySpeaking/archive/2008/12/17/bdc-learnings.aspx" />
        <id>http://geekswithblogs.net/TechnicallySpeaking/archive/2008/12/17/bdc-learnings.aspx</id>
        <published>2008-12-17T15:30:37-06:00:00</published>
        <updated>2008-12-18T17:46:58Z</updated>
        <summary type="html">Important tips for getting started with the BDC</summary>
        <content type="html">&lt;p&gt;I've been meaning to post this for a while. Hopefully this helps you as much as it helped me.&lt;/p&gt;
&lt;p&gt;A great source for learning the BDC is &lt;em&gt;Sahil Mali&lt;/em&gt; blog at: &lt;br /&gt;
&lt;font face="Arial"&gt;&lt;a href="http://blah.winsmarts.com/2007-4-SharePoint_2007__BDC_-_The_Business_Data_Catalog.aspx"&gt;http://blah.winsmarts.com/2007-4-SharePoint_2007__BDC_-_The_Business_Data_Catalog.aspx&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Sahil does a phenomenal job of walking you through a database app definition example. &lt;/p&gt;
&lt;p&gt;Sahil's solution uses pass-through authentication. However, the SingleSignOn approach gives you a powerful alternative that can also take advantage of SQL Server connection pooling. Before you start on Sahil's fantastic example, you might want to configure your LobSystemInstance properties to use the SsoProvider in MOSS. For a succinct list of examples showing the authentication options, see: &lt;font face="Arial"&gt;&lt;a href="http://httpcode.com/blogs/PermaLink,guid,648659ca-a484-4df6-85bb-8a1ddeb03b8d.aspx"&gt;http://httpcode.com/blogs/PermaLink,guid,648659ca-a484-4df6-85bb-8a1ddeb03b8d.aspx&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;For a really great post on getting the SsoProvider in MOSS setup properly, see &lt;a href="http://www.sharepointblogs.com/michael/default.aspx"&gt;Michael Hofer - SharePoint Blog&lt;/a&gt;. If you are thinking of using Windows Credentials to make a connection to SQL Server, see the comment Michael posted on this blog on Aug 10, 2007.&lt;/p&gt;
&lt;p&gt;Technically Speaking author, Ethan Wilansky&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TechnicallySpeaking/aggbug/128012.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TechnicallySpeaking/comments/128012.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TechnicallySpeaking/comments/commentRss/128012.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TechnicallySpeaking/services/trackbacks/128012.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Visual Studio version issues</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TechnicallySpeaking/archive/2008/12/16/127983.aspx" />
        <id>http://geekswithblogs.net/TechnicallySpeaking/archive/2008/12/16/127983.aspx</id>
        <published>2008-12-16T14:11:33-06:00:00</published>
        <updated>2008-12-18T11:49:32Z</updated>
        <summary type="html">Getting past feature issues with mixed Visual Studio installations.</summary>
        <content type="html">&lt;p&gt;&lt;strong&gt;Issue 1: Remote Debug&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can't remotely debug an application from Visual Studio 2008 when the installed debugger on the remote (target) machine is from the Visual Studio 2005 install. You must install the Visual Studio 2008 remote debugger on the target computer to attach to the remote debugger from the Visual Studio 2008 IDE. I believe side-by-side installation of the VS 2005 and VS 2008 remote debugger is fine. However, I don't believe they can run concurrently.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Issue 2: MSTest&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;If you try to run the VS2005 version of MSTest against a test assembly compiled with VS2008, MSTest will report that there are no tests to run. To resolve this issue, install VS2008 components on the remote computer and then from a VS2008 command prompt, run MSTest.&lt;/p&gt;
&lt;p&gt;These issues drove me crazy for a while, so hopefully it will help you avoid an assault on your patience. &lt;/p&gt;
&lt;p&gt;Technical Speaking author, Ethan Wilansky&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TechnicallySpeaking/aggbug/127983.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TechnicallySpeaking/comments/127983.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TechnicallySpeaking/comments/commentRss/127983.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TechnicallySpeaking/services/trackbacks/127983.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Getting a Directory or File Listing From PowerShell</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TechnicallySpeaking/archive/2008/11/06/getting-a-directory-or-file-listing-from-powershell.aspx" />
        <id>http://geekswithblogs.net/TechnicallySpeaking/archive/2008/11/06/getting-a-directory-or-file-listing-from-powershell.aspx</id>
        <published>2008-11-06T16:48:22-06:00:00</published>
        <updated>2008-12-20T17:17:19Z</updated>
        <summary type="html">It seems so obvious that getting a directory listing excluding file using the Get-ChildItem commandlet should be simple, right? Well, it is simple, but not obvious from the built-in commandlet operations. </summary>
        <content type="html">&lt;p class="MsoNormal" style="MARGIN: 0in 0in 10pt"&gt;&lt;font face="Calibri" size="3"&gt;It seems so obvious that getting a directory listing excluding file using the Get-ChildItem commandlet should be simple, right? Well, it is simple, but not obvious from the built-in commandlet commands. Here’s one way you can accomplish this task:&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;# initialize the items variable with the &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;# contents of a directory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$items&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: cadetblue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;Get-ChildItem&lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: cadetblue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;-Path&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;"c:\temp"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;# enumerate the items array&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;foreach&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; (&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$item&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;in&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$items&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 1"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;# if the item is a directory, then process it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 1"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;if&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; (&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$item&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;.Attributes &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;-eq&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;"Directory"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 1"&gt;      &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 2"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: cadetblue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;Write-Host&lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$item&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;.Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 1"&gt;      &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 10pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 10pt"&gt;&lt;font face="Calibri" size="3"&gt;You can also return files and exclude directories with this simple change:&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;# initialize the items variable with the &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;# contents of a directory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$items&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: cadetblue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;Get-ChildItem&lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: cadetblue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;-Path&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;"c:\temp"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;# enumerate the items array&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;foreach&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; (&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$item&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;in&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$items&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 1"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;# if the item is NOT a directory, then process it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 1"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;if&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; (&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$item&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;.Attributes &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;-ne&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;"Directory"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 1"&gt;      &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 2"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: cadetblue; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;Write-Host&lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;$item&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;.Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;&lt;span style="mso-tab-count: 1"&gt;      &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 10pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;font face="Calibri" size="3"&gt; &lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 10pt"&gt;&lt;font face="Calibri" size="3"&gt;Technically Speaking author, Ethan Wilansky&lt;/font&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TechnicallySpeaking/aggbug/126825.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TechnicallySpeaking/comments/126825.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TechnicallySpeaking/comments/commentRss/126825.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TechnicallySpeaking/services/trackbacks/126825.aspx</trackback:ping>
    </entry>
    <entry>
        <title>.NET and PowerShell</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/TechnicallySpeaking/archive/2008/10/28/net-framework-and-powershell.aspx" />
        <id>http://geekswithblogs.net/TechnicallySpeaking/archive/2008/10/28/net-framework-and-powershell.aspx</id>
        <published>2008-10-28T18:13:29-05:00:00</published>
        <updated>2008-12-18T17:50:12Z</updated>
        <summary type="html">A simple explanation of accessing the .NET framework (including SharePoint class interaction) from PowerShell.</summary>
        <content type="html">&lt;p&gt;I think there's nothing more powerful for a .NET developer than the ability to call into the .NET framework from script code.  Here are a couple of tips for calling into the framework from PowerShell 1.0:&lt;/p&gt;
&lt;p class="MsoSubtitle"&gt;For non-static .NET classes, use the New-Object commandlet (example using the SecureString class)&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span class="MsoSubtleEmphasis"&gt;In c# &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;System.Security.&lt;span style="COLOR: #2b91af"&gt;SecureString&lt;/span&gt; password = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;SecureString&lt;/span&gt;();&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span class="MsoSubtleEmphasis"&gt;In PowerShell:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;[&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;System.Security.SecureString&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;]&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;$password&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: cadetblue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-bidi-font-weight: bold"&gt;New-Object&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: maroon; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;System.Security.SecureString&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;You don't have to explicitly cast the $password variable as a System.Security.SecureString type, but it helps to clearly state intent like this.&lt;/p&gt;
&lt;p class="MsoSubtitle"&gt;For calling methods of static .NET classes or structures, use the bracket []:: syntax (example using the GUID structure)&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span class="MsoSubtleEmphasis"&gt;In c#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Guid&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; guidVal = &lt;span style="COLOR: #2b91af"&gt;Guid&lt;/span&gt;.NewGuid();&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span class="MsoSubtleEmphasis"&gt;In PowerShell:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;[&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;System.Guid&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;]&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;$guidVal &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt; [&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;Guid&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;]::&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: saddlebrown; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;NewGuid&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoSubtitle"&gt;&lt;span class="MsoSubtleEmphasis"&gt;To load an assembly that is not part of the .NET framework, but has been moved to the GAC (example using the Microsoft.SharePoint assembly)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span class="MsoSubtleEmphasis"&gt;In c#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;In Visual Studio, add a reference to the assembly via the References folder and add a using statement:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; Microsoft.SharePoint;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span class="MsoSubtleEmphasis"&gt;In PowerShell:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;$sharePointCore&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: cadetblue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;New-Object&lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: maroon; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;System.Reflection.AssemblyName&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;(&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: maroon; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;"Microsoft.SharePoint, Version=12.0.0.0, Culture=Neutral, PublicKeyToken=71e9bce111e9429c"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"&gt;# then load this assembly since is not part of the OOB .NET Framework&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;[&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;Reflection.Assembly&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;]::&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: saddlebrown; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;Load&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;(&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: purple; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;$sharePointCore&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Note that there are a number of ways to achieve this result. However, the method &lt;span style="COLOR: red"&gt;LoadWithPartialName&lt;/span&gt; in the Reflection.Assembly class &lt;span style="COLOR: red"&gt;is&lt;/span&gt; &lt;span style="COLOR: red"&gt;now&lt;/span&gt; &lt;span style="COLOR: red"&gt;obsolete&lt;/span&gt;. You'll see a number of PowerShell examples using this method. For example:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;[&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;Reflection.Assembly&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;]::&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: saddlebrown; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;LoadWithPartialName&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;(&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: maroon; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;"Microsoft.SharePoint"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The Load method of the same class is a better choice since it's more explicit about the assembly you intend on loading and it's not obsolete.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;I'll keep editing this entry as other interesting interactions with the .NET framework come up.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;em&gt;TechnicallySpeaking author, Ethan Wilansky&lt;/em&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/TechnicallySpeaking/aggbug/126319.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/TechnicallySpeaking/comments/126319.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/TechnicallySpeaking/comments/commentRss/126319.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/TechnicallySpeaking/services/trackbacks/126319.aspx</trackback:ping>
    </entry>
</feed>