<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>Impersonation and Hosting PowerShell</title><link>http://blogs.msdn.com/powershell/archive/2007/09/10/impersonation-and-hosting-powershell.aspx</link><description>Some of you reported that Impersonation doesn’t work while hosting PowerShell in ASP.net applications. The problem occurs when PowerShell's pipeline is invoked in the following way from an ASP.NET application: WindowsIdentity winId = ( WindowsIdentity</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Question on Powershell</title><link>http://blogs.msdn.com/powershell/archive/2007/09/10/impersonation-and-hosting-powershell.aspx#4917783</link><pubDate>Sat, 15 Sep 2007 01:00:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4917783</guid><dc:creator>Sunil</dc:creator><description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;Firstly i am sorry to post an unrelated question to this post. However i dont know where to post my questions. Here is my question&lt;/p&gt;
&lt;p&gt;Say I have 2 cmdlet’s&lt;/p&gt;
&lt;p&gt;Get-location&lt;/p&gt;
&lt;p&gt;Get-service&lt;/p&gt;
&lt;p&gt;When I create a test.ps1 file out of these 2 command and then run it, it will always do a &lt;/p&gt;
&lt;p&gt;Get-service |fl &amp;nbsp;in the output&lt;/p&gt;
&lt;p&gt;Ie. A full listing of the second command. Is there a way we can avoid this?&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;</description></item><item><title>re: Impersonation and Hosting PowerShell</title><link>http://blogs.msdn.com/powershell/archive/2007/09/10/impersonation-and-hosting-powershell.aspx#8180332</link><pubDate>Thu, 13 Mar 2008 15:55:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8180332</guid><dc:creator>Ronald Top</dc:creator><description>&lt;p&gt;Helllo,&lt;/p&gt;
&lt;p&gt;I made the changes to the config file, but still impersonatation fails for PwerShell requests.&lt;/p&gt;
&lt;p&gt;Any ideas what I might do wrong ? I am using vb.net to do an impersonation with LogonUserA from the advapi.dll. Should I use another impersonation method ?&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Ronald&lt;/p&gt;</description></item><item><title>re: Impersonation and Hosting PowerShell</title><link>http://blogs.msdn.com/powershell/archive/2007/09/10/impersonation-and-hosting-powershell.aspx#8960632</link><pubDate>Sun, 21 Sep 2008 21:21:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8960632</guid><dc:creator>cglessner</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I've the same Problem SharePoint. SharePoint is configured to impersonate the user but unfortunately the powershell runs always under the AppPool user. &amp;lt;alwaysFlowImpersonationPolicy enabled=&amp;quot;true&amp;quot;/&amp;gt; doesn't help. Any idea?&lt;/p&gt;
&lt;p&gt;Bye,&lt;/p&gt;
&lt;p&gt;Christian&lt;/p&gt;</description></item><item><title>re: Impersonation and Hosting PowerShell</title><link>http://blogs.msdn.com/powershell/archive/2007/09/10/impersonation-and-hosting-powershell.aspx#8960636</link><pubDate>Sun, 21 Sep 2008 21:35:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8960636</guid><dc:creator>cglessner</dc:creator><description>&lt;p&gt;Sorry, my mistake. I have to change the settings on the machine level in the aspnet.config, not in the web.config.&lt;/p&gt;
&lt;p&gt;Hosting PowerShell is really a pleasure. I've developed a WF-PowerActivity for SharePoint, now I'm working on a PowerWebPart...&lt;/p&gt;
&lt;p&gt;Thanks for the really helpful post.&lt;/p&gt;
&lt;p&gt;Bye, Christian&lt;/p&gt;</description></item><item><title>Windows PowerShell Blog : Impersonation and Hosting PowerShell</title><link>http://blogs.msdn.com/powershell/archive/2007/09/10/impersonation-and-hosting-powershell.aspx#9360965</link><pubDate>Thu, 22 Jan 2009 04:10:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9360965</guid><dc:creator>It's my life... And I live it...</dc:creator><description>&lt;p&gt;If you want to put powershell into your applications or into ASP.NET then here is a sample of how you&lt;/p&gt;
</description></item><item><title>re: Impersonation and Hosting PowerShell</title><link>http://blogs.msdn.com/powershell/archive/2007/09/10/impersonation-and-hosting-powershell.aspx#9927157</link><pubDate>Mon, 23 Nov 2009 08:37:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9927157</guid><dc:creator>whistler</dc:creator><description>&lt;p&gt;Thanks Krishna!&lt;/p&gt;
&lt;p&gt;There is great blog entry about the same issue here: &amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://dotdotdotnet.spaces.live.com/blog/cns"&gt;http://dotdotdotnet.spaces.live.com/blog/cns&lt;/a&gt;!2FEAF6B32EDB048D!141.entry&amp;quot;&amp;gt;&lt;a rel="nofollow" target="_new" href="http://dotdotdotnet.spaces.live.com/blog/cns"&gt;http://dotdotdotnet.spaces.live.com/blog/cns&lt;/a&gt;!2FEAF6B32EDB048D!141.entry&amp;lt;/a&amp;gt;&lt;/p&gt;</description></item></channel></rss>