<?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 'Powershell command:' and 'script block'</title><link>http://powershell.com/cs/search/SearchResults.aspx?q=(app:forums+OR+groupid:24)&amp;tag=Powershell+command:,script+block&amp;orTags=0&amp;o=DateDescending</link><description>Search results for '(app:forums OR groupid:24)' matching tags 'Powershell command:' and 'script block'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>How would I use get-itemproperty remotely?</title><link>http://powershell.com/cs/forums/thread/18191.aspx</link><pubDate>Wed, 08 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:18191</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;I have a foreach loop.&amp;nbsp; And what I want to do is get a reg key value from each server in that loop.&amp;nbsp; I have something like this:&lt;/p&gt;
&lt;p&gt;$serverlist = get-exchangeserver blah blah&lt;/p&gt;
&lt;p&gt;foreach ($server in $serverlist){&lt;/p&gt;
&lt;p&gt;get-itemproperty -path &amp;quot;hklm:\..\..&amp;quot;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;However im returning the value for only the computer im on, any thought on how I could get all the servers?&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;</description></item><item><title>Trouble using multiple variables in Exchange?</title><link>http://powershell.com/cs/forums/thread/18124.aspx</link><pubDate>Sun, 05 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:18124</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;
&lt;p&gt;I&amp;#39;m having this issue with using multiple variables in exchange powershell. &amp;nbsp;Basically I have $var1 and $var2.&lt;/p&gt;
&lt;p&gt;I have an if,else statement that is looking at those two variables. Upon either of them being eq - true, they provide a service restart capability. &amp;nbsp;This works fine, the problem is that if the test that either of those two variables is looking for is not ran then the script errors out saying &amp;quot;unable to parse null valued expression&amp;quot;. &amp;nbsp;its like powershell is telling me that it can&amp;#39;t find a variable to compare the results against. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;So if neither $var1 or $var2 is populated regardless of being true or not, the script throws the error being that I didn&amp;#39;t run the test that populates those variables.&lt;/p&gt;
&lt;p&gt;Anyone know anyway around that happening? &amp;nbsp;Basically I don&amp;#39;t want to have powershell throw this error just because the $variables are not being populated??&lt;/p&gt;
&lt;/p&gt;</description></item><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>Re: Add event logs to a transcript!</title><link>http://powershell.com/cs/forums/thread/14793.aspx</link><pubDate>Mon, 20 Feb 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:14793</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;Yes so I added the -append switch to the start-transcript.&amp;nbsp; Also did a &amp;gt;&amp;gt; with get-eventlog so it would append that info to the info in the transcript.&amp;nbsp; Problem is that it&amp;#39;s throwing the error &amp;quot;unable to access the file as another person or process is all ready using it&amp;quot;.&amp;nbsp; So how would I get the info from get-eventlog to add its info to the file from the transcript.&amp;nbsp; Bascially im wanting to have the entire shell session logged into the transcript and also any application events as well.&amp;nbsp; ANy thoughts..?&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;</description></item><item><title>Add event logs to a transcript!</title><link>http://powershell.com/cs/forums/thread/14694.aspx</link><pubDate>Wed, 15 Feb 2012 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:14694</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;I added the transcript option to my script.&amp;nbsp; Using the start-transcript.&amp;nbsp; What I want is to have event logs to be added into the transcrpt.&amp;nbsp; I know you can use get-eventlog -logname application...&amp;nbsp; But I want to add specific logged events into the transcript.&amp;nbsp; Like,&lt;/p&gt;
&lt;p&gt;start-transcript -append eventlogs, something like that.&amp;nbsp; Any thoughts?&lt;/p&gt;
&lt;p&gt;Cheers.&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>Blinking text in powershell?</title><link>http://powershell.com/cs/forums/thread/13770.aspx</link><pubDate>Wed, 28 Dec 2011 06:00:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:13770</guid><dc:creator>jwhite</dc:creator><description>&lt;p&gt;Anyone know if its possible to make your text output in powershell blink? &amp;nbsp;So if you have an error for example it will blink and catch the users attention. &amp;nbsp;Thoughts??&lt;/p&gt;</description></item></channel></rss>