<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to Run PowerShell Scripts from a Shared Directory  </title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/29/how-to-run-powershell-scripts-from-a-shared-directory.aspx</link><description>Guest bloggers Judith Herman and June Blender discuss how to run Windows PowerShell scripts from a shared directory.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How to Run PowerShell Scripts from a Shared Directory  </title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/29/how-to-run-powershell-scripts-from-a-shared-directory.aspx#3572245</link><pubDate>Mon, 13 May 2013 05:51:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3572245</guid><dc:creator>Roderick McBan</dc:creator><description>&lt;p&gt;I found a different workaround for this issue.&lt;/p&gt;
&lt;p&gt;On the server where I wanted to run the powershell script, I created a directory link pointing to the unc path containing my PS1 file. &lt;/p&gt;
&lt;p&gt;Running powershell -f [dir_link]\myScript.ps1 went through with no problems.&lt;/p&gt;
&lt;p&gt;It appears to work on several of my servers. &lt;/p&gt;
&lt;p&gt;RMcB&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3572245" width="1" height="1"&gt;</description></item><item><title>re: How to Run PowerShell Scripts from a Shared Directory  </title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/29/how-to-run-powershell-scripts-from-a-shared-directory.aspx#3533094</link><pubDate>Sat, 17 Nov 2012 10:44:01 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3533094</guid><dc:creator>Ed Wilson</dc:creator><description>&lt;p&gt;@K_Schulte One thing you may want to see is where your shared scripts are stored. For instance if they are on \\webserver1\shared but on your computer \\webserver1 is NOT listed in Trusted Sites in Internet Explorer, then you will still be prompted with warnings when you try to run the script -- EVEN if you have the Script Execution Policy set to Unrestricted. This is because PowerShell trusts Internet Explorer to set the security zones. NOW, if you ADD \\WebServer1 to the Trusted Sites in Internet Explorer, if your settings are set to Unrestricted, then you will not be prompted for a warning. It is possible that when you ended up in a different OU, then you have a different Group Policy. Often in a corporate environment Trusted Sites is set via Group Policy (but it is a registry setting). If you cannot make these changes, start powershell with the execution policy of BYPASS and you will not be prompted.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3533094" width="1" height="1"&gt;</description></item><item><title>re: How to Run PowerShell Scripts from a Shared Directory  </title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/29/how-to-run-powershell-scripts-from-a-shared-directory.aspx#3529556</link><pubDate>Tue, 30 Oct 2012 07:46:43 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3529556</guid><dc:creator>K_Schulte</dc:creator><description>&lt;p&gt;Hi Judith, Hi June&lt;/p&gt;
&lt;p&gt;thank you very much for this interesting blog article!&lt;/p&gt;
&lt;p&gt;But first of all, I&amp;#39;d like to tell you, That we all cross our fingers here ... hoping that &amp;quot;Sandy&amp;quot; will not do too much harm to the (east of the) United States!!!&lt;/p&gt;
&lt;p&gt;I thought that we have the problem which you are presenting here, too!&lt;/p&gt;
&lt;p&gt;Since I have received my new company workstation running WIN7 x64 Enterprise, I couldn&amp;#39;t run scripts from an intranet network share. My old PC running WIN7 x64 Pro, still doesn&amp;#39;t complain when I try to run my scripts.&lt;/p&gt;
&lt;p&gt;So it must have something to do with the workstation settings itself.&lt;/p&gt;
&lt;p&gt;I had been told, that the new PC has been put into another new AD OU and will reveive some different group policies.&lt;/p&gt;
&lt;p&gt;So I already asked people in the forum here, what I could do to prevent my PowerShell scripts from being blocked,&lt;/p&gt;
&lt;p&gt;because I always received the error message telling me, that my files are not digitally signed.&lt;/p&gt;
&lt;p&gt;The proposed final solution was: Sign your scripts! Which is not a bad idea of course, but nearly impossibe here.&lt;/p&gt;
&lt;p&gt;I did relax the execution policy to unrestricted which is not a good idea, but it still was accompanied with warnings, telling me that it may be dangerous to run my scripts.&lt;/p&gt;
&lt;p&gt;So I tried to set the registry key UNCasIntranet now, which is an option that I can still change on my own,&lt;/p&gt;
&lt;p&gt;But this is still no solution to the problem, because I can&amp;#39;t recognize any different behaviour by now. In fact the &amp;quot;local intranet options&amp;quot; are grayed out and always show &amp;quot; Include all network paths (UNCs)&amp;quot; to be checked regardless of any changes to the registry key. This seems to be preset by GPOs and if I got you right, this should be the correct setting anyway. &lt;/p&gt;
&lt;p&gt;It would be great, if you can help me out ... if you still have any ideas, what might solve the riddle here ...&lt;/p&gt;
&lt;p&gt;Klaus.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3529556" width="1" height="1"&gt;</description></item></channel></rss>