<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Including external powershell scripts</title>
	<atom:link href="http://unearthedmedia.com/2009/07/02/powershell_include_external_script/feed/" rel="self" type="application/rss+xml" />
	<link>http://unearthedmedia.com/2009/07/02/powershell_include_external_script/</link>
	<description>Business &#38; Technology</description>
	<lastBuildDate>Wed, 17 Feb 2010 14:09:29 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Adam bell</title>
		<link>http://unearthedmedia.com/2009/07/02/powershell_include_external_script/comment-page-1/#comment-54</link>
		<dc:creator>Adam bell</dc:creator>
		<pubDate>Fri, 03 Jul 2009 03:19:26 +0000</pubDate>
		<guid isPermaLink="false">http://unearthedmedia.com/?p=144#comment-54</guid>
		<description>Gday Kevin,

Dot sourcing can be a bit confusing. I generally perform an include like this:
#	HP AS password management	
	. lib\hp-pwd.ps1

#	MS Active Directory Permissions
	. lib\DSperms.ps1

with my generic functions stored in the &quot;lib&quot; sub-folder to the parent script.

If you prefer to use variables, Jeffrey has a pretty funky function that works really well: http://blogs.msdn.com/powershell/archive/2007/06/19/get-scriptdirectory.aspx

Just beware trying to use it from within PowerGUI as it currently doesn&#039;t work as expected.

Cheers,
Adam :)</description>
		<content:encoded><![CDATA[<p>Gday Kevin,</p>
<p>Dot sourcing can be a bit confusing. I generally perform an include like this:<br />
#	HP AS password management<br />
	. lib\hp-pwd.ps1</p>
<p>#	MS Active Directory Permissions<br />
	. lib\DSperms.ps1</p>
<p>with my generic functions stored in the &#8220;lib&#8221; sub-folder to the parent script.</p>
<p>If you prefer to use variables, Jeffrey has a pretty funky function that works really well: <a href="http://blogs.msdn.com/powershell/archive/2007/06/19/get-scriptdirectory.aspx" rel="nofollow">http://blogs.msdn.com/powershell/archive/2007/06/19/get-scriptdirectory.aspx</a></p>
<p>Just beware trying to use it from within PowerGUI as it currently doesn&#8217;t work as expected.</p>
<p>Cheers,<br />
Adam <img src='http://unearthedmedia.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
