<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/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/" xmlns:cs="http://blogs.iis.net/"><channel><title>IIS 7.0  - PowerShell</title><link>http://forums.iis.net/1151.aspx</link><description>All about IIS 7.0 PowerShell integration. Use this forum to ask PowerShell questions, discuss issues, request features and yell at IIS team members.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Remove-WebHandler - suppress VERBOSE message</title><link>http://forums.iis.net/thread/1925503.aspx</link><pubDate>Fri, 20 Nov 2009 00:14:32 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1925503</guid><dc:creator>davidtreves</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1925503.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1925503</wfw:commentRss><description>&lt;p&gt;Hi all,&lt;/p&gt;&lt;p&gt;I&amp;#39;m using Remove-WebHandler cmdlet, which when executes writes a yellow message that starts like that:&lt;/p&gt;&lt;p&gt;&amp;quot;VERBOSE: Performing operation &amp;quot;Remove-WebConfigurationProperty&amp;quot; on Target...&amp;quot;.&lt;/p&gt;&lt;p&gt;Any idea how I can suppress that message? I don&amp;#39;t want it to appear when I run my scripts.&lt;/p&gt;&lt;p&gt;As far as I understand &amp;quot;-Verbose&amp;quot; parameter is used for enabling verbose messages and I&amp;#39;m not using it. I also found that there&amp;#39;s a parameter called &amp;quot;$VerbosePreference&amp;quot;, which controls whether I see verbose messages. I didn&amp;#39;t play with that parameter and I made sure it&amp;#39;s set to &amp;quot;SilentlyContinue&amp;quot;, so this isn&amp;#39;t the case either.&lt;/p&gt;&lt;p&gt;Any idea?&lt;/p&gt;&lt;p&gt;Thanks! &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Adding redirect settings to a website using PS</title><link>http://forums.iis.net/thread/1925334.aspx</link><pubDate>Thu, 19 Nov 2009 01:19:02 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1925334</guid><dc:creator>davidtreves</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1925334.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1925334</wfw:commentRss><description>
&lt;p&gt;Hi all,&lt;/p&gt;
I want to set in a website a permanent redirection to a specific URL. I tried the following:
&lt;p&gt;&lt;code&gt;New-ItemProperty -Filter &amp;quot;/system.webServer/httpRedirect&amp;quot; -PSPath &amp;quot;IIS:\Sites\$name&amp;quot; -value @{enabled=&amp;quot;true&amp;quot;;destination=$target;exactDestination=&amp;quot;true&amp;quot;;httpResponseStatus=&amp;quot;Permanent&amp;quot;};&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;And I get the following error:&lt;/p&gt;

&lt;p&gt;New-ItemProperty : Object reference not set to an instance of an object.&lt;br /&gt;At line:1 char:17&lt;br /&gt;+ New-ItemProperty&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt; &amp;quot;/system.webServer/httpRedirect&amp;quot; -PSPath &amp;quot;IIS:\Sites\Default Web Site&amp;quot; -value @{en&lt;br /&gt;abled=&amp;quot;true&amp;quot;;destination=domain.com;exactDestination=&amp;quot;true&amp;quot;;httpResponseStatus=&amp;quot;Permanent&amp;quot;};&lt;/p&gt;

