<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://powershell.com/cs/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>Search results for '(app:forums OR groupid:24)' matching tags 'script block' and 'InvokeCommand'</title><link>http://powershell.com/cs/search/SearchResults.aspx?q=(app:forums+OR+groupid:24)&amp;tag=script+block,InvokeCommand&amp;orTags=0&amp;o=DateDescending</link><description>Search results for '(app:forums OR groupid:24)' matching tags 'script block' and 'InvokeCommand'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>Re: How do I use Invoke-Command correctly?</title><link>http://powershell.com/cs/forums/thread/15185.aspx</link><pubDate>Thu, 08 Mar 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:15185</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;Ok I got the command to work, turns outs that when you use -connectionuri you have to specify &lt;a href="http://fqdn"&gt;http://fqdn&lt;/a&gt; of the server/powershell when running a remote powershell command.&amp;nbsp; However I have a new challenge.&lt;/p&gt;
&lt;p&gt;I have two variables:&amp;nbsp; $domainid and $server.&amp;nbsp; $domainid has the fqdn suffix of the server, like company.com&lt;/p&gt;
&lt;p&gt;$server has the server name like server01.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Is there a way to append the two variables together so that each server in the list has the fqdn appened to it.&amp;nbsp; Like for example,&amp;nbsp; server01.company.com and server02.company.com.&amp;nbsp; Basically I want to create a third variable that appends the fqdn to each server so that when you type in third variable you get:&lt;/p&gt;
&lt;p&gt;$variable3: &lt;/p&gt;
&lt;p&gt;server01.company.com&lt;/p&gt;
&lt;p&gt;server02.company.com&lt;/p&gt;
&lt;p&gt;What I want to do is call the third variable with -connectionuri http://..&amp;nbsp; Any thoughts??&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>How do I use Invoke-Command correctly?</title><link>http://powershell.com/cs/forums/thread/15183.aspx</link><pubDate>Wed, 07 Mar 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:15183</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;Im trying to run the command test-outlookconnectivity -protocol:tcp or http -trustanysslcert:$true.&amp;nbsp; I&amp;#39;m wanting to run it on a remote machine as if I were on the machine, and have the output returned to the screen of the local machine.&lt;/p&gt;
&lt;p&gt;As stated in this article: &lt;a href="http://technet.microsoft.com/en-us/library/dd347578.aspx"&gt;http://technet.microsoft.com/en-us/library/dd347578.aspx&lt;/a&gt;, i tried to use the invoke-command.&amp;nbsp; My syntax looks like this:&lt;/p&gt;
&lt;p&gt;Invoke-command -comuptername &amp;lt;sever name&amp;gt; -scriptblock {test-outlookconnectivity ....} -authentication Kerberos.&amp;nbsp; However I got this error:&lt;/p&gt;
&lt;p&gt;&amp;quot;Connecting to remote server failed with the following error message : WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found.&amp;quot;&lt;/p&gt;
&lt;p&gt;Anyone got any idea what im doing wrong?&amp;nbsp; I have permissions to run the cmd on both machines and I can also successfully ping the remote machine.??&amp;nbsp; Thanks.&lt;/p&gt;</description></item><item><title>Need to grab Exceptions from a test-outlookconnectivity test in powershell...</title><link>http://powershell.com/cs/forums/thread/15013.aspx</link><pubDate>Wed, 29 Feb 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:15013</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;I have a variable:&lt;/p&gt;
&lt;p&gt;$result = test-outlookconnectivity -protocol:http -trustanysslcert:$true -verbose&lt;/p&gt;
&lt;p&gt;What I want to do with it is pull any errors exceptions&amp;nbsp;from the verbose output, and store them into a seperate variable so that I can use it how I want.&amp;nbsp; So as an example:&lt;/p&gt;
&lt;p&gt;$error = @()&lt;/p&gt;
&lt;p&gt;$result = test-outlookconnectivity -protocol:http -trustanysslcert:$true -verbose&lt;/p&gt;
&lt;p&gt;From there have any errors exceptions&amp;nbsp;added into the $error variable.&amp;nbsp; So I would have something like the following:&lt;/p&gt;
&lt;p&gt;$result = test-outlookconnectivity -protocol:http -trustanysslcert:$true -verbose&lt;/p&gt;
&lt;p&gt;$error = Error.exception mesage (the RPC server is unavailable).&lt;/p&gt;
&lt;p&gt;So if I type $result i get the entire results of the test.&amp;nbsp; If I type $error i get that one like of text.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Any thoughts??&lt;/p&gt;</description></item><item><title>Re: Add event logs to a transcript!</title><link>http://powershell.com/cs/forums/thread/14970.aspx</link><pubDate>Tue, 28 Feb 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:14970</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;Ok so I was doing some further digging and realized that when a file in in use by start-transcript, that file appears to become locked from use by any other cmdlets.&amp;nbsp; So what I did was this:&lt;/p&gt;
&lt;p&gt;start-transcript output file is C:\transcript.txt&lt;/p&gt;
&lt;p&gt;Run cmdlet, run test&lt;/p&gt;
&lt;p&gt;stop-transcript&lt;/p&gt;
&lt;p&gt;get-eventlog &amp;gt;&amp;gt; C:\transcript.&lt;/p&gt;
&lt;p&gt;By doing this it appends the get-eventlog to the transcript file.&amp;nbsp; That is what I have found so far.&lt;/p&gt;</description></item><item><title>Show a menu based on multiple variables!</title><link>http://powershell.com/cs/forums/thread/14662.aspx</link><pubDate>Tue, 14 Feb 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:14662</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;I&amp;#39;m writing a script in powershell. What I want to have happen, is to have a menu to restart a service appear based on an error being detected on the server. Say a service is not running, or outlook does not pass a connectivity test, I want the script to use both variables in determining to show the menu. Like for example,&lt;/p&gt;
&lt;p&gt;if (($service.status -ne &amp;quot;running&amp;quot;) or ($outlook connectivity result -like &amp;quot;failure&amp;quot;) {show menu}. Something like that is what I&amp;#39;m looking for.&lt;/p&gt;
&lt;p&gt;Any thoughts? Cheers.&lt;/p&gt;</description></item><item><title>Recycling an IIS AppPool in powershell...</title><link>http://powershell.com/cs/forums/thread/14634.aspx</link><pubDate>Mon, 13 Feb 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:14634</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;I have put together a script that pulls a list of servers in the array and then tests outlook and owa connectivity to each.&amp;nbsp; I also added a menu that allows a restart of selected services on all servers that show an error in connectivity.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;What im wanting to do is be able to recycle or restart an IIS AppPool within the powershell session.&amp;nbsp; So everytime I run get-wmiobject -class IISApplicationPool -namespace root\MicrosoftIISv2 I get the error:&lt;/p&gt;
&lt;p&gt;&amp;quot;Invalid Namespace&amp;quot;.&amp;nbsp; Anyone know how I can 1. get a list of all the namespaces, and 2. recycle an iisapppool using get-wmiobject in powershell?&amp;nbsp; Thanks..&lt;/p&gt;</description></item></channel></rss>