<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jared Heinrichs &#187; Powershell</title>
	<atom:link href="http://jaredheinrichs.com/category/operating-system/powershell/feed" rel="self" type="application/rss+xml" />
	<link>http://jaredheinrichs.com</link>
	<description>A &#34;How to&#34; Blog on Software and Technology</description>
	<lastBuildDate>Thu, 29 Jul 2010 04:20:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>How to schedule a Windows Powershell script</title>
		<link>http://jaredheinrichs.com/how-to-schedule-a-windows-powershell-script.html</link>
		<comments>http://jaredheinrichs.com/how-to-schedule-a-windows-powershell-script.html#comments</comments>
		<pubDate>Thu, 26 Mar 2009 19:12:06 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Windows 2003 Server]]></category>
		<category><![CDATA[Windows 2008]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/?p=371</guid>
		<description><![CDATA[Couple of things to know There are two main things that you have to do to schedual Powershell scripts. Allow Interactive Commands using set-executionpolicy command. Put Powershell script in a &#34;.ps1&#34; file. You can use any text editor to make this. The first thing you need to do is make sure that Powershell is set [...]]]></description>
			<content:encoded><![CDATA[<h3>Couple of things to know</h3>
<p>There are two main things that you have to do to schedual Powershell scripts.</p>
<ol>
<li>Allow Interactive Commands using set-executionpolicy command. </li>
<li>Put Powershell script in a &quot;.ps1&quot; file. You can use any text editor to make this. </li>
</ol>
<p>The first thing you need to do is make sure that Powershell is set to execute Powershell scripts, instead of only allowing interactive commands to be run in the Powershell environment.</p>
<p>Type the following at the Powershell command prompt:</p>
<blockquote><pre class="csharpcode">set-executionpolicy RemoteSigned</pre>
</blockquote>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>This will allow the system to run Powershell scripts that are created locally (Remote Powershell scripts that may be downloaded must be signed).</p>
<p>Once this is done, you can create your Powershell script using notepad. Just make sure you name the file with an extension of .ps1 . Now to run the script outside of its Powershell environment you type a command similar to the following:</p>
<blockquote>
<pre class="csharpcode">powershell -command <span class="str">&quot;&amp; 'MyScript.ps1' &quot;</span></pre>
</blockquote>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>Just put the above command into a .bat or .cmd file and schedule it like you would normally schedule a script to be run with Windows task scheduler.</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/how-to-schedule-a-windows-powershell-script.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