&lt;p&gt;I tried also with Add-WebConfiguration and got pretty much the same result. Here is one of the ways I tried to execute it:&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Add-WebConfiguration -Filter &amp;quot;/system.webServer/httpRedirect&amp;quot; -PSPath &amp;quot;IIS:\Sites\nowhiring.com.au - Public&amp;quot; -value @{enabled=&amp;quot;true&amp;quot;;destination=$target;exactDestination=&amp;quot;true&amp;quot;;httpResponseStatus=&amp;quot;Permanent&amp;quot;};&lt;/code&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;I already managed to set other settings using these commands, such as adding HTTP handlers and enabling/disabling logging. Redirecting simply doesn&amp;#39;t want to work.. &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;I think it should be fairly straight forward and I don&amp;#39;t know why I keep getting it wrong.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Btw, if anyone knows of any
good resource (book, site) which deals with IIS Snap-in it would be
great if you could link me with it. The samples and tutorials in iis.net don&amp;#39;t cover everything..&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Thanks! &lt;br /&gt;&lt;/p&gt;
</description></item><item><title>App Pools and PowerShell</title><link>http://forums.iis.net/thread/1911969.aspx</link><pubDate>Wed, 29 Jul 2009 20:50:51 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1911969</guid><dc:creator>dhanson</dc:creator><slash:comments>3</slash:comments><comments>http://forums.iis.net/thread/1911969.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1911969</wfw:commentRss><description>&lt;p&gt;I need to know how to list all properties of a AppPool.&amp;nbsp; I have tried several different things but I need to be able to find a property name so I know how to set it.&lt;/p&gt;&lt;p&gt;For Example one of the methods I have tried&lt;/p&gt;&lt;p&gt;Select-Object IIS:\AppPools\MyAppPool | Get-Member -memberType property &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I believe I won&amp;#39;t have an issue setting the value once I know what the name of the value is I need to set. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If someone can teach me to fish I would appreciate that...&lt;br /&gt;&lt;/p&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;</description></item><item><title>FTP virtual directory, help!!!!!!!!!!!</title><link>http://forums.iis.net/thread/1923208.aspx</link><pubDate>Tue, 03 Nov 2009 11:13:25 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1923208</guid><dc:creator>Vloors</dc:creator><slash:comments>8</slash:comments><comments>http://forums.iis.net/thread/1923208.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1923208</wfw:commentRss><description>&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;span style="FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:10pt;"&gt;&lt;font color="#000000"&gt;I am trying to create an FTP&amp;nbsp;virtual directory, but some having some issues.&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:10pt;"&gt;&lt;font color="#000000"&gt;&amp;nbsp;so far I have:&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;span style="FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:10pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;span style="FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:10pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;span style="FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:10pt;"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:cadetblue;FONT-SIZE:10pt;"&gt;New-Item&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:black;FONT-SIZE:10pt;"&gt; IIS:\&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:maroon;FONT-SIZE:10pt;"&gt;Sites\SFTP&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:black;FONT-SIZE:10pt;"&gt;\&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:purple;FONT-SIZE:10pt;"&gt;$folder&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:black;FONT-SIZE:10pt;"&gt; -type &lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:maroon;FONT-SIZE:10pt;"&gt;VirtualDirectory&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:black;FONT-SIZE:10pt;"&gt; -physicalPath &lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:maroon;FONT-SIZE:10pt;"&gt;d:\temp\$folder&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;COLOR:green;FONT-SIZE:10pt;"&gt;&lt;/span&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#008000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;&lt;font color="#800000" size="2" face="Courier New"&gt;
&lt;p&gt;&lt;font color="#000000" size="3" face="Calibri"&gt;However, how do I set the other properties, like’ FTP Authorization Rules’?&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0cm 0cm 10pt;" class="MsoNormal"&gt;&lt;font color="#000000" size="3" face="Calibri"&gt;The $folder variable is defined earlier in the script.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0cm 0cm 10pt;" class="MsoNormal"&gt;&lt;font color="#000000" size="3" face="Calibri"&gt;I am using Windows 2008 R2 with &lt;/font&gt;&lt;font color="#0000ff" size="3" face="Calibri"&gt;FTP 7.5&lt;/font&gt;&lt;font color="#000000" size="3" face="Calibri"&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0cm 0cm 10pt;" class="MsoNormal"&gt;&lt;font color="#000000" size="3" face="Calibri"&gt;Any help would be appreciated.&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Windows Server 2008 r2 and Powershell snapin</title><link>http://forums.iis.net/thread/1920131.aspx</link><pubDate>Fri, 09 Oct 2009 10:12:53 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1920131</guid><dc:creator>steve schofield</dc:creator><slash:comments>6</slash:comments><comments>http://forums.iis.net/thread/1920131.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1920131</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m running a 64 bit version of windows server 2008 r2.&amp;nbsp;&amp;nbsp; I don&amp;#39;t see the powershell provider as a feature to install.&amp;nbsp; Am I missing something obvious?&amp;nbsp; &lt;/p&gt;</description></item><item><title>power shell : System.ServiceModel.OperationContextScope : cannot creat constructor</title><link>http://forums.iis.net/thread/1923191.aspx</link><pubDate>Tue, 03 Nov 2009 08:18:19 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1923191</guid><dc:creator>kirank11</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1923191.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1923191</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I am following the process of creating proxy from the following link&lt;br /&gt; &lt;br /&gt; &lt;a href="http://cglessner.blogspot.com/2008/12/call-wcf-services-with-powershell.html/"&gt;http://cglessner.blogspot.com/2008/...hell.html/&lt;/a&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;strong&gt;Power shell Code for Creating the $proxy:&lt;/strong&gt; &lt;br /&gt; &lt;br /&gt; $wsdl = Get-WsdlImporter -wsdlUrl &amp;quot;http://myservice/mex&amp;quot;&lt;br /&gt; &lt;br /&gt; $proxyTypes = Get-WcfProxy -wsdlImporter $wsdl&lt;br /&gt; &lt;br /&gt; $address = New-Object System.ServiceModel.EndpointAddress(&amp;quot;http://myservice&amp;quot;)&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; $binding = new-object System.ServiceModel.BasicHttpBinding&lt;br /&gt; #system.&lt;br /&gt; &lt;br /&gt; $proxy = New-Object $proxyTypes -ArgumentList $binding, $address&lt;br /&gt; &lt;br /&gt; $d = New-Object System.ServiceModel.OperationContextScope($proxy.InnerChannel)&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;strong&gt;Error:&lt;/strong&gt; &lt;br /&gt; &lt;br /&gt;
Cannot convert argument &amp;quot;0&amp;quot;, with value: &amp;quot;ISetService&amp;quot;, for &amp;quot;.ctor&amp;quot; to
type &amp;quot;System.ServiceModel.IContextChannel&amp;quot;: &amp;quot;Cannot convert
&amp;quot;ISetService&amp;quot; to &amp;quot;System.ServiceModel.IContextChannel&amp;quot;.&amp;quot;&lt;br /&gt; At :line:45 char:17&lt;br /&gt; + $pdc = new-object &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;nbsp; System.ServiceModel.OperationContextScope($proxyLRC.InnerChannel)&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; The C# code works fine but when I try to implement it using the power Shell then it fails.&lt;br /&gt; &lt;br /&gt; this may help u.&lt;br /&gt; &lt;br /&gt; Kiran K&lt;/p&gt;</description></item><item><title>Setting binding information with a dynamic IP address</title><link>http://forums.iis.net/thread/1922801.aspx</link><pubDate>Fri, 30 Oct 2009 14:37:14 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1922801</guid><dc:creator>cmdcom</dc:creator><slash:comments>1</slash:comments><comments>http://forums.iis.net/thread/1922801.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1922801</wfw:commentRss><description>&lt;p&gt;Hey now,&lt;/p&gt;&lt;p&gt;I&amp;#39;m new to this PowerShell/WebAdministration thing.&amp;nbsp; My script allows a user to enter an IP address for a new website.&amp;nbsp; This IP is used as part of the -bindings argument when the New-Item cmdlet is called.&amp;nbsp; -bindings expects a hash table as the argument type.&amp;nbsp; Thing is, I cannot figure out how to use a variable in the constructor of the hash table.&amp;nbsp; After Googling this issue extensively, I attempted a number of syntactical variations, none of which worked (for clarity, I&amp;#39;ve omitted the other parameters used by the cmdlet):&lt;/p&gt;&lt;p&gt;-bindings @{label=&amp;quot;protocol&amp;quot;;Expression=&amp;quot;http&amp;quot;;label=&amp;quot;bindingInformation&amp;quot;;Expression={($ip) + &amp;quot;:80&amp;quot;}} &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;and &lt;/p&gt;&lt;p&gt;-bindings @{&amp;quot;protocol&amp;quot; = &amp;quot;http&amp;quot;;&amp;quot;bindingInformation&amp;quot; = {($ip) + &amp;quot;:80&amp;quot;}} &lt;/p&gt;&lt;p&gt;and&amp;nbsp;&lt;/p&gt;&lt;p&gt;-bindings @{&amp;quot;protocol&amp;quot; = &amp;quot;http&amp;quot;;&amp;quot;bindingInformation&amp;quot; = ($ip) + &amp;quot;:80&amp;quot;}&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;All result in a runtime error of some sort.&amp;nbsp; In desperation,&amp;nbsp; I ended up with:&lt;/p&gt;&lt;p&gt;$bindings = @{&amp;quot;protocol&amp;quot; = &amp;quot;http&amp;quot;}&lt;br /&gt;$bindings.Add(&amp;quot;bindingInformation&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;$bindings[&amp;quot;bindingInformation&amp;quot;] = $ip + &amp;quot;:80&amp;quot;&lt;/p&gt;&lt;p&gt;then&lt;/p&gt;&lt;p&gt;-bindings $bindings &lt;br /&gt;&lt;/p&gt;&lt;p&gt;This ran sucessfully, but the binding information for the new site was empty.&amp;nbsp; What am I doing wrong here?&lt;/p&gt;&lt;p&gt;&amp;nbsp;TIA &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Removing WebConfiguration node?</title><link>http://forums.iis.net/thread/1922474.aspx</link><pubDate>Wed, 28 Oct 2009 13:57:37 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1922474</guid><dc:creator>relliky2d</dc:creator><slash:comments>1</slash:comments><comments>http://forums.iis.net/thread/1922474.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1922474</wfw:commentRss><description>&lt;p&gt;Creating and Editing WebConfiguration sections is easy. But how would I go about removing a particular node of a Config Section? Clear-WebConfiguration seems to just clear a whole section. Thanks&lt;/p&gt;</description></item><item><title>Cannot remotely connect</title><link>http://forums.iis.net/thread/1920996.aspx</link><pubDate>Fri, 16 Oct 2009 15:17:23 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1920996</guid><dc:creator>msufreeman</dc:creator><slash:comments>2</slash:comments><comments>http://forums.iis.net/thread/1920996.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1920996</wfw:commentRss><description>&lt;p&gt;Hello all, new PowerShell user here.&amp;nbsp; I know this site is mainly about IIS, but the description for this particular section says, &amp;quot;Use this &lt;strong&gt;forum&lt;/strong&gt; to ask &lt;strong&gt;PowerShell&lt;/strong&gt; questions, discuss issues, request features and yell at IIS team members.&amp;quot; So, here I go :)&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to remotely run WMI commands on other computers via PowerShell.&amp;nbsp; It&amp;#39;s not the commands I&amp;#39;m having problems with, it&amp;#39;s the actual connecting that I&amp;#39;m confused about.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m testing with my desktop and my laptop, both of which I&amp;#39;m a local admin on, so I figure that I should be able to remotely run WMI commands between them via PowerShell.&lt;/p&gt;
&lt;p&gt;First test, I run gwmi -namespace &amp;quot;root\cimv2&amp;quot; -list -computer computerName and get:&lt;/p&gt;
&lt;p&gt;Get-WmiObject : The RPC server is unavailable. (Exception fro&lt;br /&gt;At line:1 char:5&lt;br /&gt;+ gwmi&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt; -namespace &amp;quot;root\cimv2&amp;quot; -list -computer computerName&lt;/p&gt;
&lt;p&gt;I found an article that point out a few reasons that PowerShell would throws this error and the only one that applied was the Firewall.&amp;nbsp; So, I turned off Firewall and the command worked.&lt;/p&gt;
&lt;p&gt;Then I tried to run the above code, but modified to use another account that should have permission by adding &amp;quot;-credential domain\accountName&amp;quot; to the command and I get this error:&lt;/p&gt;
&lt;p&gt;Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))&lt;br /&gt;At line:1 char:5&lt;br /&gt;+ gwmi&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt; -namespace &amp;quot;root\cimv2&amp;quot; -list -computer computerNAme -credential domain\accountName&lt;/p&gt;
&lt;p&gt;Now, I understand that this is simply telling me that the account doesn&amp;#39;t have permission, however it really should.&lt;/p&gt;
&lt;p&gt;We have tons of other scripts that use the particular account I&amp;#39;m testing with.&amp;nbsp; The account is in fact set up for just that purpose.&amp;nbsp; Many of these scripts remotely access other machines in our domain and again use these credentials.&lt;/p&gt;
&lt;p&gt;So, after all of the rambling above, my question boils down to this.&amp;nbsp; Why would PowerShell tell me that this account doesn&amp;#39;t have permission? Are there some other kinds of permission issues that I&amp;#39;m not aware of for PowerShell?&amp;nbsp; Also, the other scripts work on remote systems with the Firewall on, so why is PowerShell not working even for me as a local admin unless the Firewall is off?&lt;/p&gt;
&lt;p&gt;I realize that this could also be a WMI issue, but the script I&amp;#39;m working on is a rewrite from a vbScript that makes WMI calls and they work on there.&lt;/p&gt;
&lt;p&gt;Sorry about all of the text, but I like to explain my problem as much as I can.&amp;nbsp; Thanks for any help.&lt;/p&gt;</description></item><item><title>Set Website App Pool</title><link>http://forums.iis.net/thread/1920786.aspx</link><pubDate>Wed, 14 Oct 2009 22:25:26 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1920786</guid><dc:creator>t-angrui</dc:creator><slash:comments>1</slash:comments><comments>http://forums.iis.net/thread/1920786.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1920786</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I want to be able to set my websites app pool through powwershell. Right now they&amp;#39;re all set to DefaultAppPool.&amp;nbsp; As the picture below shows I want to able to assign the FileCopyService app pool to the FileCopyService website.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any ideas on how to script this&amp;nbsp;in&amp;nbsp;Powershell&amp;nbsp;Modules&amp;nbsp;? I don&amp;#39;t know if this will be much help but I create the App pool and set the physical path with the following :&lt;/p&gt;
&lt;p&gt;&amp;nbsp;New-Item -force $FileCopyService_WebAppPath -physicalPath($webServerSetting.WorkingFolderPath + &amp;quot;\FileCopyService&amp;quot;) -type Application&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:678px;HEIGHT:366px;" title="Manual Steps" alt="Manual Steps" align="middle" src="http://i76.photobucket.com/albums/j17/urzur/howto.png" width="678" height="366" /&gt;&lt;/p&gt;</description></item><item><title>restart remote websites</title><link>http://forums.iis.net/thread/1919688.aspx</link><pubDate>Tue, 06 Oct 2009 15:12:07 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1919688</guid><dc:creator>amackan</dc:creator><slash:comments>2</slash:comments><comments>http://forums.iis.net/thread/1919688.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1919688</wfw:commentRss><description>&lt;p&gt;Hi, running iis7 on our network. i need to write a script that will stop a particular website on our internal web server and the associated apppool. we currently use iisweb to do this on our iis6 server.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;can some one point me in the right direction. my desktop pc is vista 32 bit running powershell 1 with the IIS7 powershell tools installed.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;thanks &lt;br /&gt;&lt;/p&gt;</description></item><item><title>restart site across webfarm using powershell</title><link>http://forums.iis.net/thread/1919527.aspx</link><pubDate>Mon, 05 Oct 2009 15:07:53 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1919527</guid><dc:creator>rkr31</dc:creator><slash:comments>1</slash:comments><comments>http://forums.iis.net/thread/1919527.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1919527</wfw:commentRss><description>&lt;p&gt;Hi all.&amp;nbsp;&lt;/p&gt;&lt;p&gt;I need to add functionality to our control panel to restart sites/application pools across a windows 2008 R2 webfarm (using dfsr and shared config).&lt;/p&gt;&lt;p&gt;Basically if the user clicks the restart site button i need it to restart the site across all servers in the farm.&amp;nbsp; I can do this to a single server but am unsure how i go about doing it to a remote server.&lt;/p&gt;&lt;p&gt;Is there any documentation about doing remote tasks with powershell?&amp;nbsp; Or does anyone have any examples i could use.&lt;/p&gt;&lt;p&gt;Thanks in advance (again...)&lt;/p&gt;&lt;p&gt;Richard &lt;br /&gt;&lt;/p&gt;</description></item><item><title>list all bindings for a site (customised return parameters)</title><link>http://forums.iis.net/thread/1919332.aspx</link><pubDate>Fri, 02 Oct 2009 18:39:07 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1919332</guid><dc:creator>rkr31</dc:creator><slash:comments>2</slash:comments><comments>http://forums.iis.net/thread/1919332.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1919332</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;now i know that i can use Get-ItemProperty IIS:\Sites\win1005 -Name bindings to list the bindings for a particular site, but i need to pass the parameters back to another script so need to output parameters to be different.&amp;nbsp; The above command returns:&lt;br /&gt;&lt;br /&gt;Collection&lt;br /&gt;----------&lt;br /&gt;{http *:80:win1005site.com, http *:80:www.rrrr.com}&lt;/p&gt;&lt;p&gt;I need to return&amp;nbsp; &lt;/p&gt;&lt;p&gt;win1005site.com, www.rrrr.com &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any ideas how i can achieve this?&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks&lt;/p&gt;&lt;p&gt;Richard &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Can't use IIS snapin when using powershell from c#</title><link>http://forums.iis.net/thread/1918178.aspx</link><pubDate>Thu, 24 Sep 2009 19:50:41 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1918178</guid><dc:creator>tjeerd.mulder</dc:creator><slash:comments>9</slash:comments><comments>http://forums.iis.net/thread/1918178.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1918178</wfw:commentRss><description>&lt;p&gt;Trying to execute a powershell script that sets up a website. I have it working in the powershell ISE but can&amp;#39;t get it to work when using it from c#. &lt;/p&gt;
&lt;p&gt;Error I get is:&lt;/p&gt;
&lt;p&gt;Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;That CLSID points to: Microsoft.AppHostQueryProcessor&lt;/p&gt;
&lt;p&gt;My code is:&lt;/p&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;Collection&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;PSObject&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; results &lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; Collection&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;PSObject&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; 
&lt;p&gt;Runspace runspace &lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; RunspaceFactory&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;CreateRunspace();&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;try&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; {&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; 
&lt;p&gt;runspace&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;Open();&lt;/p&gt;Pipeline pipeline &lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; runspace&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;CreatePipeline();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; 
&lt;p&gt;pipeline&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;Commands&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;AddScript(script);&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000" size="1" face="Consolas"&gt;&lt;font color="#008000" size="1" face="Consolas"&gt;&lt;font color="#008000" size="1" face="Consolas"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;pipeline&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;Commands&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;Add(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot;Out-String&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;); 
&lt;p&gt;results &lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; pipeline&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;Invoke();&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;etc etc&lt;/p&gt;
&lt;p&gt;The script itself is:&lt;/p&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; script &lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; StringBuilder(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot;Invoke-Command &amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;Append(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot; -scriptblock {&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;)&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;AppendLine()&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;AppendLine(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot;Set-ExecutionPolicy RemoteSigned&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;)&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;AppendLine(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot;Add-PSSnapin WebAdministration&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;AppendLine(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot;import-module WebAdministration&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="1" face="Consolas"&gt;&lt;font color="#008000" size="1" face="Consolas"&gt;&lt;font color="#008000" size="1" face="Consolas"&gt;//.AppendLine(@&amp;quot;&amp;amp; &amp;#39;$env:programfiles\IIS\PowerShellSnapin\iisConsole.psc1&amp;#39;&amp;quot;)&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;AppendLine(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot;IIS:&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;AppendLine(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot;get-Command Out-File | Format-List | out-string&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;)&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;AppendLine(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot;Get-Website&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;AppendLine(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&amp;quot;}&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;&lt;font color="#008080" size="1" face="Consolas"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;font size="1" face="Consolas"&gt;ToString();&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;The script&amp;nbsp;is not the actual script to&amp;nbsp;create the website, but&amp;nbsp;just a couple&amp;nbsp;of test statements&amp;nbsp;to figure out why it is failing&amp;nbsp;on&amp;nbsp;a simple Get-Website&amp;nbsp;command.&amp;nbsp;Seems any IIS Snapin command just fails. Currently this code runs from a unit test (MSTest).&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I need to use the invoke-command because eventually it needs to create a website remotly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>PowerShell Provider for IIS7</title><link>http://forums.iis.net/thread/1867248.aspx</link><pubDate>Mon, 14 Apr 2008 21:57:29 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1867248</guid><dc:creator>thomad</dc:creator><slash:comments>21</slash:comments><comments>http://forums.iis.net/thread/1867248.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1867248</wfw:commentRss><description>&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;&lt;img title="PS IIS7" style="WIDTH:186px;HEIGHT:26px;" height="53" alt="PS IIS7" src="http://blogs.iis.net/blogs/thomad/ps_logo.jpg" width="338" /&gt;&amp;nbsp;&lt;span style="FONT-SIZE:11pt;FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN-US;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;The IIS 7.0 PowerShell Provider is ready for you: &amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;It allows you to &lt;/span&gt;
&lt;ul&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;Create Web-Sites, Web Applications, Virtual Directories and Application Pools &lt;/span&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;Change Simple Configuration Properties on Web-Sites, Application Pools, Web Applications and Virtual Directories &lt;/span&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;Add and Change Complex Configuration Settings &lt;/span&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;Query Run-time Data (Web-Site State, Application Pool State, Currently Executing Requests) &lt;/span&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;Execute Advanced Configuration Tasks, Scripting, Integration with other PowerShell Snap-Ins and features &lt;/span&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;Search and Discover Configuration Settings &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;DOWNLOAD:&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;Tech Preview 1 of the IIS 7.0 PowerShell Provider can be found here: &lt;br /&gt;x86: &lt;a href="http://www.iis.net/downloads/1664/ItemPermaLink.ashx"&gt;http://www.iis.net/downloads/1664/ItemPermaLink.ashx&lt;/a&gt;&lt;br /&gt;x64: &lt;a href="http://www.iis.net/downloads/1665/ItemPermaLink.ashx"&gt;http://www.iis.net/downloads/1665/ItemPermaLink.ashx&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;FORUMS: &lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;Go to our PowerShell forum if you need support or if you are looking for&amp;nbsp;&amp;#39;Tips and Tricks&amp;#39;&lt;br /&gt;&lt;a href="http://forums.iis.net/1151.aspx"&gt;http://forums.iis.net/1151.aspx&lt;/a&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt; 
&lt;p&gt;&lt;strong&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;strong&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;WALKTHROUGHS:&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ansi-language:EN;"&gt;We have 9 walkthroughs for you to get familiar with the IIS 7.0 PowerShell Provider:&lt;br /&gt;&lt;a href="http://learn.iis.net/page.aspx/447/managing-iis-with-the-iis-70-powershell-provider/"&gt;http://learn.iis.net/page.aspx/447/managing-iis-with-the-iis-70-powershell-provider/&lt;/a&gt;&lt;/span&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Add webbinding only if it does not exist</title><link>http://forums.iis.net/thread/1918791.aspx</link><pubDate>Tue, 29 Sep 2009 15:44:28 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1918791</guid><dc:creator>rkr31</dc:creator><slash:comments>1</slash:comments><comments>http://forums.iis.net/thread/1918791.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1918791</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Apologies for all the questions.&amp;nbsp; Im having issues getting my head around powershell at the moment....&lt;br /&gt;&lt;br /&gt;How can i add a webbinding only if it does not already exist?&amp;nbsp; The following adds the binding, but if it already exists it still adds it but stops the site.&amp;nbsp; I would like to throw an exception if the binding already exists.&lt;br /&gt;&lt;br /&gt;$binding = (@{protocol=&amp;quot;http&amp;quot;;bindingInformation=&amp;quot;*:80:binding1.site.com&amp;quot;})&lt;br /&gt;new-item &amp;quot;iis:\sites\$sitename&amp;quot; -type site -physicalPath c:\inetpub\$sitename\website -bindings $binding -id &amp;quot;$sitenumber&amp;quot;&lt;/p&gt;</description></item><item><title>Cannot manipulate get-childitem variable</title><link>http://forums.iis.net/thread/1918280.aspx</link><pubDate>Fri, 25 Sep 2009 11:12:13 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1918280</guid><dc:creator>rkr31</dc:creator><slash:comments>1</slash:comments><comments>http://forums.iis.net/thread/1918280.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1918280</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think that this is probably powershell specific rather than just to do with IIS, but im hoping that you will be able to help anyhow.&amp;nbsp; I&amp;nbsp;have several sites running on iis.&amp;nbsp; Site&amp;nbsp;id&amp;#39;s are&amp;nbsp;numeric and in order (the first site id is 0001, second is 0002 etc...).&amp;nbsp; I want to return the last&amp;nbsp;site id, increment it and then add the next site in sequence (so if the last site was 0023 then i will get that value, add 1 and then add the next site with an id of 0024).&lt;/p&gt;
&lt;p&gt;The line below gets the last id, but if i try to manipulate the data in&amp;nbsp;$test it&amp;nbsp;gives me all sorts of oddness.&amp;nbsp; Im guessing that it&amp;#39;s just because it&amp;#39;s not a string variable, but to be honest im not really sure.&amp;nbsp; Any ideas?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;$test = Get-ChildItem IIS:\Sites|select-object -last 1|format-list id&lt;/p&gt;</description></item><item><title>Remove Host Header - unless it is the last one</title><link>http://forums.iis.net/thread/1917158.aspx</link><pubDate>Wed, 16 Sep 2009 10:31:32 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1917158</guid><dc:creator>rkr31</dc:creator><slash:comments>3</slash:comments><comments>http://forums.iis.net/thread/1917158.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1917158</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;&amp;nbsp;Im setting up a shared server using http 1.1 and need to automate the adding/removing of host headers.&amp;nbsp; The below script seems to work, however i need to add some logic to it so that if this is the last host header it will not remove it and will infact throw up an error of some kind that i can pass back to my web service.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;font face="Courier New"&gt;Remove-WebBinding -Site &amp;quot;Default Web Site&amp;quot; -Port 80 -IPAddress 127.0.0.1 -HostHeader www.site.com&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Any ideas? &lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Richard &lt;br /&gt;&lt;/p&gt;</description></item><item><title>powershell script does not complete when launched from IIS</title><link>http://forums.iis.net/thread/1914879.aspx</link><pubDate>Thu, 27 Aug 2009 19:40:53 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1914879</guid><dc:creator>jchertudi</dc:creator><slash:comments>3</slash:comments><comments>http://forums.iis.net/thread/1914879.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1914879</wfw:commentRss><description>&lt;p&gt;I believe this is the best forum for this, we have a php-cgi script that launches a power shell command, which in turn submits a job to a queuing system.&lt;/p&gt;&lt;p&gt;We are running php on IIS7 x64. I believe that somewhere this is a permissions issue, but have not been able to crack the code yet. Only when I run our application pool with the account of a system administrator will the job submit to the queue. I have tried to run the application pool&amp;nbsp; with either NetworkService and a domain guest account. Normal php pages execute, but page that launches powershell will time out and a hanging powershell.exe is left running on the web server doing nothing.&lt;/p&gt;&lt;p&gt;if i run a powershell command window on the web server directly as the same domain guest account, then the job will complete. We just can not seem to get php to submit a powershell command that completes.&lt;/p&gt;&lt;p&gt;Any advice or ideas? I have been chasing this as a security issue, I don&amp;#39;t want to run this site as a system admin!&lt;/p&gt;&lt;p&gt;TIA &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>running PS scripts from a webpage / sharepoint site</title><link>http://forums.iis.net/thread/1917735.aspx</link><pubDate>Mon, 21 Sep 2009 23:47:32 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1917735</guid><dc:creator>jezza6</dc:creator><slash:comments>6</slash:comments><comments>http://forums.iis.net/thread/1917735.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1917735</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi there,&lt;br /&gt;&lt;br /&gt;This is a tricky one..&lt;br /&gt;We need to start and stop
several services in certain orders frequently so with powershell
thought it would be possible to have a basic HTML page with a few
buttons / links to ps1 scripts which start or stop all required
services these in the correct order.&lt;br /&gt;&lt;br /&gt;However we can&amp;#39;t see any way to execute these .ps1 scripts directly from the webpage links..&lt;br /&gt;Also
UAC makes this difficult because some of the services we&amp;#39;ve scripted to
start and stop will only execute with elevated privileges.&lt;br /&gt;&lt;br /&gt;We
have got a crude workaround whereby we can install PoSH v2 and set it&amp;#39;s
.exe compatibility mode (because it&amp;#39;s not a part of version windows
2008 R1) to &amp;#39;run as administrator&amp;#39;, then have each of our web page
links open a folder with the ps1 script ready to be executed. After
configuring &lt;b&gt;set-executionpolicy unrestricted&lt;/b&gt; (one off) we can then double click the ps1 file, and click continue on the UAC prompt that appears.&lt;br /&gt;&lt;br /&gt;However is there a more elegant way of doing this?&lt;br /&gt;Also
once PoSH v2 is released to market this workaround will no longer work
if the compatibility mode: &amp;#39;run as administrator&amp;#39; option is removed
and/or we upgrade to R2..&lt;/p&gt;</description></item><item><title>Windows PowerlShell not Displayed</title><link>http://forums.iis.net/thread/1916921.aspx</link><pubDate>Mon, 14 Sep 2009 19:30:25 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1916921</guid><dc:creator>samir_ad</dc:creator><slash:comments>2</slash:comments><comments>http://forums.iis.net/thread/1916921.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1916921</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When i try to install PowerShell in windows server 2008, i don&amp;#39;t have option for Windows PowerShell in Add features at Server Management. Instead&amp;nbsp;I&amp;nbsp;have Windows PowerShell Integrated Scripting Environment(ISE).&lt;/p&gt;
&lt;p&gt;I installed WIndows PowerShell Integrated Scripting Environment(ISE) on my box and tried to install PowerShell Snap-in. I got the following error while installing powershell snap in.&lt;em&gt;The powershell snap-in is a part of WIndows Operating System. Please install it via &amp;#39;Program and Features&amp;#39; or &amp;#39;Server Management&amp;#39;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Please help me to install PowerShell and PowerShell snap-in into my box. I am really facing issue with this. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks,&lt;/p&gt;
&lt;p&gt;Samir Adhikari&lt;/p&gt;</description></item><item><title>restart-webapppool access denied</title><link>http://forums.iis.net/thread/1915982.aspx</link><pubDate>Sun, 06 Sep 2009 13:54:05 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1915982</guid><dc:creator>leotohill</dc:creator><slash:comments>1</slash:comments><comments>http://forums.iis.net/thread/1915982.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1915982</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m getting &amp;quot;access denied&amp;quot; when running restart-webapppool on a local iis app.&lt;/p&gt;
&lt;p&gt;Yes, powershell was started as administrator.&lt;/p&gt;
&lt;p&gt;Platform is&amp;nbsp; Win7 (rtm release) 64-bit.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any ideas?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Adding Bindings - Powershell</title><link>http://forums.iis.net/thread/1915072.aspx</link><pubDate>Fri, 28 Aug 2009 20:46:07 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1915072</guid><dc:creator>t-angrui</dc:creator><slash:comments>2</slash:comments><comments>http://forums.iis.net/thread/1915072.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1915072</wfw:commentRss><description>&lt;div class="ForumPostContentText"&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;m trying to add binding to a site through powershell. I know that I can use the following command in command prompt and get the job done.&lt;/p&gt;
&lt;p&gt;appcmd set site /site.name: &amp;quot;Default Web Site&amp;quot; /+binding.[protocol=&amp;#39;net.tcp&amp;#39; ,bindingInformation=&amp;#39;443:*&amp;#39;]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;But I want to be able to do this in Powershell.&lt;/p&gt;
&lt;p&gt;I get the following error message : The parameter &amp;#39;bindingInformation=443:*]&amp;#39; must begin with a / or - (HRESULT=80070057).&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried adding the &amp;quot;-&amp;quot; before binding but it seems to not do anything , also I&amp;#39;ve tried doing it on the strings but it was futile. Can someone help me with this ?&lt;/p&gt;
&lt;p&gt;Other Alternatives in Powershell I have tried:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;New-WebBinding -Site &amp;quot;Default Web Site&amp;quot; -Protocol net.tcp -Port 443 -hostheader &amp;quot;*&amp;quot;&lt;/p&gt;
&lt;p&gt;However for Binding information I get : &amp;quot;*:443:*&amp;quot; rather than &amp;quot;443:*&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description></item><item><title>PowerShell snap-in for IIS 7.0 -&gt; does not work with W2K8 R2</title><link>http://forums.iis.net/thread/1915878.aspx</link><pubDate>Fri, 04 Sep 2009 13:32:09 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1915878</guid><dc:creator>linus78</dc:creator><slash:comments>1</slash:comments><comments>http://forums.iis.net/thread/1915878.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1915878</wfw:commentRss><description>&lt;p&gt;Hi all,&lt;/p&gt;&lt;p&gt;I want to use PowerShell to administer my IIS7 on a W2K8 R2 Server. Unfortunately I can&amp;#39;t install the IIS7 snap-in: &amp;quot;The PowerShell snap-in is part of Windows Operating System. Please install via Programs and Features or Server Manager&amp;quot;&lt;/p&gt;&lt;p&gt;But unfortunately I cannot find a role or feature for that :-( Can you give me advice where to find it.&lt;/p&gt;&lt;p&gt;At the moment I can&amp;#39;t find any&amp;nbsp; &amp;quot;get-command -pssnapin WebAdministration&amp;quot; returns nothing...&lt;/p&gt;&lt;p&gt;Thanks in advance!&lt;/p&gt;&lt;p&gt;linus &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Powershell samples using Admin Configuration Editor</title><link>http://forums.iis.net/thread/1913697.aspx</link><pubDate>Sun, 16 Aug 2009 02:42:07 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1913697</guid><dc:creator>steve schofield</dc:creator><slash:comments>2</slash:comments><comments>http://forums.iis.net/thread/1913697.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1151&amp;PostID=1913697</wfw:commentRss><description>&lt;p&gt;Are there any plans to include powershell sample scripts using Admin Configuration Editor?&amp;nbsp;&amp;nbsp; It includes C#, Script, AppCMD.&amp;nbsp;&amp;nbsp;&amp;nbsp; Powershell is the &amp;quot;way of the future&amp;quot;.&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Would be helpful for us casual scripters using powershell.&amp;nbsp; The syntax isn&amp;#39;t something I remember if I don&amp;#39;t do it everyday.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>