<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Peters&#039;s PowerShell Blog</title>
	<atom:link href="http://powershell-knowhow.de/powershell/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://powershell-knowhow.de/powershell</link>
	<description>Learn to love PowerShell -  day by day, line by line</description>
	<lastBuildDate>Tue, 08 May 2012 18:06:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>The Scripting Games 2012 are over an I won&#8230;</title>
		<link>http://powershell-knowhow.de/powershell/?p=163</link>
		<comments>http://powershell-knowhow.de/powershell/?p=163#comments</comments>
		<pubDate>Tue, 08 May 2012 18:06:16 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://powershell-knowhow.de/powershell/?p=163</guid>
		<description><![CDATA[well, I didn&#8217;t win exactly &#8211; the real winners of the Scripting Games 2012 are Lido Paglia in the Beginner category and Rohn Edwards in the Advanced Category. Congratulations! This was not so easily to accomplish since a few challenges &#8230; <a href="http://powershell-knowhow.de/powershell/?p=163">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/EUFlagge24.png"><img class="alignnone size-full wp-image-143" title="EUFlagge24" src="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/EUFlagge24.png" alt="" width="34" height="23" /></a> well, I didn&#8217;t win exactly &#8211; the real winners of the <strong>Scripting Games 2012</strong> are <strong>Lido Paglia</strong> in the Beginner category and <strong>Rohn Edwards</strong> in the Advanced Category. Congratulations! This was not so easily to accomplish since a few challenges were a little tough andÂ  it was a fierce competion which several hundred submissions for each challengeÂ  I finished somewhere in the upper third part with a lot of room for improvement for next years competition. The best advice I can give to anyone who is not happy with his results or wants to take part next year for the first time: Read the challenge carefully, ask questions and keep your scripts simple and well structured. Simple solutions are always the best ones. And don&#8217;t forget the comments.</p>
<p>But why was I thinking that I won? Simple, since the Scripting Games follow the &#8220;Olympic idea&#8221; everyone who submitted 10 scripts is a winner. She or he will probably have learnt a lot about PowerShell and it was fun and also challenging. Writing scripts day in and day out is one thing but having your own scripts jugded by the best PowerShell experts in the world is a big thrill because it shows how good you really are.</p>
<p>I would like to thank everyone who made this event possible (I know that a lot of people put a lot of work, time and passion into making this probably the &#8220;biggest scripting event in history) and I am really looking forward to Scripting Games 2013.</p>
]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=163</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Remoting eBook von Don Jones und Tobias Weltner</title>
		<link>http://powershell-knowhow.de/powershell/?p=158</link>
		<comments>http://powershell-knowhow.de/powershell/?p=158#comments</comments>
		<pubDate>Tue, 08 May 2012 17:52:16 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://powershell-knowhow.de/powershell/?p=158</guid>
		<description><![CDATA[Auch wenn PowerShell-Remoting in der Praxis einfach zu benutzen ist und auch das Thema &#8220;Troubleshooting&#8221; in der Hilfe gut beschrieben wird, so manches Mal hat man das GefÃ¼hl, dass einem Microsoft nicht alle Details verraten hat. Dieses GefÃ¼hl tritt spÃ¤testens &#8230; <a href="http://powershell-knowhow.de/powershell/?p=158">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/GermanyFlag24.png"><img class="alignnone size-full wp-image-142" title="GermanyFlag24" src="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/GermanyFlag24.png" alt="" width="24" height="32" /></a> Auch wenn PowerShell-Remoting in der Praxis einfach zu benutzen ist und auch das Thema &#8220;Troubleshooting&#8221; in der Hilfe gut beschrieben wird, so manches Mal hat man das GefÃ¼hl, dass einem Microsoft nicht alle Details verraten hat. Dieses GefÃ¼hl tritt spÃ¤testens dann ein, wenn ein <strong>PS-EnableRemoting</strong> wider Erwarten zu einem Fehler fÃ¼hrt, der dessen Fehlermeldung wenig bis gar keine RÃ¼ckschlÃ¼sse auf die Ursache zulÃ¤sst (sowie wie es in meinen PowerShell-Kursen, die in wechselnden Umgebungen stattfinden, hin und wieder passiert).</p>
<p>Seit kurzem haben die beiden &#8220;PowerShell-Superstars&#8221; <strong>Don Jones</strong> und <strong>Tobias Weltner </strong>ihr Wissen zum Thema PowerShell-Remoting in einem eBook zusammengefasst, das es unter der folgenden Adresse zum Download gibt:</p>
<p><a title="eBook zum Thema PowerShell Remoting" href="http://www.lulu.com/shop/don-jones-and-tobias-weltner/secrets-of-powershell-remoting/ebook/product-20087080.html" target="_blank">http://www.lulu.com/shop/don-jones-and-tobias-weltner/secrets-of-powershell-remoting/ebook/product-20087080.html</a></p>
<p>Auch wenn das PDF kostenlos ist, muss man sich zuvor bei Lulu.com registrieren und es &#8220;kaufen&#8221;. Und auch wenn der Inhalt nicht unbedingt &#8220;Geheimnisse&#8221; sind, ist es ein absolut lesenswertes Dokument, das jeder, der mit der PowerShell ein solides Remoting auf die Beine stellen mÃ¶chte, das Ã¼ber ein <em>Invoke-Command { Get-Process }</em> auf einem Remote-Rechner hinausgeht lesen sollte. Danke an die beiden Autoren, dass sich die Zeit genommen haben das Dokument zusammenzustellen.</p>
]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=158</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I am done with the Scripting Games 2012</title>
		<link>http://powershell-knowhow.de/powershell/?p=153</link>
		<comments>http://powershell-knowhow.de/powershell/?p=153#comments</comments>
		<pubDate>Tue, 17 Apr 2012 22:48:48 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://powershell-knowhow.de/powershell/?p=153</guid>
		<description><![CDATA[Yesterday I submitted my last PowerShell script for the 2012 Scripting Games. So I have completed every single of the advanced events (which took me several hours in total) and now its up to the jury to decide. The last &#8230; <a href="http://powershell-knowhow.de/powershell/?p=153">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/EUFlagge24.png"><img class="alignnone size-full wp-image-143" title="EUFlagge24" src="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/EUFlagge24.png" alt="" width="34" height="23" /></a> Yesterday I submitted my last PowerShell script for the 2012 Scripting Games. So I have completed every single of the advanced events (which took me several hours in total) and now its up to the jury to decide. The last challenge #10 was not such a big challenge but not a no brainer either (or may be the solution I came up with was just too complicated). The toughest challenge was Event # 6 where you had to collect the uptime of number of servers with the resction that if a server had been booted after 8am his uptime had to be taken into account the next day.</p>
<p>It was definitely fun, I learned at lot and I appreciate the effort the organizers put into the whole event. I don&#8217;t think that I will win or come even close. Its not becuase I wasn&#8217;t able to solve the challenges but in once occasion I didn&#8217;t read the description properly and forgot that the script should check if it runs with admin privileges (although I wasn&#8217;t aware that you had to to this just to check remotely if a services runs or not) and in another case I accidently submited a script with an error. And some of solutions might have been to complicated.</p>
<p>But whoever wins is a real PowerShell professional. In about two weeks the winner will be announced.</p>
]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=153</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GroÃŸe Dateien kopieren</title>
		<link>http://powershell-knowhow.de/powershell/?p=145</link>
		<comments>http://powershell-knowhow.de/powershell/?p=145#comments</comments>
		<pubDate>Wed, 11 Apr 2012 15:08:17 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://powershell-knowhow.de/powershell/?p=145</guid>
		<description><![CDATA[Zugegeben, kein besonders spannendes Thema, aber ein Wichtiges. Die PowerShell bietet als Windows-Shell zwangslÃ¤ufig gleich eine ganze Palette an MÃ¶glichkeiten, um groÃŸe Dateien (z.B. Images) von A nach B zu kopieren: &#62;Copy-Item &#62;XCopy bzw. RoboCopy &#62;Der BITS-Dienst Ich persÃ¶nlich bevorzuge &#8230; <a href="http://powershell-knowhow.de/powershell/?p=145">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/GermanyFlag24.png"><img class="alignnone size-full wp-image-142" title="GermanyFlag24" src="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/GermanyFlag24.png" alt="" width="24" height="32" /></a> Zugegeben, kein besonders spannendes Thema, aber ein Wichtiges. Die PowerShell bietet als Windows-Shell zwangslÃ¤ufig gleich eine ganze Palette an MÃ¶glichkeiten, um groÃŸe Dateien (z.B. Images) von A nach B zu kopieren:</p>
<p>&gt;Copy-Item</p>
<p>&gt;XCopy bzw. RoboCopy</p>
<p>&gt;Der BITS-Dienst</p>
<p>Ich persÃ¶nlich bevorzuge <strong>RoboCopy</strong> (Robust Copy), da es schnell und einfach in der Handhabung ist. Aus einem PowerShell-Skript heraus bieten die Cmdlets aus dem <strong>BitsTransfer</strong>-Modul den meisten Komfort, vor allem, da ein Transfer auch dann fortgesetzt wird, wenn der RechnerÂ  zwischenzeitlich heruntergefahren wurde (das wollte ich immer schon einmal testen;). Interessanterweise gibt es bezÃ¼glich der Geschwindigkeit offenbar keine allzu groÃŸen Unterschiede.</p>
<p>Das habe ich jedenfalls mit einem PowerShell-Skript herausgefunden, dass eine relativ groÃŸe ISO-Datei von A nach B kopiert. Damit es funktioniert, mÃ¼ssen natÃ¼rlich die Pfade fÃ¼r die Quell- und die Zieldatei angepasst werden.</p>
<p>Das Skript kopiert ein und diesselbe Datei vier Mal auf verschiedene Art und Weise und misst dabei die AusfÃ¼hrungzeit per Measure-Command. Damit das Ergebnis am Ende gut darstellbar ist, werden die Ergebnis in eine Hashtable eingefÃ¼gt, die am Ende ausgegeben wird. Eine interessante Technik vollkommen unabhÃ¤ngig vom Thema Dateien kopieren.</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: pink;">&amp;</span>lt;<span style="color: #008000;">#</span>
.Synopsis
Copy<span style="color: pink;">-</span>Vergleich
.Description
Geschwindigkeitsvergleich <span style="color: #008080; font-weight: bold;">Copy-Item</span><span style="color: pink;">,</span> XCopy<span style="color: pink;">,</span> RoboCopy<span style="color: pink;">,</span> BITS
<span style="color: #008000;">#&amp;gt;</span>
&nbsp;
<span style="color: #800080;">$QuellDatei</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;C:\Users\Administrator\Downloads\de_office_professional_plus_2010_x64_517145.exe&quot;</span>
<span style="color: #800080;">$ZielPfad</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;\\192.168.2.138\ISOS&quot;</span>
<span style="color: #800080;">$ZielDatei</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;T:\de_office_professional_plus_2010_x64_517145.exe&quot;</span>
&nbsp;
<span style="color: #008000;"># $Cred = Get-Credential Admin</span>
&nbsp;
<span style="color: #008000;"># Kopieren per Copy-Item</span>
&nbsp;
<span style="color: #800080;">$ZeitCopy</span> <span style="color: pink;">=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #800080;">$ZeitCopyÂ</span>  <span style="color: pink;">+=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span><span style="color: #800000;">&quot;Copy&quot;</span><span style="color: pink;">=&amp;</span>amp;<span style="color: #000000;">&#123;</span><span style="color: #008080; font-weight: bold;">Measure-Command</span> <span style="color: #008080; font-style: italic;">-Expression</span> <span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Copy-Item</span> <span style="color: #008080; font-style: italic;">-Path</span> <span style="color: #800080;">$QuellDatei</span> <span style="color: #008080; font-style: italic;">-Destination</span> T: <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008080; font-weight: bold;">Write-Warning</span> <span style="color: #800000;">&quot;Copy-Item-Beispiel ausgefÃ¼hrt.&quot;</span>
&nbsp;
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$QuellDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$ZielDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Remove-Item</span> <span style="color: #008080; font-style: italic;">-Path</span> <span style="color: #800080;">$ZielDatei</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># Kopieren per XCopy</span>
&nbsp;
<span style="color: #800080;">$ZeitCopy</span> <span style="color: pink;">+=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span><span style="color: #800000;">&quot;XCopy&quot;</span><span style="color: pink;">=&amp;</span>amp;<span style="color: #000000;">&#123;</span><span style="color: #008080; font-weight: bold;">Measure-Command</span> <span style="color: #008080; font-style: italic;">-Expression</span> <span style="color: #000000;">&#123;</span>
XCopy <span style="color: #800080;">$QuellDateiÂ</span>  T: <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008080; font-weight: bold;">Write-Warning</span> <span style="color: #800000;">&quot;XCopy-Item-Beispiel ausgefÃ¼hrt.&quot;</span>
&nbsp;
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$QuellDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$ZielDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Remove-Item</span> <span style="color: #008080; font-style: italic;">-Path</span> <span style="color: #800080;">$ZielDatei</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># Kopieren per RoboCopy</span>
&nbsp;
<span style="color: #800080;">$ZeitCopy</span> <span style="color: pink;">+=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span><span style="color: #800000;">&quot;RoboCopy&quot;</span><span style="color: pink;">=&amp;</span>amp;<span style="color: #000000;">&#123;</span><span style="color: #008080; font-weight: bold;">Measure-Command</span> <span style="color: #008080; font-style: italic;">-Expression</span> <span style="color: #000000;">&#123;</span>
RoboCopy <span style="color: #800080;">$QuellDateiÂ</span>  T: <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008080; font-weight: bold;">Write-Warning</span> <span style="color: #800000;">&quot;RoboCopy-Item-Beispiel ausgefÃ¼hrt.&quot;</span>
&nbsp;
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$QuellDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$ZielDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Remove-Item</span> <span style="color: #008080; font-style: italic;">-Path</span> <span style="color: #800080;">$ZielDatei</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># Kopieren per BITS</span>
&nbsp;
Import<span style="color: pink;">-</span>Module <span style="color: #008080; font-style: italic;">-Name</span> Bitstransfer
&nbsp;
<span style="color: #800080;">$ZeitCopy</span> <span style="color: pink;">+=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span><span style="color: #800000;">&quot;BITS&quot;</span><span style="color: pink;">=&amp;</span>amp;<span style="color: #000000;">&#123;</span><span style="color: #008080; font-weight: bold;">Measure-Command</span> <span style="color: #008080; font-style: italic;">-Expression</span> <span style="color: #000000;">&#123;</span>
Start<span style="color: pink;">-</span>BitsTransfer <span style="color: pink;">-</span>Source <span style="color: #800080;">$QuellDatei</span> <span style="color: #008080; font-style: italic;">-Description</span> <span style="color: #800000;">&quot;Copy-Test&quot;</span> `
<span style="color: #008080; font-style: italic;">-Destination</span> <span style="color: #800080;">$ZielPfad</span> <span style="color: #008080; font-style: italic;">-DisplayName</span> <span style="color: #800000;">&quot;Copy-Test&quot;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$QuellDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$ZielDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Remove-Item</span> <span style="color: #008080; font-style: italic;">-Path</span> <span style="color: #800080;">$ZielDatei</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #008080; font-weight: bold;">Write-Warning</span> <span style="color: #800000;">&quot;BITS-Beispiel ausgefÃ¼hrt.&quot;</span>
&nbsp;
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$QuellDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Test-Path</span> <span style="color: #800080;">$ZielDatei</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Remove-Item</span> <span style="color: #008080; font-style: italic;">-Path</span> <span style="color: #800080;">$ZielDatei</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #800080;">$ZeitCopy</span>.Keys <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Select-Object</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span>Name<span style="color: pink;">=</span><span style="color: #800000;">&quot;Copy-Variante&quot;</span>;Expression<span style="color: pink;">=</span><span style="color: #000000;">&#123;</span><span style="color: #000080;">$_</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: pink;">,@</span><span style="color: #000000;">&#123;</span>Name<span style="color: pink;">=</span><span style="color: #800000;">&quot;Wert&quot;</span>;Expression<span style="color: pink;">=</span><span style="color: #000000;">&#123;</span><span style="color: #800080;">$ZeitCopy</span>.<span style="color: #000080;">$_</span>.ToString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Sort-Object</span> <span style="color: #008080; font-style: italic;">-Property</span> Wert</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=145</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Die PowerShell Scripting Games 2012 &#8211; ein Aufruf zum Mitmachen</title>
		<link>http://powershell-knowhow.de/powershell/?p=140</link>
		<comments>http://powershell-knowhow.de/powershell/?p=140#comments</comments>
		<pubDate>Mon, 09 Apr 2012 12:35:31 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://powershell-knowhow.de/powershell/?p=140</guid>
		<description><![CDATA[Ein nicht ganz unwichtiger Hinweis gleich vorweg: Die Scripting Games 2012 haben bereits am 3. April begonnen und enden am 13. April. FÃ¼r eine Teilnahme ist es zwar nicht zu spÃ¤t, aber da der Abgabetermin fÃ¼r die ersten &#8220;Wettbewerbe&#8221; schon &#8230; <a href="http://powershell-knowhow.de/powershell/?p=140">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/GermanyFlag24.png"><img class="alignnone size-full wp-image-142" title="GermanyFlag24" src="http://powershell-knowhow.de/powershell/wp-content/uploads/2012/04/GermanyFlag24.png" alt="" width="24" height="32" /></a> Ein nicht ganz unwichtiger Hinweis gleich vorweg: Die Scripting Games 2012 haben bereits am 3. April begonnen und enden am 13. April. FÃ¼r eine Teilnahme ist es zwar nicht zu spÃ¤t, aber da der Abgabetermin fÃ¼r die ersten &#8220;Wettbewerbe&#8221; schon vorbei ist, kann man sicher nicht mehr die Punktzahl erzielen, die einen in die NÃ¤he des Gesamtsiegs bringen kÃ¶nnte (ich werde 2013 etwas eher auf die Scripting Games hinweisen).</p>
<p>Eine allgemeine Ãœbersicht gibt es hier:</p>
<p><a href="http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/04/the-2012-windows-powershell-scripting-games-all-links-on-one-page.aspx">http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/04/the-2012-windows-powershell-scripting-games-all-links-on-one-page.aspx</a></p>
<p>Doch was sind die Scripting Games Ã¼berhaupt und warum sollte man sich unbedingt beteiligen? Hier das Wichtigste in Kurzform:</p>
<p>&gt;Die Scripting Games sind eine Art &#8220;PowerShell-Wettbewerb&#8221;, bei der es darum geht gestellte Aufgaben mÃ¶glichst &#8220;gut&#8221; mit den Mitteln der PowerShell 2.0 zu lÃ¶sen.<br />
&gt;Die Scripting Games werden von den &#8220;Scripting Guys&#8221; bei Microsoft in Redmond organisiert (dahinter steht in erster Linie ein gewisser Ed Wilson, der zahlreiche BÃ¼cher zum Thema Windows Scripting &#8211; alle erschienen bei Microsoft Press) geschrieben hat, und der von seiner Ehefrau (aka &#8220;Scripting Wife&#8221;) unterstÃ¼tzt wird.<br />
&gt;Die Idee der Scripting Games ist, dass alle, die beruflich oder privat (oder beides) mit der PowerShell zu tun haben, anhand von Ãœbungsaufgaben ihr Wissen testen kÃ¶nnen.<br />
&gt;Die Organisatoren stellen jeden Tag eine Aufgabe (jeweils in der Kategorie &#8220;Beginers&#8221; und &#8220;Advanced&#8221;), die innerhalb einer Frist gelÃ¶st werden muss. Alle eingereichten LÃ¶sungen werden nach verschiedenen Kriterien von einer Jury bewertet. Am Ende gewinnt, wer die meisten Punkte erreicht hat. Die Gewinner erhalten verschiedene Sachpreise (u.a die Teilnahme an der TechEd US).</p>
<p>Bei der Teilnahme geht es nicht nur darum, mÃ¶glicherweise etwas gewinnen zu kÃ¶nnen, sondern in erster Linie darum, durch das LÃ¶sen der Aufgaben mehr Ã¼ber die PowerShell zu lernen und dabei SpaÃŸ zu haben.</p>
<p>Insgesamt sind die Scripting Games eine tolle Sache. Ich kann jedem nur empfehlen mitzumachen. Ich bin selber natÃ¼rlich (das erste Mal) dabei und werde natÃ¼rlich darÃ¼ber berichten wie erfolgreich ich am Ende war (zwei Aufgaben habe ich bereits umgesetzt &#8211; ich war nicht nur mit dieser AnkÃ¼ndigung etwas spÃ¤t dran;)</p>
]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=140</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The 2012 Scripting Games have started</title>
		<link>http://powershell-knowhow.de/powershell/?p=137</link>
		<comments>http://powershell-knowhow.de/powershell/?p=137#comments</comments>
		<pubDate>Thu, 05 Apr 2012 13:44:57 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://powershell-knowhow.de/powershell/?p=137</guid>
		<description><![CDATA[I am little late but may be this blog entry will give the PowerShell 2012 Scripting Games a tiny amount of extra exposure. Here is the link http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/30/scripting-guys-announce-the-2012-powershell-scripting-games.aspx I can really recommend to take the challenge &#8211; its a fun &#8230; <a href="http://powershell-knowhow.de/powershell/?p=137">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am little late but may be this blog entry will give the PowerShell 2012 Scripting Games a tiny amount of extra exposure. Here is the link</p>
<p><a href="http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/30/scripting-guys-announce-the-2012-powershell-scripting-games.aspx">http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/30/scripting-guys-announce-the-2012-powershell-scripting-games.aspx<br />
</a></p>
<p>I can really recommend to take the challenge &#8211; its a fun way of proving how good you know PowerShell already.</p>
<p>If you are not sure if you are already good enough for taking part you might should try this nice little quiz that &#8220;The Scripting Guys&#8221; had put together:</p>
<p><a href="http://quizapp.cloudapp.net/default.aspx?quiz=powershell">http://quizapp.cloudapp.net/default.aspx?quiz=powershell</a></p>
]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=137</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beware of MUI (or how to get a stranged Enable-PSRemoting error fixed)</title>
		<link>http://powershell-knowhow.de/powershell/?p=133</link>
		<comments>http://powershell-knowhow.de/powershell/?p=133#comments</comments>
		<pubDate>Thu, 05 Apr 2012 13:22:11 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://powershell-knowhow.de/powershell/?p=133</guid>
		<description><![CDATA[I am German, I live in Germany, so I am using a Windows Server with a German Language Pack. Make sense, right? But from time to time I come accross a Windows Server with a en-US installation where someone installed &#8230; <a href="http://powershell-knowhow.de/powershell/?p=133">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am German, I live in Germany, so I am using a Windows Server with a German Language Pack. Make sense, right? But from time to time I come accross a Windows Server with a en-US installation where someone installed a German MUI (Multlingual User Interface). Thats when some problems starts.</p>
<p>Recently I got a &#8220;strange&#8221; error when executing <strong>Enanble-PSRemoting</strong>. The command ran through until it hits the part where the Firewall rules are added. The result was a kind of &#8220;Unable to check the status of the firewall&#8221; error message.</p>
<p>It turns out that after changing the language to &#8220;English&#8221; it worked.</p>
<p>It also turned out that someone already had reported this as an error:</p>
<p>http://connect.microsoft.com/PowerShell/feedback/details/625463/firewall-state-mui-problem</p>
]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=133</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get-Hotfix fixed</title>
		<link>http://powershell-knowhow.de/powershell/?p=117</link>
		<comments>http://powershell-knowhow.de/powershell/?p=117#comments</comments>
		<pubDate>Thu, 16 Feb 2012 19:10:36 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://powershell-knowhow.de/powershell/?p=117</guid>
		<description><![CDATA[Get-Hotfix has a minor glitch that probably only occurs on a non US-Windows. If a date cannot be converted into a valid DateTime an exception is probably internally thrown and the InstalledOn property has no value. That&#8217;s a little bit &#8230; <a href="http://powershell-knowhow.de/powershell/?p=117">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Get-Hotfix has a minor glitch that probably only occurs on a non US-Windows. If a date cannot be converted into a valid DateTime an exception is probably internally thrown and the <strong>InstalledOn </strong>property has no value. That&#8217;s a little bit annoying. </p>
<p>The fix is to access the date value from the base property and do you own conversion. The following snippet will accomplish this.</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;">Get<span style="color: pink;">-</span>Hotfix <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Select-Object</span> HotfixID<span style="color: pink;">,</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span>Name<span style="color: pink;">=</span><span style="color: #800000;">&quot;InstallDate&quot;</span>;Expression<span style="color: pink;">=</span><span style="color: #000000;">&#123;</span>
         <span style="color: #008080; font-weight: bold;">Get-Date</span> <span style="color: #008080; font-style: italic;">-Date</span> <span style="color: #000000;">&#40;</span><span style="color: #000080;">$_</span>.psbase.Properties<span style="color: #000000;">&#91;</span><span style="color: #800000;">&quot;InstalledOn&quot;</span><span style="color: #000000;">&#93;</span>.Value `
            <span style="color: #FF0000;">-replace</span> <span style="color: #800000;">&quot;(\d{1,2})/(\d{1,2})/(\d{4})&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">'$2.$1.$3'</span><span style="color: #000000;">&#41;</span> 
<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Sort-Object</span> <span style="color: #008080; font-style: italic;">-Property</span> InstallDate <span style="color: #008080; font-style: italic;">-Descending</span> <span style="color: pink;">|</span> 
<span style="color: #008080; font-weight: bold;">Select-Object</span> HotfixID<span style="color: pink;">,</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span>Name<span style="color: pink;">=</span><span style="color: #800000;">&quot;InstallDate&quot;</span>;Expression<span style="color: pink;">=</span><span style="color: #000000;">&#123;</span><span style="color: #800000;">&quot;{0:d}&quot;</span> <span style="color: #FF0000;">-f</span> <span style="color: #000080;">$_</span>.InstallDate<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=117</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing ASCII characters in an xml file</title>
		<link>http://powershell-knowhow.de/powershell/?p=111</link>
		<comments>http://powershell-knowhow.de/powershell/?p=111#comments</comments>
		<pubDate>Fri, 27 Jan 2012 10:01:28 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://ha1418.domainkunden.de/powershell/?p=111</guid>
		<description><![CDATA[Recently I stumbled upon a small peculiarity that Word exposes when you try to save an XML file as text (actually its a regular word document with xml tags that I saved as a text file). After saving the file &#8230; <a href="http://powershell-knowhow.de/powershell/?p=111">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I stumbled upon a small peculiarity that Word exposes when you try to save an XML file as text (actually its a regular word document with xml tags that I saved as a text file). After saving the file I was not able to load it as xml. After a &#8220;few hours&#8221; (minutes that seems like hours) I found out with the help of a hex editor that Word uses a special ASCII character 147 instead of 44 for the quotation mark &#8220;.</p>
<p>To make the story really short, I used PowerShell (of course) to change all ASCII codes 147 to 44:</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">Get-Content</span> Test.xml <span style="color: #008080; font-style: italic;">-Encoding</span> byte<span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-replace</span> <span style="color: #800000;">&quot;147&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;34&quot;</span> <span style="color: pink;">|</span> <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#91;</span><span style="color: #008080;">Byte</span><span style="color: #000000;">&#93;</span>
<span style="color: #000080;">$_</span> <span style="color: #000000;">&#125;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Set-Content</span> Test.xml <span style="color: #008080; font-style: italic;">-Encoding</span> Byte</pre></div></div>

<p>The &#8220;trick&#8221; is not only to use the Encoding parameter with Get-Content but also to convert each character back to [Byte] so that it can be saved again as byte with Set-Content.</p>
]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=111</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting the time from an Internet Time Server</title>
		<link>http://powershell-knowhow.de/powershell/?p=100</link>
		<comments>http://powershell-knowhow.de/powershell/?p=100#comments</comments>
		<pubDate>Fri, 06 Jan 2012 17:26:55 +0000</pubDate>
		<dc:creator>pemo11</dc:creator>
				<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://ha1418.domainkunden.de/powershell/?p=100</guid>
		<description><![CDATA[Like probably many others I accepted the generous offer by n/Software right before Christmas that included a free license of their NetCmdlets V3. I really like their Cmdlets &#8211; especially copying files via Ftp and checking mails from a POP3 &#8230; <a href="http://powershell-knowhow.de/powershell/?p=100">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Like probably many others I accepted the generous offer by <strong>n/Software</strong> right before Christmas that included a free license of their <a title="NetCmdlets by n/Software" href="http://www.nsoftware.com/powershell/">NetCmdlets V3.</a> I really like their Cmdlets &#8211; especially copying files via Ftp and checking mails from a POP3 server it couldn&#8217;t be simpler.The current version even includes a couple of cmdlets for transfering files between the local file system and Amazons Simple Storage Service (S3).</p>
<p>Their help needs some work, especially when it comes to examples (I guess they aren&#8217;t any), more parameters should offer parameter pinding and I think they should have choosen a different naming scheme (names like <em>Get-Pop</em> oder <em>Send-EMail</em> are too generic and should be reserved for Microsoft).</p>
<p>What I couldn&#8217;t get to work is the <em>Get-Time</em> cmdlet (this name is too generic too). For some reasons it always delivered a DateTime that was completely wrong. Although getting the current time over the Internet it not the most important thing to do, I was currious to learn a little more about the inner working which turned out to be quite simple. All there is to do is sending a TCP request over port 13 (or 17) to an Internet Time Server.</p>
<p>Here is a small PowerShell script that gets the current Internet time by querying a list of Time servers.</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;">&lt;#
 .Synopsis
 Internet-Time Server direkt abfragen
#&gt;</span>
&nbsp;
<span style="color: #800080;">$TimeServer</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;128.138.140.44&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;64.90.182.55&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;206.246.118.250&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;207.200.81.113&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;128.138.188.172&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;64.113.32.5&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;64.147.116.229&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;64.125.78.85&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">&quot;128.138.188.172&quot;</span>
<span style="color: #800080;">$OldVerbosePref</span> <span style="color: pink;">=</span> <span style="color: #000080;">$VerbosePreference</span>
<span style="color: #000080;">$VerbosePreference</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;Continue&quot;</span>
&nbsp;
<span style="color: #800080;">$Port</span> <span style="color: pink;">=</span> <span style="color: #804000;">13</span>
<span style="color: #0000FF;">foreach</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$Server</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$TimeServer</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
 <span style="color: #008080; font-weight: bold;">Write-Verbose</span> <span style="color: #800000;">&quot;Checking $Server...&quot;</span>
 try
 <span style="color: #000000;">&#123;</span>
 <span style="color: #800080;">$Sockets</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> <span style="color: #008080; font-style: italic;">-TypeName</span> System.Net.Sockets.TcpClient <span style="color: #800080;">$Server</span><span style="color: pink;">,</span> <span style="color: #800080;">$Port</span>
 <span style="color: #800080;">$SocketStream</span> <span style="color: pink;">=</span> <span style="color: #800080;">$Sockets</span>.GetStream<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
 <span style="color: #800080;">$Reader</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> <span style="color: #008080; font-style: italic;">-TypeName</span> System.IO.StreamReader <span style="color: #800080;">$SocketStream</span>
 <span style="color: #800080;">$ServerResponse</span> <span style="color: pink;">=</span> <span style="color: #800080;">$Reader</span>.ReadToEnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
 <span style="color: #008080; font-weight: bold;">Write-Verbose</span> <span style="color: #800000;">&quot;Server-Reponse: $ServerResponse&quot;</span>
 <span style="color: #800080;">$Res</span> <span style="color: pink;">=</span> <span style="color: #800080;">$ServerResponse</span> <span style="color: #FF0000;">-match</span> <span style="color: #800000;">&quot;\d+\s+(?&lt;Year&gt;\d{2})-(?&lt;Day&gt;\d{2})-(?&lt;Month&gt;\d{2})\s+(?&lt;Hour&gt;\d{2}):(?&lt;Minute&gt;\d{2}):(?&lt;Second&gt;\d{2})&quot;</span>
 <span style="color: #800080;">$Year</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;20$($Matches.Year)&quot;</span>
 <span style="color: #800080;">$Month</span> <span style="color: pink;">=</span> <span style="color: #800080;">$Matches</span>.Month
 <span style="color: #800080;">$Day</span> <span style="color: pink;">=</span> <span style="color: #800080;">$Matches</span>.Day
 <span style="color: #800080;">$Hour</span> <span style="color: pink;">=</span> <span style="color: #800080;">$Matches</span>.Hour
 <span style="color: #800080;">$Minute</span> <span style="color: pink;">=</span> <span style="color: #800080;">$Matches</span>.Minute
 <span style="color: #800080;">$Second</span> <span style="color: pink;">=</span> <span style="color: #800080;">$Matches</span>.Second
 <span style="color: #800080;">$InternetTime</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Get-Date</span> <span style="color: #008080; font-style: italic;">-Year</span> <span style="color: #800080;">$Year</span> <span style="color: #008080; font-style: italic;">-Month</span> <span style="color: #800080;">$Month</span> <span style="color: #008080; font-style: italic;">-Day</span> <span style="color: #800080;">$Day</span> <span style="color: #008080; font-style: italic;">-Hour</span> <span style="color: #800080;">$Hour</span> <span style="color: #008080; font-style: italic;">-Minute</span> <span style="color: #800080;">$Minute</span> <span style="color: #008080; font-style: italic;">-Second</span> <span style="color: #800080;">$Second</span>
 <span style="color: #800000;">&quot;The current Internet time by $Server<span style="color: #008080; font-weight: bold;">`:</span> $InternetTime&quot;</span>
 <span style="color: #0000FF;">break</span>
 <span style="color: #000000;">&#125;</span>
 catch
 <span style="color: #000000;">&#123;</span> <span style="color: #800000;">&quot;No connection with $Server possible - lets try the next one.&quot;</span> <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000080;">$VerbosePreference</span> <span style="color: pink;">=</span> $OldVerbosePref</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://powershell-knowhow.de/powershell/?feed=rss2&#038;p=100</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

