<?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>Jeff Wouters&#039;s Blog</title>
	<atom:link href="http://jeffwouters.nl/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeffwouters.nl</link>
	<description>The Scripting Dutchman</description>
	<lastBuildDate>Thu, 23 May 2013 16:31:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>My future vision for datacenter management and cloud interchangeability</title>
		<link>http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/</link>
		<comments>http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/#comments</comments>
		<pubDate>Thu, 23 May 2013 16:31:23 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Future Vision]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1603</guid>
		<description><![CDATA[The last year I’ve been thinking about lots and lots of articles and blog posts I’ve read. All of them agree on one thing and that is that the future of the datacenter is a dynamic one. Most vendors already have solutions to accomplish this, so I would like to go one step beyond a [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/' data-shr_title='My+future+vision+for+datacenter+management+and+cloud+interchangeability'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/' data-shr_title='My+future+vision+for+datacenter+management+and+cloud+interchangeability'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/' data-shr_title='My+future+vision+for+datacenter+management+and+cloud+interchangeability'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The last year I’ve been thinking about lots and lots of articles and blog posts I’ve read. All of them agree on one thing and that is that the future of the datacenter is a dynamic one. Most vendors already have solutions to accomplish this, so I would like to go one step beyond a dynamic datacenter and theorize a little about datacenter or cloud interchangeability and more specifically about how open standards could make this possible.</p>
<p>Standards in hardware and software is something that has been in uprising ever since late last century. But if every vendor brings his own standards it is a benefit for the vendor itself but not so much for the entire industry.<br />
When the same open standards are used by multiple vendors it become interesting. Take CIM for example, which Microsoft has implemented in Windows Server 2012 and Windows 8. Some people think that CIM is a Microsoft thing, which it isn’t. CIM is an open standard and Microsoft decided to use this instead of inventing the wheel all over again. I know for a fact that some other vendors are already embracing CIM. To give a few names: Cisco, HP, EMC and Dell.<br />
So if other vendors would embrace and implement open standards such as CIM there would be a single management technology for managing everything. My personal preference would be to use PowerShell which already has CIM implemented in the form of the CIM cmdlets.</p>
<p>So think about it a little… using PowerShell to export your datacenter configuration and use that as the input for the configuration of a secondary datacenter, or hosted cloud for that matter.<br />
With PowerShell you could easily manipulate the data in whatever way you like so that, for example, you could use the hosted cloud solution as an extension of your own datacenter instead of a fallback or migration scenario.<br />
But what about different hardware? Well, that’s where the open standards come into play&#8230;</p>
<p>All of this would result in something like a private to hosted cloud migration script, a datacenter extension script, a script to configure new hardware based on the configuration of hardware you’ve already got running… automation to the max!</p>
<p>Of course there are more things that need to change. As an example the difference, or better yet the incompatibility of virtual hard disk formats, between hypervisor vendors… but that’s s whole other discussion&#8230; <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="shr-publisher-1603"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/' data-shr_title='My+future+vision+for+datacenter+management+and+cloud+interchangeability'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/' data-shr_title='My+future+vision+for+datacenter+management+and+cloud+interchangeability'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/' data-shr_title='My+future+vision+for+datacenter+management+and+cloud+interchangeability'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+My+future+vision+for+datacenter+management+and+cloud+interchangeability+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1603"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/05/my-future-vision-for-datacenter-management-and-cloud-interchangeability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Citrix Windows Mobile SDK</title>
		<link>http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/</link>
		<comments>http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/#comments</comments>
		<pubDate>Thu, 23 May 2013 00:11:13 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1600</guid>
		<description><![CDATA[As I am attending Citrix Synergy in Anaheim this week I&#8217;m hearing a lot of cool new stuff, both from Citrix and the 3rd party vendors which are located in the Expo hall. One of the announcements from Citrix in the keynote was about the Windows Mobile SDK by Citrix&#8230; but no one in the [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/' data-shr_title='Citrix+Windows+Mobile+SDK'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/' data-shr_title='Citrix+Windows+Mobile+SDK'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/' data-shr_title='Citrix+Windows+Mobile+SDK'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>As I am attending Citrix Synergy in Anaheim this week I&#8217;m hearing a lot of cool new stuff, both from Citrix and the 3rd party vendors which are located in the Expo hall. One of the announcements from Citrix in the keynote was about the Windows Mobile SDK by Citrix&#8230; but no one in the room applauded for this and I think that&#8217;s just plain crazy&#8230; so I decided to write this post.</p>
<p>The idea of the Citrix Windows Mobile SDK is that you write an application as you would write them for a normal desktop or terminal server. Instead of re-writing the application for a mobile device, simply publish the application through the Citrix product and it does the conversion of the interface to a mobile format for you! So no re-writing your code or doing some fancy checks to see which UI you&#8217;re to show depending on the device the app is shown on&#8230; that&#8217;s great, right?!<br />
&#8230; and none of the 6000+ people in the room applauded for this&#8230; (? wtf ?)</p>
<p>I don&#8217;t know anything your about the technical details of this, but the concept itself sounds just magically amazing <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<div class="shr-publisher-1600"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/' data-shr_title='Citrix+Windows+Mobile+SDK'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/' data-shr_title='Citrix+Windows+Mobile+SDK'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/' data-shr_title='Citrix+Windows+Mobile+SDK'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Citrix+Windows+Mobile+SDK+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1600"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/05/citrix-windows-mobile-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell function to check the property to an item</title>
		<link>http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/</link>
		<comments>http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/#comments</comments>
		<pubDate>Thu, 09 May 2013 11:29:22 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1591</guid>
		<description><![CDATA[Just now I received an email from PowerShell MVP Shay Levy stating that in my previous post I&#8217;m using somthing that doesn&#8217;t exist. He was totally right. I&#8217;m calling a Test-ItemProperty and indeed, no such cmdlet exists on a normal installation of the Windows operating system. That&#8217;s because it&#8217;s part of my personal toolkit&#8230; whoops! [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/' data-shr_title='PowerShell+function+to+check+the+property+to+an+item'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/' data-shr_title='PowerShell+function+to+check+the+property+to+an+item'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/' data-shr_title='PowerShell+function+to+check+the+property+to+an+item'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Just now I received an email from PowerShell MVP Shay Levy stating that in my previous post I&#8217;m using somthing that doesn&#8217;t exist.<br />
He was totally right.</p>
<p>I&#8217;m calling a Test-ItemProperty and indeed, no such cmdlet exists on a normal installation of the Windows operating system.<br />
That&#8217;s because it&#8217;s part of my personal toolkit&#8230; whoops!</p>
<p>So, here&#8217;s a small function to test if a property to an item even exists:</p>
<pre class="brush:powershell">function Test-ItemProperty ( [string] $Path, [string] $Name )
{
  if ( Test-Path $Path )
  {
    try
    {
      $ItemProperty = Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue
      if ( $ItemProperty -ne $null ) { return $true }
      else { return $false }
    }
    catch
    {
      return $false
    }
  }
  else { return $false }
}</pre>
<div class="shr-publisher-1591"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/' data-shr_title='PowerShell+function+to+check+the+property+to+an+item'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/' data-shr_title='PowerShell+function+to+check+the+property+to+an+item'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/' data-shr_title='PowerShell+function+to+check+the+property+to+an+item'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+function+to+check+the+property+to+an+item+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1591"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Enable and disable MSI logging through PowerShell</title>
		<link>http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/</link>
		<comments>http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/#comments</comments>
		<pubDate>Thu, 09 May 2013 10:09:21 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[App-V]]></category>
		<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1589</guid>
		<description><![CDATA[This morning I was contacted by an IT Pro asking me if I could write some PowerShell code to enable and disable MSI logging. He both wanted to use it from a command line and needed it to be part of a big troubleshooting script he&#8217;s working on; so reusable code. First up is a [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/' data-shr_title='Enable+and+disable+MSI+logging+through+PowerShell'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/' data-shr_title='Enable+and+disable+MSI+logging+through+PowerShell'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/' data-shr_title='Enable+and+disable+MSI+logging+through+PowerShell'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This morning I was contacted by an IT Pro asking me if I could write some PowerShell code to enable and disable MSI logging.<br />
He both wanted to use it from a command line and needed it to be part of a big troubleshooting script he&#8217;s working on; so reusable code.</p>
<p>First up is a function to enable the MSI logging:</p>
<pre class="brush:powershell">function Enable-MSILogging
{
  if((Test-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\Installer" -Name "Logging" ) -eq $False)
  {
    New-Item -Path "HKLM:\Software\Policies\Microsoft\Windows\Installer" -Force
  }
  Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\Installer" -Name "Logging" -Value "voicewarmupx" -Force
}</pre>
<p>Next is a function to disable the MSI logging:</p>
<pre class="brush:powershell">function Disable-MSILogging
{
  if(Test-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\Installer" -Name "Logging")
  {
    Remove-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\Installer" -Name "Logging" -Force
  }
}</pre>
<p>As you can see I&#8217;m simply using the registry to enable/disable it.<br />
I&#8217;m currently writing some other functions that I&#8217;ll post in the near future.</p>
<p><strong>Update: <a href="http://www.twitter.com/ShayLevy">Shay Levy</a> contacted me stating that I&#8217;m using Test-ItemProperty and that doesn&#8217;t exist. He&#8217;s correct since it&#8217;s part of my personal toolkit. So I&#8217;ve decided to share it with you <a href="http://jeffwouters.nl/index.php/2013/05/powershell-function-to-check-the-property-to-an-item">here</a>.</strong></p>
<div class="shr-publisher-1589"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/' data-shr_title='Enable+and+disable+MSI+logging+through+PowerShell'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/' data-shr_title='Enable+and+disable+MSI+logging+through+PowerShell'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/' data-shr_title='Enable+and+disable+MSI+logging+through+PowerShell'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Enable+and+disable+MSI+logging+through+PowerShell+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1589"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/05/enable-and-disable-msi-logging-through-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell &#8211; Is my NIC configured to register in DNS?</title>
		<link>http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/</link>
		<comments>http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/#comments</comments>
		<pubDate>Wed, 08 May 2013 09:08:34 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1587</guid>
		<description><![CDATA[Some time ago I got asked how one could find if a network interface card (NIC) is configured to register itself in DNS. In the GUI it&#8217;s a checkbox, a little hidden and you have to click a bit to find it. The intention was to do an inventory of the environment to see which [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/' data-shr_title='PowerShell+-+Is+my+NIC+configured+to+register+in+DNS%3F'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/' data-shr_title='PowerShell+-+Is+my+NIC+configured+to+register+in+DNS%3F'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/' data-shr_title='PowerShell+-+Is+my+NIC+configured+to+register+in+DNS%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Some time ago I got asked how one could find if a network interface card (NIC) is configured to register itself in DNS.<br />
In the GUI it&#8217;s a checkbox, a little hidden and you have to click a bit to find it.<br />
The intention was to do an inventory of the environment to see which servers were properly configured.</p>
<p>So, PowerShell to the resque yet again <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre class="brush:powershell">$NIC = Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object {$_.IPEnabled -eq "True"}
$NIC.FullDNSRegistrationEnabled</pre>
<p>This works for PowerShell v1 and v2 but in v3 you can do this with a simple oneliner:</p>
<pre class="brush:powershell">(Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object {$_.IPEnabled -eq "True"}).FullDNSRegistrationEnabled</pre>
<div class="shr-publisher-1587"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/' data-shr_title='PowerShell+-+Is+my+NIC+configured+to+register+in+DNS%3F'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/' data-shr_title='PowerShell+-+Is+my+NIC+configured+to+register+in+DNS%3F'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/' data-shr_title='PowerShell+-+Is+my+NIC+configured+to+register+in+DNS%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+%E2%80%93+Is+my+NIC+configured+to+register+in+DNS%3F+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1587"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/05/powershell-is-my-nic-configured-to-register-in-dns/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PowerShell Summit &#8211; Day 2</title>
		<link>http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/</link>
		<comments>http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 16:08:07 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1579</guid>
		<description><![CDATA[After a long day of PowerShell deep technical sessions and a nice dinner after, I woke up this morning and after heaving some breakfast someone came to me at my hotel. She was one of the two woman at the Summit. She asked me if I wanted a ride to the Summit and because Ed [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/' data-shr_title='PowerShell+Summit+-+Day+2'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/' data-shr_title='PowerShell+Summit+-+Day+2'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/' data-shr_title='PowerShell+Summit+-+Day+2'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>After a long day of PowerShell deep technical sessions and a nice dinner after, I woke up this morning and after heaving some breakfast someone came to me at my hotel. She was one of the two woman at the Summit. She asked me if I wanted a ride to the Summit and because Ed and Theresa Wilson drove me around the entire week, I was about to decline her offer&#8230; until she mentioned she drove a Mustang! So the way towards the Summit we &#8216;accidentally&#8217; took a wrong turn, just so that we could do a 180 <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>Arrived at the Summit the sessions began. First up was Ed Wilson, this time about PoSHMon which basically involves PowerShell working with performance monitors. A great session as always when Ed takes the stage but this time with lots and lots of resources mentioned. Very useful and practical resources to be precise!</p>
<p>After a short break it was time for Steve Lee to takes the stage. His session was all about Standards-based hardware management. Just think about what it would be like to simply change hardware settings from a PowerShell prompt throughout your environment and don&#8217;t think a that this would be limited to Windows devices&#8230; Cool stuff, right?!</p>
<p>And then there was  Richard Siddaway again, this time about the PowerShell Web Access. Now the way Richard presents at this event is very appealing to me, deep technical and very fast paced <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Richard showed us how you can delegate tasks in the PowerShell Web Access without providing people too much rights. So just give them the rights they need to perform their tasks, nothing more. Need to expand on their rights? That&#8217;s ac tally a lot easier than you might think&#8230;</p>
<p>Advanced Networking Scripting with Windows PowerShell by Lee Holmes was the next mindboggling session. Using a simple Invoke-WebRequest to a website is done unencrypted but very easy to do. But using WinRM is encrypted and a little bit harder. The point being here that WinRM is used for remote management and there for must be secure. Doing that insecure is not something desirable. Lee has shown us much, much more cool and very interesting stuff and to me personally his session explained why Microsoft does some things in PowerShell that seemed a little strange to me. There are actually darn good reasons why they do it the way they do&#8230; I always suspected something like it, but now I know for sure and their motivations behind the choices.</p>
<p>Grading 5000 scripts during the Scripting Games will teach you some things. Both some very creative solutions but also things a lot of beginners encounter and do it wrong. This was the subject of Ed Wilson&#8217;s session. One of his major points was to PIPE TO THE LEFT!! Guess what&#8230; that&#8217;s also covered in my chapter for the PowerShell Deep Dives book. It may not be a very deep technical subject but I see everybody from beginner to advanced scripted totally forget about it and using the Where-Object approach where it isn&#8217;t needed.</p>
<p>Some time ago I had the pleasure to be included in a mailing about passwords in scripts to use for providing alternate credentials. Do you save passwords hardcoded in your scripts, do you save them in a file as a secure string or do you prompt the user for credentials where the user needs to know the username+password? Or do you have a 3rd party solution to cover this? This gave a very nice discussion which was the whole purpose of the session&#8230; to discuss this and get or provide alternate views on this challenge.</p>
<p>After this we went out to dinner again but this time the group grew a little&#8230; it was about 40+ PowerShell folk <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<div class="shr-publisher-1579"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/' data-shr_title='PowerShell+Summit+-+Day+2'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/' data-shr_title='PowerShell+Summit+-+Day+2'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/' data-shr_title='PowerShell+Summit+-+Day+2'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+Summit+%E2%80%93+Day+2+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1579"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Summit &#8211; Day 1</title>
		<link>http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/</link>
		<comments>http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 16:40:30 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1576</guid>
		<description><![CDATA[Dear diary, Well, I hoped I managed in scaring you with that one. Don&#8217;t worry, this won&#8217;t be a diary but a description of the first day of my visit to the PowerShell Summit 2013 held at Microsoft Corporate in Redmond (Washington state). The day started for me with a breakfast together with Jeffery Snover. Because [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/' data-shr_title='PowerShell+Summit+-+Day+1'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/' data-shr_title='PowerShell+Summit+-+Day+1'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/' data-shr_title='PowerShell+Summit+-+Day+1'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Dear diary,</p>
<p>Well, I hoped I managed in scaring you with that one. Don&#8217;t worry, this won&#8217;t be a diary but a description of the first day of my visit to the PowerShell Summit 2013 held at Microsoft Corporate in Redmond (Washington state).<br />
The day started for me with a breakfast together with Jeffery Snover. Because I knew that I was going to be at Microsoft Corp I dropped him an email asking if he would have time for a small meet &#8216;n greet. So I was very happily surprised that he actually replied and told me that we would be able to find a small gap in his calendar. So of course he wasn&#8217;t able to tell my anything about the future of PowerShell or anything like that but I still found it to be very interesting to meet him and to pick his brain as far as that was possible without there being a risk of him telling me something he wasn&#8217;t supposed to. So we talked about the Monad Manifest, my MVP award and a whole bunch of other stuff.</p>
<p>After the breakfast we went to back to the event because the sessions were starting. The first was by Ed Wilson (The Microsoft Scripting Guy) where he was talking about writing modules instead of scripts, why you should do that and  how easy it actually is&#8230;<br />
Next up was Richard Siddaway about CIM sessions. Now this session was a perfect example why this event is not for newbies at PowerShell. It was high technical, very fast paced and just amazing to see Richard live in action.<br />
The third session I attended was by Jeff Hicks. He was talking about creating some very &#8216;manager friendly&#8217; HTML reports through PowerShell where he was not only using HTML but also CSS for the make-up of the report. A very interesting session because he basically showed a way to create some amazing HTML reports by combining PowerShell, HTML, CSS and JavaScript.</p>
<p>Next there was a very kind PFE from Microsoft that was also attending the event that was planning on visiting the Microsoft store in Bellevue to replace his keypad of his Surface device. Well, one of the things I wanted to do while I am here is to get myself a Surface RT device. Why a RT and not a Pro? That&#8217;s a subject for another post&#8230;<br />
So we drove to the Microsoft store and guess what&#8230; I&#8217;m typing this post on my new toy!</p>
<p>When we got back I attended one other session. This one was by Alessandra Nikolai about PowerShell workflow&#8230; a great new feature which I&#8217;ve blogged about on the Hey! Scripting Guy blog. Aleksandar did an amazing job and yet again I was just taking the information provided in a session like a sponge <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>At the end of the day I went with a group to get some dinner&#8230; just a little group, about 27 people <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>I hope that I&#8217;ve been able to give you an idea on what you&#8217;re missing and that I have motivated you to attend the event next year. If you&#8217;re still in doubt than read my blog post that I&#8217;ll be posting tomorrow about day nr. 2 <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<div class="shr-publisher-1576"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/' data-shr_title='PowerShell+Summit+-+Day+1'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/' data-shr_title='PowerShell+Summit+-+Day+1'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/' data-shr_title='PowerShell+Summit+-+Day+1'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+Summit+%E2%80%93+Day+1+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1576"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/04/powershell-summit-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Summit &#8211; Flight to Seattle and playing tourist</title>
		<link>http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/</link>
		<comments>http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 13:05:45 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1572</guid>
		<description><![CDATA[Although the event itself and the two days before I’ve used to play tourist were wonderful, the flight itself from Amsterdam to Seattle was terrible. It’s a long story so let me start at the beginning. Checking in for my flight I woke up at 05:00 in which is actually only an hour earlier compared [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/' data-shr_title='PowerShell+Summit+-+Flight+to+Seattle+and+playing+tourist'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/' data-shr_title='PowerShell+Summit+-+Flight+to+Seattle+and+playing+tourist'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/' data-shr_title='PowerShell+Summit+-+Flight+to+Seattle+and+playing+tourist'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Although the event itself and the two days before I’ve used to play tourist were wonderful, the flight itself from Amsterdam to Seattle was terrible. It’s a long story so let me start at the beginning.</p>
<p><b>Checking in for my flight</b><br />
I woke up at 05:00 in which is actually only an hour earlier compared to what I’m used to. So I grabbed my bags, got in my car and drove to Schiphol (the airport). I parked there and went to check-in for my flight. Well, this is where the problems started…<br />
Note: I was there at 06:15 where my flight was to leave at 10:35… so I was there more than 4 hours in advance!</p>
<p>First there was an issue with my ticket… it seemed that I wasn’t in their system. So after standing in the waiting line for about 45 minutes they referred me to the ticket service desk and you’ve guessed it, it also had a waiting line. So after about 30 minutes I was up.<br />
It took them a little investigating but they told me that my ticket hadn’t been paid. Since I’ve booked the ticket myself I knew that wasn’t true. So I’ve booted up my laptop and showed her the confirmation I’ve received by email. The woman picked up her phone and started calling ‘a higher authority’ or whatever. It took them 10 minutes to find out that I did pay the ticket (no shit, Sherlock!) and that something in their system had gone wrong. She corrected it and was processing the ticket… just until the next problem arose…</p>
<p><strong>ESTA</strong><br />
Secondly there was a little thing called an ‘ESTA’ form. You either have to have one of those OR a visum to get into the USA. I’ve experienced this issue last year when I went to the USA for the first time to present at an event called BriForum in Chicago. Back then I had to request an ESTA for on the spot and to get an ESTA form you’ll need a credit card. Guess what, I didn’t had a credit card at that time (was able to go without one quite well actually).<br />
So this time I simply took the proof that I’ve requested an ESTA before with me on my laptop and because those things are valid for 2 years I wasn’t expecting a problem.<br />
Basically she told me that the system told her that I did not have a valid ESTA form so I had to request a new one… I took a desk a few meters next to her and opened my laptop and while using the airport free wifi I’ve request an ESTA form…again…<br />
It took me about 10 minutes to fill in the paperwork online and rather quickly the website told me that my request had been approved.<br />
Me back at the woman and she ckecking in her system that the ESTA had been approved, and it was.</p>
<p><strong>No reservation so flight was full</strong><br />
Alright, that should be it J No…! “I’m sorry sir but the flight is full.”<br />
I’ll spare you the things I was thinking at that time but I know that making a scene would only give me more problems. So very calmly my reply was: “So I’ve booked my flight, because <i>your</i> system had made a mistake the payment wasn’t linked to my ticket and therefor the reservation wasn’t made in <i>your</i> system although I did get a confirmation by email. How are you going to solve my problem?”</p>
<p>So what basically happened was that I was upgraded to business class at no extra costs <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Playing tourist</strong><br />
The flight itself was good, no problems whatsoever. So when I got the Seattle Tacoma Airport I had to wait a few minutes for @scriptingguys and @scriptingwife to arrive so we could hang out together, since we’re staying at the same hotel.<br />
We’ve been to the space needle, something you just can’t miss if you’re ever in Seattle. Knowing I’m not so crazy about heights, the elevator from the ground floor all the way up was something I’ve done with my eyes closed… and you can take that literally <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Ed Wilson had the great idea to visit the Science museum which, as it seems, is right next to the space needle <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
They’ve got an horror exposition… the had things from the ‘book of shadows’ from the television serie Buffy The Vampire Slayer up to vampires and gremlins to a video about Alfred Hitchkock and his impact on the whole movie scene and a beautiful timeline of horror movies dating back from 1967 till 2011.</p>
<p>After all of this we were tired so left for the hotel to check in. Next was finding a place to eat.<br />
We’ve noticed that people on Seattle really like going out for dinner… like the first four places we went to were totally packed already. So we’ve finally found a place Ed and Theresa knew about were I got my first American burger ever… gotta love those burgers <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Well, that was it for the first day. Stay tuned, I’ll be posting more about the next few days as I find time to do so.</p>
<div class="shr-publisher-1572"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/' data-shr_title='PowerShell+Summit+-+Flight+to+Seattle+and+playing+tourist'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/' data-shr_title='PowerShell+Summit+-+Flight+to+Seattle+and+playing+tourist'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/' data-shr_title='PowerShell+Summit+-+Flight+to+Seattle+and+playing+tourist'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+Summit+%E2%80%93+Flight+to+Seattle+and+playing+tourist+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1572"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/04/powershell-summit-flight-to-seattle-and-playing-tourist/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>2013 Microsoft PowerShell MVP</title>
		<link>http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/</link>
		<comments>http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 17:11:11 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1568</guid>
		<description><![CDATA[Yes, today I got the email stating that I&#8217;m an MVP on PowerShell&#8230;. But it&#8217;s the 1th of April. So it took me a few minutes to verify this&#8230; I am happy to announce that the email was genuine: I&#8217;m a 2013 PowerShell MVP There are so many people to thank that I can&#8217;t name them [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/' data-shr_title='2013+Microsoft+PowerShell+MVP'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/' data-shr_title='2013+Microsoft+PowerShell+MVP'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/' data-shr_title='2013+Microsoft+PowerShell+MVP'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Yes, today I got the email stating that I&#8217;m an MVP on PowerShell&#8230;. But it&#8217;s the 1th of April. So it took me a few minutes to verify this&#8230;</p>
<p>I am happy to announce that the email was genuine: I&#8217;m a 2013 PowerShell MVP <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2013/04/Microsoft_MVP.png"><img class="alignnone size-thumbnail wp-image-1567" alt="Microsoft_MVP" src="http://jeffwouters.nl/wp-content/uploads/2013/04/Microsoft_MVP-150x150.png" width="150" height="150" /></a></p>
<p>There are so many people to thank that I can&#8217;t name them all, but I would like to name a few in particular&#8230;<br />
I know, it&#8217;s a cliché but still valid and since I&#8217;m not a drama queen there will be no tears or thanking my mother/cat/dog/hamster/goldfish <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>First is Don Jones, PowerShell MVP. When Powershell v1 came out I looked at it and though &#8216;that is funny but I can do WAY more with vb-script!&#8217;. So I never looked at PowerShell again&#8230; untill 2010.<br />
Back in 2010 Don presented on the Microsoft TechDays in The Netherlands, one session about Managing AD with PowerShell and the other about PowerShell Remoting.<br />
Since there were no competing sessions I was interrested in, I came to Don&#8217;s sessions and man were those eye openers!<br />
Immediatly I saw the potential and possible improvements (of which a bunch got into PS3.0 by the way but that had nothing to do with me) and got learning.<br />
Only after playing around with PowerShell for more than a year I read Don&#8217;s Learn PowerShell in a Month of Lunches book. In the year before I read the book, I simply dove in TechNet, CodePlex and Get-Help.<br />
So, getting back at the point I was trying to make here: It&#8217;s Don&#8217;s fault! He is the cause of me getting into PowerShell!!!</p>
<p>Second, but never in place, there are the two Dutch IT Professional Evangelists in The Netherlands: Daniel van Soest and Tony Krijnen.<br />
Back when I just came out of school I encountered them within two months because of the so called &#8216;Speaker Idol&#8217;. At school I was pretty good at presenting so here I was, overcontident and ready to conquer the world.<br />
Boy, was I surprised and slaped down back to earth. Not by Tony or Daniel but simply by watching other, more experienced speakers. Instead of letting this get me down, it showed me where I wanted to be in a few years&#8230; it was letting me set a goal. A few years later I was given the change, by pure dumb luck, to blog at the Dutch IT Professional blog from Microsoft, which was one of Tony&#8217;s and Daniel&#8217;s projects.<br />
Over the years both Tony and Daniel have given me lots of advice, both on technical and personal/speaking level. I think that a lot of where I am today is for a big part thanks to them.<br />
Not that I wouldn&#8217;t have gotten here without them, only much slower <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Now we get to another Dutch guy: Sander Berkouwer, Directory Services MVP, whom contacted me because one of the speakers for an event had to cancel pretty darn last-minute and so he asked me to step in. This was my first time speaking and at this point the  Dutch saying &#8216;het hek van de dam&#8217; comes into play. I tasted the stage and loved it! So Sander, thank you.. and good luck getting rid of me now <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Gideon&#8230;. Gideon is the guy behind my scenes. No-one knows him because he&#8217;s retired, a total n00b when it comes to IT but a genius when it comes to training, presenting, communications and neuro-linguistic programming.<br />
Let&#8217;s just keep it that when I started to present I WAS TERRIBLE AT IT! I&#8217;ve seen the tapes so you can trust me on this <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
I still ask myself sometimes why people didn&#8217;t pull me off stage. A few of them told me that they say some potential, others just like seeïng people grow, etc. Whatever the reasons, I&#8217;m happy that they didn&#8217;t <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Over the years I&#8217;ve worked with Gideon to improve my presenting skills, get rid of my stagefright (yet&#8230; i know&#8230;) and much more.</p>
<p>Melle Gloerich used to be the Communicy Manager at NGN (a Dutch IT Professional Community) and he has steered me along the path I&#8217;ve walked. Although he as recently left the NGN, I would still like to thank him for his patience and the opportunities he have me.</p>
<p>Jaap Wesselius, Exchange MVP, has reviewed a few articles of mine when I just started blogging. Although I haven&#8217;t needed his help for a long time now, I still like to thank him in particular because he was there at the beginning and put me on a road. Later on I realised that another road would suit me better, but nevertheless he still helped me at the beginning to which I am grateful.</p>
<p>And now &#8216;my Hyper-V homies&#8217; Didier van Hoye and Aidan Finn, both Hyper-V MVP, for asking lots of PowerShell questions. Both guys have very good technical skills and although PowerShell isn&#8217;t their focus area, they&#8217;re skills with it are above-average <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  So most of the times whenever I received a question from them, it wasn&#8217;t a RTFM-question, which I love! I love to search, investigate, etc <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  So guys, thanks and keep them coming!</p>
<p>And last but never least this one is not person specific, I would also like to thank all the members of the Dutch PowerShell User Group (DuPSUG) for making the Dutch PowerShell comunity great and empowering my enthusiasm even more.</p>
<div class="shr-publisher-1568"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/' data-shr_title='2013+Microsoft+PowerShell+MVP'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/' data-shr_title='2013+Microsoft+PowerShell+MVP'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/' data-shr_title='2013+Microsoft+PowerShell+MVP'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+2013+Microsoft+PowerShell+MVP+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1568"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/04/2013-microsoft-powershell-mvp/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>When is the next Patch Tuesday?</title>
		<link>http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/</link>
		<comments>http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 12:48:37 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[WSUS]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1562</guid>
		<description><![CDATA[This is a question I&#8217;ve just received from one of my customers. So, you can calculate this by using PowerShell my using this script. For your convenience, these are the dates for each Patch Tuesday in 2013: Tuesday 9 April 2013 Tuesday 14 May 2013 Tuesday 11 June 2013 Tuesday 9 July 2013 Tuesday 13 [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/' data-shr_title='When+is+the+next+Patch+Tuesday%3F'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/' data-shr_title='When+is+the+next+Patch+Tuesday%3F'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/' data-shr_title='When+is+the+next+Patch+Tuesday%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This is a question I&#8217;ve just received from one of my customers.<br />
So, you can calculate this by using PowerShell my using <a href="http://richardspowershellblog.wordpress.com/2009/11/14/patch-tuesday">this script</a>.</p>
<p>For your convenience, these are the dates for each Patch Tuesday in 2013:<br />
<em>Tuesday 9 April 2013<br />
Tuesday 14 May 2013<br />
Tuesday 11 June 2013<br />
Tuesday 9 July 2013<br />
Tuesday 13 August 2013<br />
Tuesday 10 September 2013<br />
Tuesday 8 October 2013<br />
Tuesday 12 November 2013<br />
Tuesday 10 December 2013</em></p>
<p>And these are for 2014:<br />
<em>Tuesday 14 January 2014<br />
Tuesday 11 February <em>2014</em><br />
Tuesday 11 March <em>2014</em><br />
Tuesday 8 April <em>2014</em><br />
Tuesday 13 May <em>2014</em><br />
Tuesday 10 June <em>2014</em><br />
Tuesday 8 July <em>2014</em><br />
Tuesday 12 August <em>2014</em><br />
Tuesday 9 September <em>2014</em><br />
Tuesday 14 October <em>2014</em><br />
Tuesday 11 November <em>2014</em><br />
Tuesday 9 December <em>2014</em></em></p>
<p>And these are for 2015:<br />
<em>Tuesday 13 January 2015<br />
Tuesday 10 February <em>2015</em><br />
Tuesday 10 March <em>2015</em><br />
Tuesday 14 April <em>2015</em><br />
Tuesday 12 May <em>2015</em><br />
Tuesday 9 June <em>2015</em><br />
Tuesday 14 July <em>2015</em><br />
Tuesday 11 August <em>2015</em><br />
Tuesday 8 September <em>2015</em><br />
Tuesday 13 October <em>2015</em><br />
Tuesday 10 November <em>2015</em><br />
Tuesday 8 December <em>2015</em></em></p>
<div class="shr-publisher-1562"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/' data-shr_title='When+is+the+next+Patch+Tuesday%3F'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/' data-shr_title='When+is+the+next+Patch+Tuesday%3F'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/' data-shr_title='When+is+the+next+Patch+Tuesday%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+When+is+the+next+Patch+Tuesday%3F+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1562"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/03/when-is-the-next-patch-tuesday/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>I’ll be speaking at the Danish PowerShell User Group in May 2013</title>
		<link>http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/</link>
		<comments>http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/#comments</comments>
		<pubDate>Fri, 22 Mar 2013 14:11:15 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1548</guid>
		<description><![CDATA[A few hours ago I&#8217;ve posted that I&#8217;ll be speaking at E2E VC in Copenhagen. Well, since I&#8217;m there I though about speaking at the local PowerShell User Group so I contacted Claus Nielsen to see if he would be interrested in having me to speak there. And he was&#8230; So, the subject? Remotely managing your [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+Danish+PowerShell+User+Group+in+May+2013'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+Danish+PowerShell+User+Group+in+May+2013'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+Danish+PowerShell+User+Group+in+May+2013'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>A few hours ago I&#8217;ve posted that I&#8217;ll be speaking at E2E VC in Copenhagen.<br />
Well, since I&#8217;m there I though about speaking at the local PowerShell User Group so I contacted <a href="http://www.twitter.com/claustn">Claus Nielsen</a> to see if he would be interrested in having me to speak there.<br />
And he was&#8230;</p>
<p>So, the subject? Remotely managing your Windows devices through PowerShell. PowerShell Remoting, WMI, CIM, registry&#8230; the whole shebang <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /><br />
* Yes, I&#8217;m going to have a blast <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  *</p>
<p>And on a personal note, this is me being announced in Danish:</p>
<pre class="brush:plain">Jeg ved godt vi har været meget sløve med information på det sidste, og dette skyldes for en stor dels vedkommende mig, at jeg har haft rigtigt travlt med familie og arbejde.
Det er begyndt at se lidt lysere ud, så håber på folk stadigt er klar til nogle PowerShell usergroup møder.
Jeg har arrangeret at få Jeff Wouters herop, Jeff er en hollandsk PowerShell specialist, han kommer den 29 Maj, hvor han vil holde
en session, om et endnu ikke specificeret emne, så sæt kryds i kalenderen der. (Han er rigtig dygtig)
Yderligere håber vi at kunne få klemt et gå hjem møde ind, inden den 29 Maj også, mere info omkring begge arrangementer følger.</pre>
<p>Because I don&#8217;t speak Danish the session will be given in English and so here&#8217;s the English translation:</p>
<pre class="brush:plain">I know we've been very blunt with information in the past, and this is due in large part to me that I've been really busy with family and work.
It's beginning to look a little brighter, so hope people still are ready for some PowerShell User Group meetings.
I have arranged to have Jeff Wouters here, Jeff is a Dutch PowerShell specialist, he comes May 29, where he will hold a session on a
not yet specified topic, so mark your calendar there. (He is really good)
Further, we hope to get pinched a home meeting in before May 29 also, more info about both events follows.</pre>
<div class="shr-publisher-1548"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+Danish+PowerShell+User+Group+in+May+2013'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+Danish+PowerShell+User+Group+in+May+2013'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+Danish+PowerShell+User+Group+in+May+2013'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+I%E2%80%99ll+be+speaking+at+the+Danish+PowerShell+User+Group+in+May+2013+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1548"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-danish-powershell-user-group-in-june-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I’ll be speaking at the E2EVC Copenhagen in June of 2013</title>
		<link>http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/</link>
		<comments>http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/#comments</comments>
		<pubDate>Fri, 22 Mar 2013 10:58:55 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1550</guid>
		<description><![CDATA[Experts 2 Experts Virtualization Conference (E2E VC) is the only event I want to visit ever since the first time I went to it back when it was held in London. VMWare, Microsoft, Citrix, AppSense, RES, Splunk, Whiptail and many more&#8230; products from all vendors are presented about by the vendors but most importantly, also [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+E2EVC+Copenhagen+in+June+of+2013'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+E2EVC+Copenhagen+in+June+of+2013'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+E2EVC+Copenhagen+in+June+of+2013'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://www.e2evc.com/home/">Experts 2 Experts Virtualization Conference</a> (E2E VC) is the only event I want to visit ever since the first time I went to it back when it was held in London.<br />
VMWare, Microsoft, Citrix, AppSense, RES, Splunk, Whiptail and many more&#8230; products from all vendors are presented about by the vendors but most importantly, also by community experts!</p>
<p>Next to the fact that it has very diverse content, the people their are always very open to new visitors and if you&#8217;re into technology you&#8217;ll feel right at home.<br />
It is also an event were speakers/presenters aren&#8217;t trusted by default. Attendees will challenge the speakers, discuss their statements, provide them with their own opinions and findings.<br />
This provides for great discussions inside and outside the session rooms.</p>
<p>I also have a personal connection to E2E VC&#8230; it is the first international event I&#8217;ve presented on.</p>
<p>Last time E2E VC was held in Hamburg and did not present that time.<br />
So this time the event is in Copenhagen and I&#8217;ve found <a href="http://www.twitter.com/e2evc">Alex </a>generous enough to provide me with a time slot to do a little session about PowerShell remote management. I&#8217;ll focus on why you should manage your systems with CIM instead of WMI and why the first is an improvement above the latter.<br />
<em>Note: The title on the website is &#8216;Management through PowerShell&#8217;.</em></p>
<p>Hope to see you there!</p>
<div class="shr-publisher-1550"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+E2EVC+Copenhagen+in+June+of+2013'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+E2EVC+Copenhagen+in+June+of+2013'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/' data-shr_title='I%E2%80%99ll+be+speaking+at+the+E2EVC+Copenhagen+in+June+of+2013'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+I%E2%80%99ll+be+speaking+at+the+E2EVC+Copenhagen+in+June+of+2013+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1550"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-e2evc-copenhagen-in-june-of-2013/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Make a Service Pack permanent by removing the installation files</title>
		<link>http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/</link>
		<comments>http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 08:46:12 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[WSUS]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1543</guid>
		<description><![CDATA[Note that this is not something I would recommend in a production environment! But, for example, in a demo environment this can be useful to save some disk space So, whenever you&#8217;ve installed a Service Pack to a Windows OS (w2k8 R2 or higher) some installation files are left behind. This is so that you [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/' data-shr_title='Make+a+Service+Pack+permanent+by+removing+the+installation+files'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/' data-shr_title='Make+a+Service+Pack+permanent+by+removing+the+installation+files'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/' data-shr_title='Make+a+Service+Pack+permanent+by+removing+the+installation+files'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Note that this is not something I would recommend in a production environment!<br />
But, for example, in a demo environment this can be useful to save some disk space <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So, whenever you&#8217;ve installed a Service Pack to a Windows OS (w2k8 R2 or higher) some installation files are left behind. This is so that you can remove it. So when you remove these installation files, you can&#8217;t turn back (without a backup of course&#8230;).<br />
You can use the DISM tool to remove the Service Pack installation files and with that make the Service Pack installation permanent:</p>
<pre class="brush:powershell">dism /online /cleanup-image /spsuperseded</pre>
<div class="shr-publisher-1543"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/' data-shr_title='Make+a+Service+Pack+permanent+by+removing+the+installation+files'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/' data-shr_title='Make+a+Service+Pack+permanent+by+removing+the+installation+files'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/' data-shr_title='Make+a+Service+Pack+permanent+by+removing+the+installation+files'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Make+a+Service+Pack+permanent+by+removing+the+installation+files+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1543"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/03/make-a-service-pack-permanent-by-removing-the-installation-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell &#8211; Remove the WSUS client settings from the registry</title>
		<link>http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/</link>
		<comments>http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/#comments</comments>
		<pubDate>Mon, 11 Mar 2013 14:25:21 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[WSUS]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1535</guid>
		<description><![CDATA[Whenever you&#8217;ve configured WSUS client settings on a Windows device, you can only remove those settings by using Group Policy by setting them to &#8216;disabled&#8217; or by removing the registry settings from the client. In my situation I&#8217;ve chosen to use PowerShell to accomplish this task: Stop-Service wuauserv Remove-Item -Path 'HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\*' -recurse -force Start-Service wuauserv [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/' data-shr_title='PowerShell+-+Remove+the+WSUS+client+settings+from+the+registry'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/' data-shr_title='PowerShell+-+Remove+the+WSUS+client+settings+from+the+registry'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/' data-shr_title='PowerShell+-+Remove+the+WSUS+client+settings+from+the+registry'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Whenever you&#8217;ve configured WSUS client settings on a Windows device, you can only remove those settings by using Group Policy by setting them to &#8216;disabled&#8217; or by removing the registry settings from the client.<br />
In my situation I&#8217;ve chosen to use PowerShell to accomplish this task:</p>
<pre class="brush:powershell">Stop-Service wuauserv
Remove-Item -Path 'HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\*' -recurse -force
Start-Service wuauserv</pre>
<p>After this, delete the clients manually from the WSUS management console and you&#8217;re done <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Now the client will revert back to using the online Windows Updates from Microsoft instead of your WSUS infrastructure.</p>
<p><em>Note: Make sure the settings to configure the WSUS client to use your WSUS infrastructure are not applied anymore before executing the script!</em></p>
<div class="shr-publisher-1535"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/' data-shr_title='PowerShell+-+Remove+the+WSUS+client+settings+from+the+registry'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/' data-shr_title='PowerShell+-+Remove+the+WSUS+client+settings+from+the+registry'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/' data-shr_title='PowerShell+-+Remove+the+WSUS+client+settings+from+the+registry'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+%E2%80%93+Remove+the+WSUS+client+settings+from+the+registry+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1535"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/03/powershell-remove-the-wsus-client-settings-from-the-registry/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PowerShell &#8211; Find the name and time of the last logged on user</title>
		<link>http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/</link>
		<comments>http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/#comments</comments>
		<pubDate>Wed, 06 Mar 2013 10:31:46 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1532</guid>
		<description><![CDATA[This one goes on the category of crazy-oneliners. After I finished writing it I looked back and saw just how crazy huge it was&#8230; Nevertheless, I still like to share: Get-WmiObject -Class Win32_NetworkLoginProfile &#124; Sort-Object -Property LastLogon -Descending &#124; Select-Object -Property * -First 1 &#124; Where-Object {$_.LastLogon -match "(\d{14})"} &#124; Foreach-Object { New-Object PSObject -Property [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/' data-shr_title='PowerShell+-+Find+the+name+and+time+of+the+last+logged+on+user'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/' data-shr_title='PowerShell+-+Find+the+name+and+time+of+the+last+logged+on+user'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/' data-shr_title='PowerShell+-+Find+the+name+and+time+of+the+last+logged+on+user'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This one goes on the category of crazy-oneliners.<br />
After I finished writing it I looked back and saw just how crazy huge it was&#8230;<br />
Nevertheless, I still like to share:</p>
<pre class="brush:powershell">Get-WmiObject -Class Win32_NetworkLoginProfile | 
Sort-Object -Property LastLogon -Descending | 
Select-Object -Property * -First 1 | 
Where-Object {$_.LastLogon -match "(\d{14})"} | 
Foreach-Object { New-Object PSObject -Property @{ Name=$_.Name;LastLogon=[datetime]::ParseExact($matches[0], "yyyyMMddHHmmss", $null)}}</pre>
<div class="shr-publisher-1532"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/' data-shr_title='PowerShell+-+Find+the+name+and+time+of+the+last+logged+on+user'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/' data-shr_title='PowerShell+-+Find+the+name+and+time+of+the+last+logged+on+user'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/' data-shr_title='PowerShell+-+Find+the+name+and+time+of+the+last+logged+on+user'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+%E2%80%93+Find+the+name+and+time+of+the+last+logged+on+user+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1532"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/03/powershell-find-the-name-and-time-of-the-last-logged-on-user/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Find all Organizational Units with GPO Inheritance blocked</title>
		<link>http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/</link>
		<comments>http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/#comments</comments>
		<pubDate>Tue, 05 Mar 2013 14:22:03 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1526</guid>
		<description><![CDATA[&#8230; of course you can do this by clicking around, but I found that using PowerShell is a lot easier in a large environment: Get-ADOrganizationalUnit -Filter * &#124; Get-GPInheritance &#124; Where-Object {$_.GPOInheritanceBlocked}]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/' data-shr_title='Find+all+Organizational+Units+with+GPO+Inheritance+blocked'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/' data-shr_title='Find+all+Organizational+Units+with+GPO+Inheritance+blocked'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/' data-shr_title='Find+all+Organizational+Units+with+GPO+Inheritance+blocked'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>&#8230; of course you can do this by clicking around, but I found that using PowerShell is a lot easier in a large environment:</p>
<pre class="brush:powershell">Get-ADOrganizationalUnit -Filter * | Get-GPInheritance | Where-Object {$_.GPOInheritanceBlocked}</pre>
<div class="shr-publisher-1526"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/' data-shr_title='Find+all+Organizational+Units+with+GPO+Inheritance+blocked'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/' data-shr_title='Find+all+Organizational+Units+with+GPO+Inheritance+blocked'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/' data-shr_title='Find+all+Organizational+Units+with+GPO+Inheritance+blocked'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Find+all+Organizational+Units+with+GPO+Inheritance+blocked+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1526"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/03/find-all-organizational-units-with-gpo-inheritance-blocked/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I&#8217;ll be speaking at the Mississippi PowerShell User Group in November 2013</title>
		<link>http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/</link>
		<comments>http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/#comments</comments>
		<pubDate>Mon, 04 Mar 2013 12:59:04 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1522</guid>
		<description><![CDATA[For the ones that just saw my timeline on Twitter/Facebook I&#8217;ve got a little announcement: I&#8217;ll be speaking at the Mississippi PowerShell User Group in November of 2013. This will be an online meeting. Mike Robbins, one of the members of the UG, has created a pretty impressive line-up of speakers in 2013. Want to [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/' data-shr_title='I%27ll+be+speaking+at+the+Mississippi+PowerShell+User+Group+in+November+2013'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/' data-shr_title='I%27ll+be+speaking+at+the+Mississippi+PowerShell+User+Group+in+November+2013'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/' data-shr_title='I%27ll+be+speaking+at+the+Mississippi+PowerShell+User+Group+in+November+2013'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>For the ones that just saw my timeline on <a href="http://www.twitter.com/jeffwouters">Twitter</a>/<a href="http://www.facebook.com/jeffwouters">Facebook </a>I&#8217;ve got a little announcement:<br />
<em>I&#8217;ll be speaking at the <a href="http://mspsug.com">Mississippi PowerShell User Group</a> in November of 2013.</em><br />
This will be an online meeting.</p>
<p>Mike Robbins, one of the members of the UG, has created a pretty impressive line-up of speakers in 2013.<br />
Want to know why? Look<a href="http://mspsug.com/2013/02/27/mississippi-powershell-user-group-speaker-lineup-for-2013"> here at the website of MSPSUG</a> or for your convenience:</p>
<p>The Mississippi PowerShell User Group meetings are held online on the second Tuesday of the Month at 8:30pm CST (Central Standard Time). Here’s the speaker lineup for 2013:</p>
<p><a href="http://www.eventbrite.com/event/5638643334" target="_blank">March 12th</a> – <a href="http://mikefrobbins.com/" target="_blank">Mike F Robbins</a></p>
<p>April 9th – <a href="https://twitter.com/magicrohn" target="_blank">Rohn Edwards</a></p>
<p>May 14th – <a href="http://donjones.com/" target="_blank">Don Jones</a></p>
<p>June 11th - <a href="http://jdhitsolutions.com/blog/" target="_blank">Jeffery Hicks</a></p>
<p>July 9th - <a href="http://blogs.technet.com/b/ashleymcglone/" target="_blank">Ashley McGlone</a></p>
<p>August 13th – <a href="http://www.interfacett.com/instructors/jason-helmick" target="_blank">Jason Helmick</a></p>
<p>September 10th – <a href="http://learn-powershell.net/" target="_blank">Boe Prox</a></p>
<p>October 8th – <a href="http://csharpening.net/" target="_blank">Adam Driscoll</a></p>
<p>November 12th – <a href="http://jeffwouters.nl/" target="_blank">Jeff Wouters<br />
<span style="color: #333333;"><br />
</span></a></p>
<p>I feel very honoured to be in this list <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Ow wait&#8230; you probably want to know the subject that I&#8217;ll be speaking about&#8230; right?<br />
I&#8217;m not gonna tell but I&#8217;ll give you a hint: Take a look at the names and think about the project(s) I&#8217;ve been working on lately <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="shr-publisher-1522"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/' data-shr_title='I%27ll+be+speaking+at+the+Mississippi+PowerShell+User+Group+in+November+2013'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/' data-shr_title='I%27ll+be+speaking+at+the+Mississippi+PowerShell+User+Group+in+November+2013'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/' data-shr_title='I%27ll+be+speaking+at+the+Mississippi+PowerShell+User+Group+in+November+2013'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+I%E2%80%99ll+be+speaking+at+the+Mississippi+PowerShell+User+Group+in+November+2013+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1522"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/03/ill-be-speaking-at-the-mississippi-powershell-user-group-in-november-2013/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WSUS clients not showing up in management console</title>
		<link>http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/</link>
		<comments>http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 10:11:24 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[WSUS]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1519</guid>
		<description><![CDATA[This is something I&#8217;ve been struggling with for some time now. I also saw some clients appearing and vanishing from the console at, what seemed, random times. I was experiencing that most WSUS clients were not showing up in my management console. When looking at the logs I didn&#8217;t see anything strange, nor did the [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/' data-shr_title='WSUS+clients+not+showing+up+in+management+console'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/' data-shr_title='WSUS+clients+not+showing+up+in+management+console'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/' data-shr_title='WSUS+clients+not+showing+up+in+management+console'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This is something I&#8217;ve been struggling with for some time now.<br />
I also saw some clients appearing and vanishing from the console at, what seemed, random times.<br />
I was experiencing that most WSUS clients were not showing up in my management console. When looking at the logs I didn&#8217;t see anything strange, nor did the eventlogs of Windows tell me anything useful.<br />
So, I downloaded the <a href="http://www.solarwinds.com/products/freetools/diagnostic-tool-for-wsus-agent.aspx">Diagnostics tool for WSUS</a> from SolarWinds. Unfortunalty it didn&#8217;t report any problems whatsoever.</p>
<p>So after a lot of searching I&#8217;ve found the cause. As it seems the previous IT guys rolled out new systems through a cloning process.<br />
WSUS clients are identified through an ID which is located in the registry of the WSUS clients. Each key needs to be unique!<br />
So it seems they didn&#8217;t remove the WSUS ID&#8217;s when creating the clone.</p>
<p>It concerns the keys &#8216;<em>SusClientId</em>&#8216; and &#8216;<em>SusClientIdValidation</em>&#8216; which are located at &#8216;<em>HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate</em>&#8216;.</p>
<p>To remove these keys, the <em>wuauserv</em> service needs to be stopped first. After the deletion of the keys, the service needs to be started again.<br />
So, here&#8217;s a small script which does that:</p>
<pre class="brush:shell">net stop wuauserv
reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate /f /va
net start wuauserv
wuauclt /detectnow /reportnow</pre>
<p>Problem solved <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="shr-publisher-1519"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/' data-shr_title='WSUS+clients+not+showing+up+in+management+console'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/' data-shr_title='WSUS+clients+not+showing+up+in+management+console'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/' data-shr_title='WSUS+clients+not+showing+up+in+management+console'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+WSUS+clients+not+showing+up+in+management+console+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1519"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/02/wsus-clients-not-showing-up-in-management-console/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Carsten Rachfahl interviews Ben Armstrong about Hyper-V and PowerShell</title>
		<link>http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/</link>
		<comments>http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 09:50:17 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1514</guid>
		<description><![CDATA[As many of you know, I&#8217;m a huge fan of PowerShell&#8230; but at a strong second place comes Hyper-V. Combine those two and it&#8217;s just magic! As it seems, Ben Armstrong whom is a Product Manager for Hyper-V at Microsoft, also seems to share a some of my thoughts on that. Watch the following video, made [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/' data-shr_title='Carsten+Rachfahl+interviews+Ben+Armstrong+about+Hyper-V+and+PowerShell'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/' data-shr_title='Carsten+Rachfahl+interviews+Ben+Armstrong+about+Hyper-V+and+PowerShell'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/' data-shr_title='Carsten+Rachfahl+interviews+Ben+Armstrong+about+Hyper-V+and+PowerShell'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>As many of you know, I&#8217;m a huge fan of PowerShell&#8230; but at a strong second place comes Hyper-V.<br />
Combine those two and it&#8217;s just magic!</p>
<p>As it seems, Ben Armstrong whom is a Product Manager for Hyper-V at Microsoft, also seems to share a some of my thoughts on that.<br />
Watch the following video, made by Carsten Rachfahl, where he interviews Ben.<br />
Guess what Ben&#8217;s favorite new feature in Hyper-V 3.0 is&#8230; yes, PowerShell <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><a href="http://www.it-cast.de/alle/videointerview-with-ben-armstrong-at-the-mvp-global-summit-2013/">Carsten interviews Ben Armstrong</a></p>
<div class="shr-publisher-1514"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/' data-shr_title='Carsten+Rachfahl+interviews+Ben+Armstrong+about+Hyper-V+and+PowerShell'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/' data-shr_title='Carsten+Rachfahl+interviews+Ben+Armstrong+about+Hyper-V+and+PowerShell'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/' data-shr_title='Carsten+Rachfahl+interviews+Ben+Armstrong+about+Hyper-V+and+PowerShell'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Carsten+Rachfahl+interviews+Ben+Armstrong+about+Hyper-V+and+PowerShell+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1514"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/02/carsten-rachfahl-interviews-ben-armstrong-about-hyper-v-and-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book Review &#8211; Learn Active Directory Management in a Month of Lunches</title>
		<link>http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/</link>
		<comments>http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 06:58:08 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1509</guid>
		<description><![CDATA[The last two days I&#8217;ve spend my time in the train towards and from my customer reading the Learn Active Directory Management in a Month of Lunches book, written by PowerShell MVP Richard Siddaway. Group Policies, Sites and Subnets, trusts, replication and DNS. It all passes the review step by step. The book is devided [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/' data-shr_title='Book+Review+-+Learn+Active+Directory+Management+in+a+Month+of+Lunches'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/' data-shr_title='Book+Review+-+Learn+Active+Directory+Management+in+a+Month+of+Lunches'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/' data-shr_title='Book+Review+-+Learn+Active+Directory+Management+in+a+Month+of+Lunches'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://jeffwouters.nl/wp-content/uploads/2013/02/siddaway3_cover150.jpg"><img class="alignnone size-full wp-image-1512" alt="siddaway3_cover150" src="http://jeffwouters.nl/wp-content/uploads/2013/02/siddaway3_cover150.jpg" width="150" height="189" /></a></p>
<p>The last two days I&#8217;ve spend my time in the train towards and from my customer reading the Learn Active Directory Management in a Month of Lunches book, written by PowerShell MVP Richard Siddaway.<br />
Group Policies, Sites and Subnets, trusts, replication and DNS. It all passes the review step by step.<br />
The book is devided into five sections:</p>
<ul>
<li><em><span style="line-height: 13px;">Managing Active Directory Data<br />
</span></em></li>
<li><em>Managing Group Policy</em></li>
<li><em>Managing the Active Directory Service</em></li>
<li><em>Maintenance and Troubleshooting</em></li>
<li><em>Reference</em></li>
</ul>
<p>Because I follow Richard&#8217;s blog I was under the assumption that it would mainly be a book about how to use PowerShell to manage your Active Directory.<br />
Also the title of the book &#8216;&#8230;in a Month of Lunches&#8217; may have had something to do with it since I&#8217;m a huge fan of the &#8216;Learn PowerShell in a Month of Lunches&#8217; book, written by Don Jones and Jeffery Hicks (both PowerShell MVP). Just about my whole PowerShell 101 workshop and training are based on that book <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
And my assumption was confirmed after reading even the first few chapters. In this book you&#8217;ll get the GUI way explained, but also the PowerShell way which accomplishes the exact same result.</p>
<p>Even if you think that you know Active Directory I would still recommend reading this book. Even if you actually know all the things in the GUI that are explained in this book, you&#8217;ll probably won&#8217;t know the PowerShell way of all those things. But that&#8217;s not the main reason why I would recommend it.<br />
The main reason is that it&#8217;s just packed with practical information&#8230; and lots of it!</p>
<p>And if you should order it before the 26th of Februari 2013, you can do so with the 50% discount code which is: <strong>learnadmau<br />
</strong><em>Happy reading!</em></p>
<div class="shr-publisher-1509"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/' data-shr_title='Book+Review+-+Learn+Active+Directory+Management+in+a+Month+of+Lunches'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/' data-shr_title='Book+Review+-+Learn+Active+Directory+Management+in+a+Month+of+Lunches'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/' data-shr_title='Book+Review+-+Learn+Active+Directory+Management+in+a+Month+of+Lunches'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Book+Review+%E2%80%93+Learn+Active+Directory+Management+in+a+Month+of+Lunches+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1509"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/02/book-review-learn-active-directory-management-in-a-month-of-lunches/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PowerShell meets WSUS</title>
		<link>http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/</link>
		<comments>http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/#comments</comments>
		<pubDate>Thu, 14 Feb 2013 09:15:06 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[WSUS]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1490</guid>
		<description><![CDATA[Some of my blog/Twitter/Facebook followers may know that I&#8217;m currently in a project implementing Windows Server Update Services (WSUS). So naturallyI thought about how I could use PowerShell with it Since I&#8217;m using a Windows Server 2008 R2 system, I can&#8217;t use any native cmdlets. So I started to search&#8230; Quickly I found Boe Prox&#8217; [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/' data-shr_title='PowerShell+meets+WSUS'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/' data-shr_title='PowerShell+meets+WSUS'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/' data-shr_title='PowerShell+meets+WSUS'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Some of my blog/Twitter/Facebook followers may know that I&#8217;m currently in a project implementing Windows Server Update Services (WSUS).<br />
So naturallyI thought about how I could use PowerShell with it <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Since I&#8217;m using a Windows Server 2008 R2 system, I can&#8217;t use any native cmdlets. So I started to search&#8230;<br />
Quickly I found Boe Prox&#8217; <a href="http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/17/use-powershell-to-perform-basic-administrative-tasks-on-wsus.aspx">post on the Hey Scripting Guy! blog</a>.<br />
<a href="http://learn-powershell.net/">Boe </a>has written a PowerShell module named PoSHWSUS for managing WSUS which can be downloaded <a href="http://poshwsus.codeplex.com">&lt;here&gt;</a>  from Codeplex.</p>
<p>Although Boe&#8217;s post had given me some inspiration, I started to search and play with it myself a little.<br />
Since my current customer didn&#8217;t want to use the PoSHWSUS module, it gave me the freedom to write a script to handle the monthly WSUS cleanup.<br />
Since there is a GUI way to do this, one of my demands was to cover each of the GUI options with a command.</p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2013/02/WSUSCleanUpWizard.jpg"><img class="alignnone size-medium wp-image-1493" alt="WSUSCleanUpWizard" src="http://jeffwouters.nl/wp-content/uploads/2013/02/WSUSCleanUpWizard-300x264.jpg" width="300" height="264" /></a></p>
<p>So, let&#8217;s cover these options one by one.</p>
<p><strong>0) Preperations</strong><br />
First we would have to start with loading the assembly for WSUS. This can be done with the following command:</p>
<pre class="brush:powershell">[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")</pre>
<p>* If you don&#8217;t want any output shown by that command, simply pipe it to <em>Out-Null</em> <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Next we would need to create a PowerShell object for the WSUS clean up scope, which is part of the assembly:</p>
<pre class="brush:powershell">$CleanUpScope = New-Object Microsoft.UpdateServices.Administration.CleanupScope</pre>
<p><strong><em>1) Unused Updates and Update Revisions</em></strong><br />
Here&#8217;s the first of the options shown in the GUI. What would be the PowerShell way to accomplish this?<br />
To cleanup unused (in fact: obsolete) updates:</p>
<pre class="brush:powershell">$CleanUpScope.CleanObsoleteUpdates = $true</pre>
<p>To cleanup update revisions:</p>
<p>&lt;See point 5 for that&gt;</p>
<p><em><strong>2) Computers not contacting the server</strong></em><br />
For the second option shown in the GUI we can use the following PowerShell command:</p>
<pre class="brush:powershell">$cleanUpScope.CleanupObsoleteComputers = $true</pre>
<p><em><strong>3) Unneeded update files</strong></em><br />
This option can be a real storage saver as I found out myself. To cleanup all unneeded update files:</p>
<pre class="brush:powershell">$cleanUpScope.CleanupUnneededContentFiles = $true</pre>
<p><em><strong>4) Expired Updates</strong></em><br />
As time passes some updates may become expired. To cleanup (in fact: decline) those updates:</p>
<pre class="brush:powershell">$cleanUpScope.DeclineExpiredUpdates = $true</pre>
<p><em><strong>5) Superseded Updates</strong></em><br />
And the last option in the GUI, to cleanup (in fact: decline) superseded updates:</p>
<pre class="brush:powershell">$cleanUpScope.DeclineSupersededUpdates = $true</pre>
<p><em><strong>Other options available</strong></em><br />
Although the CleanUp Manager wizard did not show more options, there actually is one&#8230; Compressing updates.<br />
I found this option by accident since I was using PowerShell ISE and its IntelliSense feature&#8230; which gave me a list with options available&#8230; and there it was, standing between the other options.</p>
<p>This can be configured with the following command:</p>
<pre class="brush:powershell">$cleanUpScope.CompressUpdates = $true</pre>
<p><strong>Executing the tasks</strong><br />
Now that we&#8217;ve got our variables set, we can execute the cleanup task(s) based on those variables.<br />
First we would have to load the WSUS server into a variable. This can be done by using that assembly again, with a little adaptation so that we can use the cleanup manager later on:</p>
<pre class="brush:powershell">$WSUSServer= [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer()</pre>
<p>Now that the server is loaded into a variable, we can use that variable to call for the CleanUp Manager:</p>
<pre class="brush:powershell">$cleanUpManager = $WSUSServer.GetCleanupManager()</pre>
<p>Alright. The assembly is loaded, settings for the tasks have been configured, the update server is stored in a variable and the CleanUp Manager is called.<br />
Now, to execute the actual tasks:</p>
<pre class="brush:powershell">$CleanUpManager.PerformCleanup($cleanupScope)</pre>
<p><strong>My approach</strong><br />
Although the options (1-5) have the order in the GUI as I numbered them in this post, I&#8217;ve chosen to execute them in the following order:<br />
1) $CleanUpScope.CleanupObsoleteComputers = $true<br />
2) $CleanUpScope.DeclineSupersededUpdates = $true<br />
3) $CleanUpScope.DeclineExpiredUpdates = $true<br />
4) $CleanUpScope.CleanObsoleteUpdates = $true<br />
5) $CleanUpScope.CleanupUnneededContentFiles = $true<br />
6) $CleanUpScope.CompressUpdates = $true</p>
<p>Why this order?<br />
Well, think about it. First you would want to cleanup the list of computers, then the updates, then the actual content files and last you would want to compress the files that are left&#8230; right?</p>
<p><strong>My script</strong></p>
<pre class="brush:powershell">[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | Out-Null
$WSUSServer = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer()
$CleanUpScope = New-Object Microsoft.UpdateServices.Administration.CleanupScope

$CleanUpScope.CleanupObsoleteComputers = $true
$CleanUpScope.DeclineSupersededUpdates = $true
$CleanUpScope.DeclineExpiredUpdates = $true
$CleanUpScope.CleanObsoleteUpdates = $true
$CleanUpScope.CleanupUnneededContentFiles = $true
$CleanUpScope.CompressUpdates = $true

$CleanUpManager = $WSUSServer.GetCleanupManager()
$CleanUpManager.PerformCleanup($CleanUpScope)</pre>
<div class="shr-publisher-1490"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/' data-shr_title='PowerShell+meets+WSUS'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/' data-shr_title='PowerShell+meets+WSUS'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/' data-shr_title='PowerShell+meets+WSUS'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+meets+WSUS+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1490"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/02/powershell-meets-wsus/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PowerShell &#8211; Configure port mirroring in Hyper-V</title>
		<link>http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/#comments</comments>
		<pubDate>Tue, 29 Jan 2013 08:29:53 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1481</guid>
		<description><![CDATA[Earlier this week I&#8217;ve received a question about selecting the correct VM network adapter to configure port mirroring on. Set-VMNetworkAdapter –VMName MyVM –PortMirroring Source Now this command will confire port mirroring alright, but for all the network adapters attached to the VM. What if you have multiple netwerk adapters attached? If you were to do [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/' data-shr_title='PowerShell+-+Configure+port+mirroring+in+Hyper-V'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/' data-shr_title='PowerShell+-+Configure+port+mirroring+in+Hyper-V'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/' data-shr_title='PowerShell+-+Configure+port+mirroring+in+Hyper-V'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Earlier this week I&#8217;ve received a question about selecting the correct VM network adapter to configure port mirroring on.</p>
<pre class="brush:powershell">Set-VMNetworkAdapter –VMName MyVM –PortMirroring Source</pre>
<p>Now this command will confire port mirroring alright, but for all the network adapters attached to the VM.<br />
What if you have multiple netwerk adapters attached?</p>
<p>If you were to do a Get-VMNetworkAdapter you&#8217;ll notice that all the network adapters have the same name.<br />
Yes, you can do some filtering to eventually only get the one you want&#8230; but maybe there&#8217;s an easier way&#8230;</p>
<p>Now let&#8217;s assume that you&#8217;ve automated your environment and that your VMs are consistent in their configuration.<br />
In that case, you can assume that if there are three network adapters attached, the 2nd network adapter will be the same on all VMs.<br />
We can work with that <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<pre class="brush:powershell">$VM = Get-VMNetworkAdapter -VMName MyVM
$VM[1] | Set-VMNetworkAdapter –PortMirroring Source</pre>
<p>As you may have noticed I&#8217;m selecting the 1th NIC, right? Wrong <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
That&#8217;s the little gotcha when working with arrays&#8230; they start the count at 0 (zero). So in fact I&#8217;m selecting the 2nd NIC.</p>
<div class="shr-publisher-1481"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/' data-shr_title='PowerShell+-+Configure+port+mirroring+in+Hyper-V'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/' data-shr_title='PowerShell+-+Configure+port+mirroring+in+Hyper-V'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/' data-shr_title='PowerShell+-+Configure+port+mirroring+in+Hyper-V'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+%E2%80%93+Configure+port+mirroring+in+Hyper-V+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1481"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/powershell-configure-port-mirroring-in-hyper-v/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The difference between Holland and The Netherlands</title>
		<link>http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/#comments</comments>
		<pubDate>Mon, 28 Jan 2013 12:06:15 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Geeky]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1475</guid>
		<description><![CDATA[As a Dutchman this is something I&#8217;ve grown up with&#8230; the fact that I&#8217;m from The Netherlands which is a part of the Kingdom of Holland but I am and speak Dutch. Well, if you&#8217;re having trouble following that one little sentence, you&#8217;re gonna love the following video! The culture and history buffs will notice [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/' data-shr_title='The+difference+between+Holland+and+The+Netherlands'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/' data-shr_title='The+difference+between+Holland+and+The+Netherlands'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/' data-shr_title='The+difference+between+Holland+and+The+Netherlands'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>As a Dutchman this is something I&#8217;ve grown up with&#8230; the fact that I&#8217;m from The Netherlands which is a part of the Kingdom of Holland but I am and speak Dutch.<br />
Well, if you&#8217;re having trouble following that one little sentence, you&#8217;re gonna love the following video!</p>
<p><iframe src="http://www.youtube.com/embed/eE_IUPInEuc" height="315" width="560" allowfullscreen="" frameborder="0"></iframe></p>
<p>The culture and history buffs will notice the one little mistake in the video <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Note: Something I&#8217;ve noticed some years ago&#8230; You could be British, speak English and are from The United Kingdom <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  #FoodForThought</p>
<div class="shr-publisher-1475"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/' data-shr_title='The+difference+between+Holland+and+The+Netherlands'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/' data-shr_title='The+difference+between+Holland+and+The+Netherlands'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/' data-shr_title='The+difference+between+Holland+and+The+Netherlands'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+The+difference+between+Holland+and+The+Netherlands+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1475"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/the-difference-between-holland-and-the-netherlands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSUS &#8211; Windows Updates Workflow</title>
		<link>http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/#comments</comments>
		<pubDate>Mon, 28 Jan 2013 11:53:02 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[WSUS]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1471</guid>
		<description><![CDATA[The last few weeks I&#8217;ve been working at a customer for patch management for the Windows Operating System in their environment through WSUS. For this, I&#8217;ve created a simple workflow that would be applicable to any environment. Because the environment I&#8217;m currently working at doesn&#8217;t have a test environment (yet!) and is somewhat behind with [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/' data-shr_title='WSUS+-+Windows+Updates+Workflow'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/' data-shr_title='WSUS+-+Windows+Updates+Workflow'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/' data-shr_title='WSUS+-+Windows+Updates+Workflow'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The last few weeks I&#8217;ve been working at a customer for patch management for the Windows Operating System in their environment through WSUS.<br />
For this, I&#8217;ve created a simple workflow that would be applicable to any environment. Because the environment I&#8217;m currently working at doesn&#8217;t have a test environment (yet!) and is somewhat behind with applying their Windows Updates, the workflow needed to include some troubleshooting options in case an application caused problems and stuff like it.<br />
So, here&#8217;s what I came up with:<br />
<a href="http://jeffwouters.nl/wp-content/uploads/2013/01/WSUS-Updates-Workflow.jpg"><img class="alignnone size-medium wp-image-1472" alt="WSUS Updates Workflow" src="http://jeffwouters.nl/wp-content/uploads/2013/01/WSUS-Updates-Workflow-300x225.jpg" width="600" height="450" /></a></p>
<p>If you can use it, have fun.<br />
If you need to change it, have fun.</p>
<div class="shr-publisher-1471"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/' data-shr_title='WSUS+-+Windows+Updates+Workflow'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/' data-shr_title='WSUS+-+Windows+Updates+Workflow'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/' data-shr_title='WSUS+-+Windows+Updates+Workflow'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+WSUS+%E2%80%93+Windows+Updates+Workflow+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1471"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/wsus-windows-updates-workflow/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PowerShell function to check for a loaded snapin</title>
		<link>http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/#comments</comments>
		<pubDate>Mon, 21 Jan 2013 08:39:05 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1465</guid>
		<description><![CDATA[Earlier this month I posted a Powershell function to check for a loaded module. Bas Steeloper, another Dutch IT Pro, commented on the post and by tweaking the function I&#8217;ve provided in the post he came up with a another function to check for a loaded snapin. You can find his comment here but for your [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/' data-shr_title='PowerShell+function+to+check+for+a+loaded+snapin'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/' data-shr_title='PowerShell+function+to+check+for+a+loaded+snapin'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/' data-shr_title='PowerShell+function+to+check+for+a+loaded+snapin'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Earlier this month I posted a <a href="http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module">Powershell function to check for a loaded module</a>.<br />
<a href="http://www.twitter.com/bsteelooper">Bas Steeloper</a>, another Dutch IT Pro, commented on the post and by tweaking the function I&#8217;ve provided in the post he came up with a another function to check for a loaded snapin.</p>
<p>You can find his comment <a href="http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module">here </a>but for your convenience here is the code:</p>
<pre class="brush:powershell">function Check-LoadedSnapIN{
  Param( [parameter(Mandatory = $true)][alias("SnapIN")][string]$SnapINName)
  if ( (Get-PSSnapin -Name $SnapINName -ErrorAction SilentlyContinue) -eq $null )
  {
    Add-PsSnapin $SnapINName
  }
}</pre>
<div class="shr-publisher-1465"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/' data-shr_title='PowerShell+function+to+check+for+a+loaded+snapin'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/' data-shr_title='PowerShell+function+to+check+for+a+loaded+snapin'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/' data-shr_title='PowerShell+function+to+check+for+a+loaded+snapin'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+function+to+check+for+a+loaded+snapin+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1465"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-snapin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PSSnapin &#8211; Could not load file or assembly or one of its dependencies</title>
		<link>http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/#comments</comments>
		<pubDate>Wed, 16 Jan 2013 08:11:32 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1458</guid>
		<description><![CDATA[Whenever you&#8217;re writing aPowerShell SnapIn you may encounter an error when you try to load the PSSnapIn. Specifically, when the error states: Add-PSSnapin : Cannot load Windows PowerShell snap-in because of the following error: Could not load file or assembly or one of its dependencies. This assembly is built by a runtime newer than the [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/' data-shr_title='PSSnapin+-+Could+not+load+file+or+assembly+or+one+of+its+dependencies'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/' data-shr_title='PSSnapin+-+Could+not+load+file+or+assembly+or+one+of+its+dependencies'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/' data-shr_title='PSSnapin+-+Could+not+load+file+or+assembly+or+one+of+its+dependencies'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Whenever you&#8217;re writing aPowerShell SnapIn you may encounter an error when you try to load the PSSnapIn.<br />
Specifically, when the error states:</p>
<p><em>Add-PSSnapin : Cannot load Windows PowerShell snap-in because of the following error: Could not load file or assembly or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.</em></p>
<p>Now this is a nasty little thing to find the cause of so I&#8217;ve decided to write this blog post.<br />
The solution for this, at least in my case, was to create a <em>powershell.exe.config</em> file in the PowerShell folder (for x86 <em>&#8216;%windir%\System32\WindowsPowerShell\V1.0</em>&#8216; and for x64 &#8216;%windir%\Syswow64\WindowsPowerShell\V1.0&#8242;).<br />
In this file, place the following content:</p>
<pre class="brush:xml">&lt;CONFIGURATION&gt;
  &lt;STARTUP useLegacyV2RuntimeActivationPolicy="true"&gt;
    &lt;SUPPORTEDRUNTIME version="v4.0.30319"&gt;&lt;/SUPPORTEDRUNTIME&gt;
    &lt;SUPPORTEDRUNTIME version="v2.0.50727"&gt;&lt;/SUPPORTEDRUNTIME&gt;
  &lt;/STARTUP&gt;
&lt;/CONFIGURATION&gt;</pre>
<p>Now restart your PowerShell console (if it&#8217;s opened at that time) and you&#8217;re set <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="shr-publisher-1458"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/' data-shr_title='PSSnapin+-+Could+not+load+file+or+assembly+or+one+of+its+dependencies'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/' data-shr_title='PSSnapin+-+Could+not+load+file+or+assembly+or+one+of+its+dependencies'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/' data-shr_title='PSSnapin+-+Could+not+load+file+or+assembly+or+one+of+its+dependencies'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PSSnapin+%E2%80%93+Could+not+load+file+or+assembly+or+one+of+its+dependencies+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1458"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/pssnapin-could-not-load-file-or-assembly-or-one-of-its-dependencies/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TechDays NL &#8211; Making PowerShell sexy</title>
		<link>http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/#comments</comments>
		<pubDate>Tue, 15 Jan 2013 17:16:15 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1451</guid>
		<description><![CDATA[The people that follow me on Twitter may already know this, but I&#8217;ve been accepted as a speaker for the TechDays in The Netherlands with my &#8216;Making PowerShell sexy&#8216; session. The session will start at 17:15 and will end at 19:00&#8230; so yes, it will be my privilege to have one of the closing sessions of [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/' data-shr_title='TechDays+NL+-+Making+PowerShell+sexy'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/' data-shr_title='TechDays+NL+-+Making+PowerShell+sexy'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/' data-shr_title='TechDays+NL+-+Making+PowerShell+sexy'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The people that follow me on <a href="http://www.twitter.com/jeffwouters">Twitter</a> may already know this, but I&#8217;ve been accepted as a speaker for the <a href="http://www.techdays.nl">TechDays in The Netherlands</a> with my &#8216;<a href="http://www.microsoft.com/netherlands/techdays/SessionDetail.aspx?sessionId=3716">Making PowerShell sexy</a>&#8216; session. The session will start at 17:15 and will end at 19:00&#8230; so yes, it will be my privilege to have one of the closing sessions of the day.</p>
<p>Oh, before I forget. As it seems I&#8217;m giving the only PowerShell focussed session <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
<img class="alignnone size-full wp-image-1454" alt="techdayslogo" src="http://jeffwouters.nl/wp-content/uploads/2013/01/techdayslogo.png" width="215" height="119" /><br />
The TechDays will be held on the 7th and 8th of March this year in The Hague.</p>
<p>Here&#8217;s the abstract of my session:</p>
<p>Creating 200 user accounts in Active Directory or provisioning 50 virtual machines with a single command and within minutes. These are examples you see at most events with a PowerShell (level 100-200) session.<br />
But you can do so much, much more with it! Even when you have no previous scripting or programming experience.<br />
Closing a specific process on all your devices, rebooting or shutting down your entire environment with a single command or resetting the password of a random user each day? What about writing your own PowerShell object, containing all your contact information? And did you know that you can make PowerShell talk or even make (or play) music with it? Interested?<br />
Attend this session and I&#8217;ll show you the sexiness of PowerShell&#8230;</p>
<div class="shr-publisher-1451"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/' data-shr_title='TechDays+NL+-+Making+PowerShell+sexy'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/' data-shr_title='TechDays+NL+-+Making+PowerShell+sexy'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/' data-shr_title='TechDays+NL+-+Making+PowerShell+sexy'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+TechDays+NL+%E2%80%93+Making+PowerShell+sexy+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1451"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/techdays-nl-making-powershell-sexy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An incident in the train with a kid that has a bad attitude and no respect</title>
		<link>http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/#comments</comments>
		<pubDate>Mon, 14 Jan 2013 18:24:11 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1448</guid>
		<description><![CDATA[This evening I took the train from work back towards home. This trip takes me from Amsterdam to Utrecht, where I have to switch trains and then to Geldermalsen. In total, this takes about 60-70 minutes. When I boarded the train in Amsterdam, a group of 3 kids (about 15-16 years old, maybe 60 kilo&#8217;s [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/' data-shr_title='An+incident+in+the+train+with+a+kid+that+has+a+bad+attitude+and+no+respect'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/' data-shr_title='An+incident+in+the+train+with+a+kid+that+has+a+bad+attitude+and+no+respect'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/' data-shr_title='An+incident+in+the+train+with+a+kid+that+has+a+bad+attitude+and+no+respect'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This evening I took the train from work back towards home. This trip takes me from Amsterdam to Utrecht, where I have to switch trains and then to Geldermalsen. In total, this takes about 60-70 minutes.<br />
When I boarded the train in Amsterdam, a group of 3 kids (about 15-16 years old, maybe 60 kilo&#8217;s a piece) got with me on the train and were sitting near me. During the trip towards Utrecht they had long conversations about their girlfriends, or &#8216;bitches&#8217; as they called them. Some big stories were told and I actually thought it was pretty funny to listen to&#8230; until I put on some music <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
We arrived at Utrecht Central station and got out. In the main hall they went to the left, I went to the right.</p>
<p>After a small walk I got to my train and took a seat. My luck is that, when my 1th train has no delay, I walk up to the platform and my next train just arrives. So just about always, I&#8217;ve got a place where I can sit.<br />
The train was very busy this time. Suddenly I see an old lady trying to pass the busy train, looking for a place to sit down. I&#8217;m a softy with those things, so I ask the lady if she wants to sit down. She says &#8216;Yes, please. Thank you.&#8217; or something like it. I stand up, take a step to the side so that she can sit down.<br />
And as you may have guessed by my introduction, one of the guys I was sitting near in my 1st train quickly jumps into the train, bouncing off another man in the process and sits down at the chair I&#8217;ve made available to the lady.</p>
<p>So, maybe he didn&#8217;t noticed I&#8217;ve made room for the lady? So while the lady looks rather displeased to the boy I asked him if he didn&#8217;t saw that I was sitting there and made room for the lady (me knotting in her direction).<br />
The guy just smiles at me and say &#8216;Well, she just should have sat down faster&#8230; now I&#8217;m sitting here!&#8217;.<br />
At this point his two friends also get into the train, pushing people aside so that they can.</p>
<p>I was a little surprised by his reaction. So I&#8217;ve asked him to move and let the lady sit down. The guy just smiled and puts on some music. The man which the boy bounced off when entering the train and standing next to me, I think somewhere between 40 and 50 years old, pulls the earplugs from the guy his ears and tells him to remove himself from the chair and either let me or the lady sit down. Here his friends join the conversation and start talking/shouting loudly towards the man. I see the old lady, standing somewhat between the boy, his friends and me getting uncomfortable. So I take a small step forward to the boy, to the point where it&#8217;s even possible in a train this crowded, and tell him to either move it or I&#8217;ll make him move.<br />
Seriously&#8230; the guy shouts to me: &#8216;Who do you think you are?!&#8217;</p>
<p>At this point I&#8217;ve had it. I push the guy down, grab the back of his trousers by his belt, pick him up and throw his punk ass out of the train, pushing people roughly aside while doing it.<br />
Oops, it seems that I&#8217;ve done it now. The boy quickly gets up and him and his buddies quickly come towards my direction.<br />
And this is where I realized that I wasn&#8217;t over-reacting or something because suddenly everyone standing beside me, even a little girl, turned towards the guys and start yelling at them.</p>
<p>As they were saved by the bell, we here a few beeps, the doors close and the train leaves.<br />
The old lady sat down and me and the man talked a bit about the lack of respect and social behavior of the punks.<br />
I don&#8217;t know if there was anyone in the train that made a recoring (phone?) of the incident but if so I would love to have a copy.</p>
<div class="shr-publisher-1448"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/' data-shr_title='An+incident+in+the+train+with+a+kid+that+has+a+bad+attitude+and+no+respect'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/' data-shr_title='An+incident+in+the+train+with+a+kid+that+has+a+bad+attitude+and+no+respect'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/' data-shr_title='An+incident+in+the+train+with+a+kid+that+has+a+bad+attitude+and+no+respect'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+An+incident+in+the+train+with+a+kid+that+has+a+bad+attitude+and+no+respect+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1448"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/an-incident-in-the-train-with-a-kid-that-has-a-bad-attitude-and-no-respect/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PowerShell function to check for a loaded module</title>
		<link>http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/#comments</comments>
		<pubDate>Mon, 14 Jan 2013 09:50:47 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1446</guid>
		<description><![CDATA[Last week I&#8217;ve received a question concerning a check if a PowerShell module is loaded. If it&#8217;s not, load it. Here&#8217;s a function I&#8217;ve used over the last year in many of my scripts, I hope you find it useful. function Check-LoadedModule { Param( [parameter(Mandatory = $true)][alias("Module")][string]$ModuleName) $LoadedModules = Get-Module &#124; Select Name if (!$LoadedModules [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/' data-shr_title='PowerShell+function+to+check+for+a+loaded+module'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/' data-shr_title='PowerShell+function+to+check+for+a+loaded+module'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/' data-shr_title='PowerShell+function+to+check+for+a+loaded+module'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Last week I&#8217;ve received a question concerning a check if a PowerShell module is loaded. If it&#8217;s not, load it.<br />
Here&#8217;s a function I&#8217;ve used over the last year in many of my scripts, I hope you find it useful.</p>
<pre class="brush:powershell">function Check-LoadedModule
{
  Param( [parameter(Mandatory = $true)][alias("Module")][string]$ModuleName)
  $LoadedModules = Get-Module | Select Name
  if (!$LoadedModules -like "*$ModuleName*") {Import-Module -Name $ModuleName}
}</pre>
<div class="shr-publisher-1446"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/' data-shr_title='PowerShell+function+to+check+for+a+loaded+module'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/' data-shr_title='PowerShell+function+to+check+for+a+loaded+module'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/' data-shr_title='PowerShell+function+to+check+for+a+loaded+module'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+function+to+check+for+a+loaded+module+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1446"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/powershell-function-to-check-for-a-loaded-module/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>It is called Member Enumeration and not Implicit Foreach &#8211; Part 2</title>
		<link>http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/#comments</comments>
		<pubDate>Mon, 14 Jan 2013 09:28:38 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1438</guid>
		<description><![CDATA[Last week I wrote a post about Member Enumeration (a new feature in PowerShell v3), specifically about that it&#8217;s called that and not Implicit Foreach. Although my previous post does go into a little bit of detail, I&#8217;ve chosen the wrong examples to show the capabilities of Member Enumeration. That&#8217;s why I&#8217;ve written this post: [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/' data-shr_title='+It+is+called+Member+Enumeration+and+not+Implicit+Foreach+-+Part+2'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/' data-shr_title='+It+is+called+Member+Enumeration+and+not+Implicit+Foreach+-+Part+2'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/' data-shr_title='+It+is+called+Member+Enumeration+and+not+Implicit+Foreach+-+Part+2'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Last week I wrote <a href="http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach">a post about Member Enumeration</a> (a new feature in PowerShell v3), specifically about that it&#8217;s called that and not Implicit Foreach.<br />
Although my previous post does go into a little bit of detail, I&#8217;ve chosen the wrong examples to show the capabilities of Member Enumeration. That&#8217;s why I&#8217;ve written this post: Better examples and a clear clarification of the feature itself.</p>
<p><strong>The problem and solution</strong><br />
Most new features will solve a problem. Member Enumeration solves the problem scripters have with of returned objects, specifically the fact that you don&#8217;t know what objects are returned. Is it one or are they many? Is it a string or an array? By using Member Enumeration, PowerShell will handle the differences for you under the hood. So no worries, just let PowerShell do all the hard work for you.<br />
Let&#8217;s explain that.</p>
<p>In PowerShell v2 you would have to do something like:</p>
<pre>Get-Process | Select-Object -Property Name</pre>
<p>Or for the more experienced scripters, you could also do:</p>
<pre>ps | % { $_.Name }</pre>
<p>Now with Member Enumeration you can simply do:</p>
<pre>(Get-Process).Name</pre>
<p>You&#8217;ll notice that the output is the same in all three cases. So what&#8217;s the diff?<br />
There are four major differences:</p>
<ol>
<li>The Select-Object or Foreach-Object cmdlet is not used with Member Enumeration. This makes it faster but it still shows you the same result.</li>
<li>It doesn&#8217;t matter if you&#8217;ll get one or many objects returned, you can handle it the same way.</li>
<li>The syntax is much easier to learn and use.</li>
<li>It&#8217;s less characters so less typing and less code.</li>
</ol>
<p>But you can also use methods the same way as I&#8217;ve called the property name as shown above:</p>
<pre>(Get-Process -Name notepad).Kill()</pre>
<p>This is nothing new compared to my previous post.<br />
<strong><br />
What else can you do with it?</strong><br />
And now we get to the cool stuff.<br />
What if you were to get all process names from your device and show the names in uppercase? In PowerShell v2 you&#8217;ll need something like:</p>
<pre class="brush:powershell">Get-Process | Foreach-Object { $_.Name.ToUpper() }</pre>
<p>Now with Member Enumeration:</p>
<pre class="brush:powershell">(Get-Process).Name.ToUpper()</pre>
<p>As you can see, it&#8217;s shorter, easier to type, easier to learn and most of all, the Foreach-Object cmdlet is not used.<br />
But what did I do here?<br />
I&#8217;m using the Member Enumeration syntax to enumerate all processes and select the only the name for those processes.<br />
Next, I&#8217;m simply attaching the ToUpper method to it and voilá the names are converted to uppercase.<br />
Note that another new feature called &#8216;Automatic Foreach&#8217; is used here. I&#8217;ll write another post about this in a few hours.</p>
<p><em>Tip: If you want to know which properties and methods are available to you at each point simply pipe the objects to the Get-Member cmdlet:</em></p>
<pre class="brush:powershell">(Get-Process).Name | Get-Member</pre>
<p>Although I&#8217;m focussing a lot on the syntax you can use for Member Enumeration when used in oneliners, the strength of Member Enumeration lies in the fact that it does the object handeling for you.<br />
No more annoyances when you don&#8217;t know if you&#8217;ll be returned one or multiple objects.<br />
And for me as a practical guy it means less, faster and easier code.</p>
<div class="shr-publisher-1438"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/' data-shr_title='+It+is+called+Member+Enumeration+and+not+Implicit+Foreach+-+Part+2'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/' data-shr_title='+It+is+called+Member+Enumeration+and+not+Implicit+Foreach+-+Part+2'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/' data-shr_title='+It+is+called+Member+Enumeration+and+not+Implicit+Foreach+-+Part+2'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+It+is+called+Member+Enumeration+and+not+Implicit+Foreach+%E2%80%93+Part+2+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1438"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It is called Member Enumeration and not Implicit Foreach</title>
		<link>http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/</link>
		<comments>http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 20:04:59 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1430</guid>
		<description><![CDATA[In the category of ‘new things in PowerShell v3’ I’ll cover a something called Member Enumeration in this post. Funny encounter Do you remember when the first bits of PowerShell v3 came out? You started to play with it and blog about it… and before you knew it the community found a very cool new [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/' data-shr_title='It+is+called+Member+Enumeration+and+not+Implicit+Foreach'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/' data-shr_title='It+is+called+Member+Enumeration+and+not+Implicit+Foreach'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/' data-shr_title='It+is+called+Member+Enumeration+and+not+Implicit+Foreach'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In the category of ‘new things in PowerShell v3’ I’ll cover a something called Member Enumeration in this post.</p>
<p><strong>Funny encounter<br />
</strong>Do you remember when the first bits of PowerShell v3 came out? You started to play with it and blog about it… and before you knew it the community found a very cool new feature they called <i>Implicit Foreach</i>. As did I by the way <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
So when I was writing my chapter for the PowerShell Deep Dives book I wanted to cover a little bit of this feature in my chapter. I couldn’t find any official documentation about this feature… not on TechNet or even in the help. So I did what I always do when I encounter something like this: I asked the vendor. I actually got a very quick response which was exactly what I needed.<br />
So what happened here? I was looking for a feature with a wrong name. The official name of this feature is not <i>Implicit Foreach</i> but <i>Member Enumeration</i>!<br />
That would explain why I wasn’t able to find anything about it <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>What is Member Enumeration?</strong><br />
Let’s start with the basics: What is it? I’ve got a simple explanation with an analogy to some math for this… Why? Well, you actually already know what Member Enumeration is and you didn’t even realized it <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Back when you were still in high school your Mathematics teacher told you that in math, everything put between () is calculated first. This is the syntax of Member Enumeration when used in oneliners. Easy, right?<br />
So what is the main benefits that Member Enumeration brings us?<br />
In my opinion there is one major benefit: When using Member Enumeration you won&#8217;t have to care if it&#8217;s returing a single object or a whole bunch of objects. Under the hood, PowerShell will enumerate and handle all the differences for you.</p>
<p><strong>What can you do with Member Enumeration?</strong><br />
Anything attached to the objects that you enumerate can be used… so properties, methods, etc.</p>
<p><strong>Examples, please!<br />
</strong>Alright, alright&#8230; let’s take a look at some examples.<br />
First up are properties. When you would want to get the names of all processes, before PowerShell v3, you would have to use pipelined expressions and the Select-Object cmdlet:</p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image002.jpg"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="clip_image002" alt="clip_image002" src="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image002_thumb.jpg" width="552" height="342" border="0" /></a></p>
<p>Now, with Member Enumeration, you can simply do:</p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image004.jpg"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="clip_image004" alt="clip_image004" src="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image004_thumb.jpg" width="551" height="341" border="0" /></a></p>
<p>Second, how about using Member Enumeration for applying methods? Simply do the same as with properties:</p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image006.jpg"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="clip_image006" alt="clip_image006" src="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image006_thumb.jpg" width="555" height="344" border="0" /></a></p>
<p>But wait, it will get even crazier easy…<br />
How would you get a count of the running processes on your system? Not the name of the property or something like that… only the actual number.<br />
You would probably use something like:</p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image008.jpg"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="clip_image008" alt="clip_image008" src="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image008_thumb.jpg" width="557" height="177" border="0" /></a></p>
<p>Now let’s do that with Member Enumeration:</p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image010.jpg"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="clip_image010" alt="clip_image010" src="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image010_thumb.jpg" width="555" height="176" border="0" /></a></p>
<p>Now isn’t that a lot easier and shorter?</p>
<p>How do you find the properties and methods (such as ‘count’) that are available when you use Member Enumeration? The same way as you would do it with any object, by using the Get-Member cmdlet:</p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image012.jpg"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="clip_image012" alt="clip_image012" src="http://jeffwouters.nl/wp-content/uploads/2013/01/clip_image012_thumb.jpg" width="557" height="365" border="0" /></a></p>
<p><strong>Note: Since this post made me receive quite some questions and remarks in my mailbox I&#8217;ll write another post this week explaining Member Enumeration with better examples and a bit more detailed explenation.</strong></p>
<div class="shr-publisher-1430"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/' data-shr_title='It+is+called+Member+Enumeration+and+not+Implicit+Foreach'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/' data-shr_title='It+is+called+Member+Enumeration+and+not+Implicit+Foreach'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/' data-shr_title='It+is+called+Member+Enumeration+and+not+Implicit+Foreach'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+It+is+called+Member+Enumeration+and+not+Implicit+Foreach+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1430"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2013/01/it-is-called-member-enumeration-and-not-implicit-foreach/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>MCWho + MCMe = MCT</title>
		<link>http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/</link>
		<comments>http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/#comments</comments>
		<pubDate>Thu, 27 Dec 2012 09:29:57 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Exams]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1412</guid>
		<description><![CDATA[Helping people to understeand stuff and explaining complex things in a simple manner is one of the things I love to do and I&#8217;ve been doing it for as long as I can remember. So ever since I was still small, cute and innocent (whahaha!) I wanted to do something with teaching. Because I work in [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/' data-shr_title='MCWho+%2B+MCMe+%3D+MCT'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/' data-shr_title='MCWho+%2B+MCMe+%3D+MCT'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/' data-shr_title='MCWho+%2B+MCMe+%3D+MCT'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Helping people to understeand stuff and explaining complex things in a simple manner is one of the things I love to do and I&#8217;ve been doing it for as long as I can remember. So ever since I was still small, cute and innocent (whahaha!) I wanted to do something with teaching.</p>
<p>Because I work in IT and most of my work involves Microsoft products, a logical step to take is to become a Microsoft Certified Trainer, right?<br />
After doing some research I found that Microsoft accepts several sorts of  &#8217;proof&#8217; that a MCT applicant has what it takes to become a MCT.<br />
One of those is when you&#8217;ve followed an MCT Train-The-Trainer course with Nique Consultancy. Monique (hence the name &#8216;Nique&#8217; ) is the only one that&#8217;s allowed to provide such a course in The Netherlands.<br />
Some MCT&#8217;s I know have told me about their experiences with her training and were very enthousiastic&#8230; so mostly based on their stories I&#8217;ve registered for her training.</p>
<p>Although I was a bit sceptic at first I have to say that I found the training to be extremely useful.<br />
Monique is someone that understands people, sees their weaknesses and strengths but most of all she knows how to communicate with different sorts of people. In my case the subtle approach will not take most of the times; I&#8217;m a bit hard-headed <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  So she told me, after doing a 20 minute training, what my focus areas were that were my strengths but also the ones I needed to improve and <strong>how</strong> I could improve them.</p>
<p>Of course she gave us some homework, a bunch of papers which she wrote explaining Leary&#8217;s Rose (which tells you a lot about yourself), the theory of Kolb (it&#8217;s about learning styles) and much, much more.<br />
Over all I found the training to be very practical and useful. Not only as a MCT but also as a presenter and IT Professional much of the information can be used to improve yourself.</p>
<p>So last Friday was the last day (out of three days) of the training and I&#8217;m happy to write that I&#8217;ve &#8216;passed&#8217; .<br />
In other words, all I have to do now is register on the MCT website, pay the annual fee and I&#8217;ll be a MCT <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /><br />
I guess I&#8217;ll be doing that the first week of 2013 <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><img class="alignnone  wp-image-1414" alt="MCT" src="http://jeffwouters.nl/wp-content/uploads/2012/12/MCT.jpg" width="358" height="188" /></p>
<div class="shr-publisher-1412"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/' data-shr_title='MCWho+%2B+MCMe+%3D+MCT'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/' data-shr_title='MCWho+%2B+MCMe+%3D+MCT'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/' data-shr_title='MCWho+%2B+MCMe+%3D+MCT'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+MCWho+%2B+MCMe+%3D+MCT+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1412"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/12/mcwho-mcme-mct/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>I’ll be hosting a Microsoft Netherlands Datacenter Virtualization IT Camp with Tony Krijnen</title>
		<link>http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/</link>
		<comments>http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/#comments</comments>
		<pubDate>Mon, 17 Dec 2012 11:50:27 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1406</guid>
		<description><![CDATA[Back in October I attended an ITCamp from Microsoft Netherlands, hosted by Daniel van Soest and Tony Krijnen (both IT Pro Evangelists in The Netherlands). This IT Camp was designed by Tony and Daniel to offer a complete Datacenter Virtualization 101 experience by using the attendees&#8217; own laptops to build the environment on. Going from [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/' data-shr_title='I%E2%80%99ll+be+hosting+a+Microsoft+Netherlands+Datacenter+Virtualization+IT+Camp+with+Tony+Krijnen'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/' data-shr_title='I%E2%80%99ll+be+hosting+a+Microsoft+Netherlands+Datacenter+Virtualization+IT+Camp+with+Tony+Krijnen'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/' data-shr_title='I%E2%80%99ll+be+hosting+a+Microsoft+Netherlands+Datacenter+Virtualization+IT+Camp+with+Tony+Krijnen'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Back in October I attended an ITCamp from Microsoft Netherlands, hosted by <a href="https://twitter.com/dansaap">Daniel van Soest</a> and <a href="https://twitter.com/tonykrij">Tony Krijnen</a> (both IT Pro Evangelists in The Netherlands).<br />
This IT Camp was designed by Tony and Daniel to offer a complete Datacenter Virtualization 101 experience by using the attendees&#8217; own laptops to build the environment on.<br />
Going from Active Directory up to Hyper-V and everything that is needed to build such an environment by anything which is native to the Windows Server 2012 Operating System.<br />
<em><br />
Personal Note: I made it a personal challenge to do everything with PowerShell, which I succeeded in. Some hickups along the way which are described in some of my blog posts since then. Some others are still in draft so will be posted somewhere in the future&#8230;</em></p>
<p>It&#8217;s a bit late since the event is tomorrow, but I&#8217;m happy to announce that I&#8217;ll be co-hosting the <a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032537161&amp;culture=nl-nl">IT Camp tomorrow in Leeuwarden</a> (The Netherlands) with <a href="https://twitter.com/tonykrij">Tony Krijnen</a> and will be held at the <a href="http://www.bing.com/maps/#JnE9LldUQyUyYmxlZXV3YXJkZW4lN2Vzc3QuMCU3ZXBnLjEmYmI9NjkuNjIzNzE3NTg4NDc5NSU3ZTczLjQ5NDE0MDYyNSU3ZTIyLjkxMDUzNDkzOTcyNjklN2UtNjQuNDk0MTQwNjI1">Westcord WTC Hotel in Leeuwarden</a>.</p>
<p><span style="color: #ff0000;">Warning!</span><br />
As some of my followers may have noticed I&#8217;ve got a little, just a little, passion for PowerShell.<br />
So I may just happen to mention, when I can&#8217;t resist,  some cool PowerShell tips, tricks and simply cool stuff during the day <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="shr-publisher-1406"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/' data-shr_title='I%E2%80%99ll+be+hosting+a+Microsoft+Netherlands+Datacenter+Virtualization+IT+Camp+with+Tony+Krijnen'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/' data-shr_title='I%E2%80%99ll+be+hosting+a+Microsoft+Netherlands+Datacenter+Virtualization+IT+Camp+with+Tony+Krijnen'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/' data-shr_title='I%E2%80%99ll+be+hosting+a+Microsoft+Netherlands+Datacenter+Virtualization+IT+Camp+with+Tony+Krijnen'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+I%E2%80%99ll+be+hosting+a+Microsoft+Netherlands+Datacenter+Virtualization+IT+Camp+with+Tony+Krijnen+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1406"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/12/ill-be-hosting-a-microsoft-netherlands-datacenter-virtualization-it-camp-with-tony-krijnen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep your PowerShell script open when executed</title>
		<link>http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/</link>
		<comments>http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/#comments</comments>
		<pubDate>Mon, 17 Dec 2012 10:42:01 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1398</guid>
		<description><![CDATA[Whenever you execute a PowerShell script it will run and do its thing, but afterwards it will close PowerShell. Only when you already have a prompt or scripting editor open and execute the script from there, PowerShell will remain open. There is a solution for this, specifically the -NoExit parameter to PowerShell.exe You may want [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/' data-shr_title='Keep+your+PowerShell+script+open+when+executed'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/' data-shr_title='Keep+your+PowerShell+script+open+when+executed'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/' data-shr_title='Keep+your+PowerShell+script+open+when+executed'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Whenever you execute a PowerShell script it will run and do its thing, but afterwards it will close PowerShell.<br />
Only when you already have a prompt or scripting editor open and execute the script from there, PowerShell will remain open.</p>
<p>There is a solution for this, specifically the -NoExit parameter to PowerShell.exe<br />
You may want to execute a script, by rightclicking the script and select &#8216;Run with PowerShell&#8217;, and leave the shell open when its finished&#8230; that may be a little tricky to do <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
When you start your script with the following, it will accomplish that task:</p>
<pre class="brush:powershell">param ( $Show )
if ( !$Show ) 
{
    PowerShell -NoExit -File $MyInvocation.MyCommand.Path 1
    return
}
# Put your code here...
Write-Output 'I will not go away!'</pre>
<div class="shr-publisher-1398"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/' data-shr_title='Keep+your+PowerShell+script+open+when+executed'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/' data-shr_title='Keep+your+PowerShell+script+open+when+executed'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/' data-shr_title='Keep+your+PowerShell+script+open+when+executed'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Keep+your+PowerShell+script+open+when+executed+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1398"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/12/keep-your-powershell-script-open-when-executed/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Remove the saved state of a VM with PowerShell</title>
		<link>http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/</link>
		<comments>http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/#comments</comments>
		<pubDate>Thu, 13 Dec 2012 09:56:04 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SCVMM]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1394</guid>
		<description><![CDATA[Just now I read a post from Ben Armstrong (MSFT) talking about starting a VM which has a missing virtual hard disk. In there, he writes about removing a saved state of a virtual machine and he explained how to do it from a GUI. Well, here&#8217;s the PowerShell way: Get-VM -Name VM01 &#124; Remove-VMSavedState [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/' data-shr_title='Remove+the+saved+state+of+a+VM+with+PowerShell'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/' data-shr_title='Remove+the+saved+state+of+a+VM+with+PowerShell'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/' data-shr_title='Remove+the+saved+state+of+a+VM+with+PowerShell'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Just now I read a post from Ben Armstrong (MSFT) talking about <a href="http://blogs.msdn.com/b/virtual_pc_guy/archive/2012/12/12/starting-a-saved-virtual-machine-with-a-missing-virtual-hard-disk.aspx">starting a VM which has a missing virtual hard disk</a>.<br />
In there, he writes about removing a saved state of a virtual machine and he explained how to do it from a GUI.</p>
<p>Well, here&#8217;s the PowerShell way:</p>
<pre class="brush:powershell">Get-VM -Name VM01 | Remove-VMSavedState</pre>
<p>And when you&#8217;re in the mood to clean your environment, here&#8217;s how to do it for all VMs:</p>
<pre class="brush:powershell">Get-VM | Remove-VMSavedState</pre>
<div class="shr-publisher-1394"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/' data-shr_title='Remove+the+saved+state+of+a+VM+with+PowerShell'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/' data-shr_title='Remove+the+saved+state+of+a+VM+with+PowerShell'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/' data-shr_title='Remove+the+saved+state+of+a+VM+with+PowerShell'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Remove+the+saved+state+of+a+VM+with+PowerShell+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1394"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/12/remove-the-saved-state-of-a-vm-with-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A PowerShell oneliner that exponentially consumes all memory</title>
		<link>http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/</link>
		<comments>http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/#comments</comments>
		<pubDate>Wed, 12 Dec 2012 08:40:27 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1384</guid>
		<description><![CDATA[Why would you want to write a script that intentionally consumes memory exponentially? I find that for demo and test purposes this is very useful, especially when it comes to demonstrate Dynamic Memory in Hyper-V. So I wrote the following oneliner: do { $a += Get-Process } until ( !$a ) Or in short: do{$a+=gps}until(!$a) Now [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/' data-shr_title='A+PowerShell+oneliner+that+exponentially+consumes+all+memory'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/' data-shr_title='A+PowerShell+oneliner+that+exponentially+consumes+all+memory'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/' data-shr_title='A+PowerShell+oneliner+that+exponentially+consumes+all+memory'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Why would you want to write a script that intentionally consumes memory exponentially?<br />
I find that for demo and test purposes this is very useful, especially when it comes to demonstrate Dynamic Memory in Hyper-V.</p>
<p>So I wrote the following oneliner:</p>
<pre class="brush:powershell">do { $a += Get-Process } until ( !$a )</pre>
<p>Or in short:</p>
<pre class="brush:powershell">do{$a+=gps}until(!$a)</pre>
<p>Now these oneliners will exponentially consume memory, but as you will notice it is very (!) slow&#8230;</p>
<p>You could use Get-ChildItem instead of Get-Process but it will give you errors for locations where it doesn&#8217;t have access to.<br />
You could do something with the -ErrorAction parameter, but for the purpose of a demo that&#8217;s not required:</p>
<pre class="brush:powershell">do{$a+=gci c: -rec}until(!$a)</pre>
<p>But as I noticed some time ago in an ITCamp which I was attending there is a far more elegant and more effective way to accomplish this task!<br />
<a href="https://twitter.com/jaap_brasser">Jaap Brasser</a>, also a member of <a href="http://www.dupsug.com">DuPSUG</a>, was attending the ITCamp as well and he came up with the following oneliner:</p>
<pre class="brush:powershell">1..50|%{$x=1}{[array]$x+=$x}</pre>
<p>This works great! Just try it and see your memory being consumed exponentially and much faster compared to the options I&#8217;ve previously mentioned in this post.</p>
<div class="shr-publisher-1384"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/' data-shr_title='A+PowerShell+oneliner+that+exponentially+consumes+all+memory'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/' data-shr_title='A+PowerShell+oneliner+that+exponentially+consumes+all+memory'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/' data-shr_title='A+PowerShell+oneliner+that+exponentially+consumes+all+memory'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+A+PowerShell+oneliner+that+exponentially+consumes+all+memory+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1384"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/12/a-powershell-oneliner-that-exponentially-consumes-all-memory/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How is my WinRM service configured?</title>
		<link>http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/</link>
		<comments>http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/#comments</comments>
		<pubDate>Tue, 11 Dec 2012 17:38:51 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1387</guid>
		<description><![CDATA[Sometimes you find yourself in a situation where you need to troubleshoot the WinRM service, specifically the fact that you get a message from your monitoring system that the WinRM service isn&#8217;t listening on a device. So, you can logon to the device and use the following command to find the configuration of the WinRM [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/' data-shr_title='How+is+my+WinRM+service+configured%3F'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/' data-shr_title='How+is+my+WinRM+service+configured%3F'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/' data-shr_title='How+is+my+WinRM+service+configured%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Sometimes you find yourself in a situation where you need to troubleshoot the WinRM service, specifically the fact that you get a message from your monitoring system that the WinRM service isn&#8217;t listening on a device.<br />
So, you can logon to the device and use the following command to find the configuration of the WinRM listener:</p>
<pre class="brush:powershell">winrm enumerate winrm/config/listener</pre>
<p>It will give you an output something like the following:</p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2012/12/WinRMListener.png"><img class="alignnone size-full wp-image-1388" title="WinRMListener" src="http://jeffwouters.nl/wp-content/uploads/2012/12/WinRMListener.png" alt="" width="957" height="147" /></a></p>
<p>&nbsp;</p>
<div class="shr-publisher-1387"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/' data-shr_title='How+is+my+WinRM+service+configured%3F'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/' data-shr_title='How+is+my+WinRM+service+configured%3F'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/' data-shr_title='How+is+my+WinRM+service+configured%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+How+is+my+WinRM+service+configured%3F+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1387"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/12/how-is-my-winrm-service-configured/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Summary of the 1st DuPSUG meeting</title>
		<link>http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/</link>
		<comments>http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 07:21:06 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1377</guid>
		<description><![CDATA[Yesterday I saw a tweet from Bjorn Houben, one of the 34 attendees of the 1st DuPSUG meeting, about one of his blog posts: Summary of 1st Dutch PowerShell User Group (DuPSUG) meeting. His post gives you an idea of how great it was, both because of the content and speakers but also very much [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/' data-shr_title='Summary+of+the+1st+DuPSUG+meeting'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/' data-shr_title='Summary+of+the+1st+DuPSUG+meeting'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/' data-shr_title='Summary+of+the+1st+DuPSUG+meeting'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Yesterday I saw a tweet from <a href="https://twitter.com/BjornHouben">Bjorn Houben</a>, one of the 34 attendees of the 1st DuPSUG meeting, about one of his blog posts: <a href="http://bjornhouben.wordpress.com/2012/11/30/summary-of-1st-dutch-powershell-user-group-dupsug-meeting/">Summary of 1st Dutch PowerShell User Group (DuPSUG) meeting</a>.<br />
His post gives you an idea of how great it was, both because of the content and speakers but also very much because of the attendees.</p>
<p>Yes, we were asked to leave the building because it was past 17:30 already&#8230; if they hadn&#8217;t said anything I think we would have stayed much, much longer&#8230; <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>Bjorn, great job!</p>
<div class="shr-publisher-1377"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/' data-shr_title='Summary+of+the+1st+DuPSUG+meeting'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/' data-shr_title='Summary+of+the+1st+DuPSUG+meeting'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/' data-shr_title='Summary+of+the+1st+DuPSUG+meeting'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Summary+of+the+1st+DuPSUG+meeting+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1377"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/11/summary-of-the-1st-dupsug-meeting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use PowerShell to let you know when a product is in stock at Amazon</title>
		<link>http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/</link>
		<comments>http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/#comments</comments>
		<pubDate>Wed, 21 Nov 2012 09:14:51 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1368</guid>
		<description><![CDATA[Webstores&#8230; gotta love them I&#8217;ve written this small PowerShell function which you can use to monitor Amazon and let you know when a product is in store. Modify the sleep value to your liking, now it checks every hour. Very useful if you don&#8217;t want to check every few minute/hour/day yourself function Watch-Amazone { param [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/' data-shr_title='Use+PowerShell+to+let+you+know+when+a+product+is+in+stock+at+Amazon'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/' data-shr_title='Use+PowerShell+to+let+you+know+when+a+product+is+in+stock+at+Amazon'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/' data-shr_title='Use+PowerShell+to+let+you+know+when+a+product+is+in+stock+at+Amazon'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Webstores&#8230; gotta love them <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
I&#8217;ve written this small PowerShell function which you can use to monitor Amazon and let you know when a product is in store.<br />
Modify the sleep value to your liking, now it checks every hour.</p>
<p>Very useful if you don&#8217;t want to check every few minute/hour/day yourself <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre class="brush:powershell">function Watch-Amazone
{
  param
  (
    [parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)][string]$ASIN,
    [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $false)][string]$Stock = "in stock",
    [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $true)][string]$Interval = 3600
  )
  $query="http://www.amazon.com/gp/product/" + $ASIN
  $WebClient = New-Object System.Net.WebClient

  While ($true)
  {
    $Amazone = $WebClient.DownloadString($query)
    if ($Amazone -match $Stock)
      { 
        Send-MailMessage -From "AmazoneWatch@domain.com" -To "user@domain.com" -Subject "Your product is now in stock at Amazone!" -Body "Get it now: $query"
        Write-Host "It's in stock!" -ForegroundColor green
      }
    else
      { 
        Write-Host  "Not in stock yet... please wait!" -ForegroundColor red
      }
    Start-sleep $interval
  }
}</pre>
<div class="shr-publisher-1368"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/' data-shr_title='Use+PowerShell+to+let+you+know+when+a+product+is+in+stock+at+Amazon'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/' data-shr_title='Use+PowerShell+to+let+you+know+when+a+product+is+in+stock+at+Amazon'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/' data-shr_title='Use+PowerShell+to+let+you+know+when+a+product+is+in+stock+at+Amazon'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Use+PowerShell+to+let+you+know+when+a+product+is+in+stock+at+Amazon+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1368"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/11/use-powershell-to-let-you-know-when-a-product-is-in-stock-at-amazon/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Restore the Microsoft PowerShell plugin to its default configuration</title>
		<link>http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/</link>
		<comments>http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/#comments</comments>
		<pubDate>Tue, 20 Nov 2012 20:40:50 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1363</guid>
		<description><![CDATA[Every once in a while I mess up my Windows installation… you know, things stop working and stuff giving errors all over the place. Due to some projects I’m working on the last few months the Microsoft.PowerShell plugin gets corrupted corrupted frequently (don’t ask my what I’m doing to accomplish that  ). Specifically, when trying [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/' data-shr_title='Restore+the+Microsoft+PowerShell+plugin+to+its+default+configuration'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/' data-shr_title='Restore+the+Microsoft+PowerShell+plugin+to+its+default+configuration'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/' data-shr_title='Restore+the+Microsoft+PowerShell+plugin+to+its+default+configuration'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Every once in a while I mess up my Windows installation… you know, things stop working and stuff giving errors all over the place.<br />
Due to some projects I’m working on the last few months the Microsoft.PowerShell plugin gets corrupted corrupted frequently (don’t ask my what I’m doing to accomplish that <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ).<br />
Specifically, when trying to open a remote session, or simply when I do a “Invoke-Command” to the localhost, an error is given stating that it cannot find the Microsoft.PowerShell session configuration in WSMAN.</p>
<p>So, how can you quickly fix that and more importantly, howto do it the easy way.</p>
<pre class="brush:powershell">winrm invoke Restore http://schemas.microsoft.com/wbem/wsman/1/config/plugin @{}</pre>
<p>This will restore the default plugin configuration… and yes, you’ll need an internet connection for this to work <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><span style="color: #ff0000;">Note:</span> I&#8217;m assuming here that you&#8217;ve checked if WinRM is configured properly. The solution in this post is a last resort and should not be applied when other options (like <em>Enable-PSRemoting -Force</em>) are available.</p>
<p><strong>Big fat note: All external plugins will be unregistered by this command!</strong></p>
<div class="shr-publisher-1363"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/' data-shr_title='Restore+the+Microsoft+PowerShell+plugin+to+its+default+configuration'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/' data-shr_title='Restore+the+Microsoft+PowerShell+plugin+to+its+default+configuration'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/' data-shr_title='Restore+the+Microsoft+PowerShell+plugin+to+its+default+configuration'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Restore+the+Microsoft+PowerShell+plugin+to+its+default+configuration+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1363"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/11/restore-the-microsoft-powershell-plugin-to-its-default-configuration/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PowerShell Workflow Foreach Parallel limited to 5 parallel threads</title>
		<link>http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/</link>
		<comments>http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/#comments</comments>
		<pubDate>Mon, 05 Nov 2012 15:24:57 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1327</guid>
		<description><![CDATA[Some time ago Aidan Finn, one of my Hyper-V heroes, contacted me with a PowerShell question. Until that time I was able to help him quickly with every question he has thrown at me the last year&#8230; but he finally had one that was a real braincracker ProblemPowerShell v3 has introduced Workflow which is based [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/' data-shr_title='PowerShell+Workflow+Foreach+Parallel+limited+to+5+parallel+threads'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/' data-shr_title='PowerShell+Workflow+Foreach+Parallel+limited+to+5+parallel+threads'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/' data-shr_title='PowerShell+Workflow+Foreach+Parallel+limited+to+5+parallel+threads'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Some time ago <a href="http://www.twitter.com/joe_elway">Aidan Finn</a>, one of my Hyper-V heroes, contacted me with a PowerShell question. Until that time I was able to help him quickly with every question he has thrown at me the last year&#8230; but he finally had one that was a real braincracker <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>ProblemPowerShell v3 has introduced Workflow which is based on the Windows Workflow Foundation.</p>
<p>One way you can use this is by creating a workflow there the -parallel parameter can be used with the ForEach statement, for example:</p>
<pre class="brush:powershell">Workflow New-VMParallel
{
  Param ([parameter(Mandatory=$true)][String[]] $VMList)
  ForEach -Parallel ($VM in $VMList) 
  {
    New-VM –Name $VM –MemoryStartupBytes 512MB
  } 
}</pre>
<p>Now this can be used very easy, for example by creating a $VMList array with a bunch of numbers from 1 to 200:</p>
<pre class="brush:powershell">$VMList = 1..200</pre>
<p>So Aidan had noticed, and why he contacted me, was that is a maximum of 5 parallel threads!<br />
No matter what we did, we were not able to exceed this maximum when using Workflow.<br />
Trust me when I say I had gotten rather frustrated about this! <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>My first try in finding a workaround was rather simple&#8230; it was actually one of my older scripts with a small change:</p>
<pre class="brush:powershell">Workflow New-VMParallel
{
  Param ([parameter(Mandatory=$true)][String[]] $VMList)
  $first = $VMList[0]..$VMList[4]
  $second = $VMList[5]..$VMList[9]
  $third = $VMList[10]..$VMList[14]
  $fourth = $VMList[15]..$VMList[19]
  $fifth = $VMList[20]..$VMList[24]
  parallel
  {
    if ($first) {ForEach -Parallel ($VM in $First) {New-VM –Name VM$VM –MemoryStartupBytes 512MB} }
    if ($second) {ForEach -Parallel ($VM in $second) {New-VM –Name VM$VM –MemoryStartupBytes 512MB} }
    if ($third) {ForEach -Parallel ($VM in $third) {New-VM –Name VM$VM –MemoryStartupBytes 512MB} }
    if ($fourth) {ForEach -Parallel ($VM in $fourth) {New-VM –Name VM$VM –MemoryStartupBytes 512MB} }
    if ($fifth) {ForEach -Parallel ($VM in $fifth) {New-VM –Name VM$VM –MemoryStartupBytes 512MB} }
  } 
}</pre>
<p>So in theory the code above would execute all five tasks  in parallel when each of those tasks would also execute its five tasks parallel. So 5*5=25 tasks in parallel&#8230; nasty, but if it had worked it would have been a quick-n-dirty workaround. No such luck&#8230; I experienced the same issue, a maximum of 5 parallel threads <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Workflow is an great technology and the easy of which it can be used with the ForEach statement is just amazing&#8230; so a non-customizable limit of a maximum parallel threads doesn&#8217;t sound logical to me.<br />
The task itself doesn&#8217;t matter but in the example given above it should only be limited by your environment (disks, CPU, memory, network, etc.) and not by the code.<br />
I&#8217;ve also tried it with a copy task of 50 1GB files&#8230; same thing, maximum of 5 parallel threads. So the cause wasn&#8217;t in Hyper-V.</p>
<p>Until that time I was able to do everything with PowerShell, solve any problem and always find a solution or workaround&#8230; it may have taken me days to do it (since also I am still learning) but I was always able to find a way&#8230; and something as simple as this would break my stride? <em>Like hell it will!<br />
* Yes, frustration can be a strong motivator&#8230; </em></p>
<p>So, when the limit seems to be inside Workflow itself, the logical next step would be not to use Workflow.</p>
<p>So I&#8217;m very happy with my workaround (yes, I see it as a workaround&#8230; it should be &#8216;fixed&#8217; in Workflow&#8230; or at least I think that scripters have to be given the option to customize the maximum parallel threads with a parameter or whatever). Writing the workaround was also a great learning experience for me personally &#8217;cause I&#8217;m using PowerShell in ways that I&#8217;m not used to (i.e. the BEGIN-PROCESS-END) but are very powerfull nevertheless.<br />
Simply put:, I&#8217;ve written a function, Foreach-Parallel.</p>
<pre class="brush:powershell">&lt;#
.Synopsis
   This function can be used to execute tasks in parallel.
.DESCRIPTION
   This function can be used to execute tasks in parallel with more than 5 parallel tasks at once.
   The number of parallel tasks can be defined by parameter. The input is accepted by defining it by using
   the -InputObject parameter which also accepts input from the pipeline.
.EXAMPLE
   Get-ChildItem -Path D:\Files | ForEach-Parallel -MaxThreads 100 -ScriptBlock {Copy-Item -Path $_.FullName -Destination E:\Company\Files}
.EXAMPLE
   1..500 | Foreach-Parallel -MaxThreads 20 -ScriptBlock {New-VM –Name VM$_ –MemoryStartupBytes 512MB}
.EXAMPLE
   ForEach-Parallel -InputObject (Get-ChildItem -Path "D:\Files") -MaxThreads 100 -ScriptBlock {Copy-Item -Path $_.FullName -Destination E:\Company\Files}
#&gt;

function ForEach-Parallel
{
  param (
    [Parameter(Mandatory=$true,ValueFromPipeline=$true)][Alias("Input")][ValidateNotNullOrEmpty()][PSObject]$InputObject,
    [Parameter(Mandatory=$false)][Alias("Threads")][ValidateNotNullOrEmpty()][int]$MaxThreads=5,
    [Parameter(Mandatory=$true,Position=0)][Alias("Script")][ValidateNotNullOrEmpty()][System.Management.Automation.ScriptBlock]$ScriptBlock
  )
  BEGIN 
  {
    $InitialSessionState = [system.management.automation.runspaces.initialsessionstate]::CreateDefault()
    $RunspacePool = [Runspacefactory]::CreateRunspacePool(1, $MaxThreads, $InitialSessionState, $Host)
    $RunspacePool.Open()
    $Threads = @()
    $ScriptBlock = $ExecutionContext.InvokeCommand.NewScriptBlock("param(`$_)`r`n" + $Scriptblock.ToString())
  }
  PROCESS
  {
    $PowerShell = ::Create().AddScript($ScriptBlock).AddArgument($InputObject)
    $PowerShell.RunspacePool=$RunspacePool
    $Threads+= @{instance = $PowerShell;handle = $PowerShell.BeginInvoke()}
  }
  END
  {
    $Running = $true
    while ($Running)
    {
      $Running = $false
      for ($i=0; $i -lt $Threads.Count; $i++)
      {
        $Thread = $Threads[$i]
        if ($Thread.handle.iscompleted) 
        {
          $Thread.instance.endinvoke($Thread.handle)
          $Thread.instance.dispose()
          $Thread[$i] = $null
        }
        else 
        {
          $Running = $true
        }
      }
    }
  }
}</pre>
<p><strong>Note:</strong> <em>As it seems the plugin I use on my blog for posting code doesn&#8217;t like it when I use a spcific code&#8230; place [] with powershell in between in front of </em><em>::Create().AddScript($ScriptBlock).AddArgument($InputObject) and it will work </em> <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Please don&#8217;t get me the wrong way&#8230; I encourage you to start or remain using Workfow; it is still a brilliant piece of technology <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>And this blogpost is why I love helping the community&#8230; people get enthousiastic about PowerShell, they encounter issues and contact me asking for information or help&#8230; and every once in a while something like this comes along <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The funny thing however is that I don&#8217;t think that I would have been able to write this script if the community itself wasn&#8217;t here&#8230; The TechNet website was a great source of information for me and also a lot, and i do mean a log, of blogs I found by using Google helped me out big time <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Also the RunspacePool was new to me, more about that in a post that I&#8217;ll write in the future.</p>
<div class="shr-publisher-1327"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/' data-shr_title='PowerShell+Workflow+Foreach+Parallel+limited+to+5+parallel+threads'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/' data-shr_title='PowerShell+Workflow+Foreach+Parallel+limited+to+5+parallel+threads'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/' data-shr_title='PowerShell+Workflow+Foreach+Parallel+limited+to+5+parallel+threads'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+Workflow+Foreach+Parallel+limited+to+5+parallel+threads+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1327"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/11/powershell-workflow-foreach-parallel-limited-to-5-parallel-threads/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Why do things by hand when you have PowerShell? &#8211; Part 1</title>
		<link>http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/</link>
		<comments>http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/#comments</comments>
		<pubDate>Fri, 02 Nov 2012 15:33:42 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1324</guid>
		<description><![CDATA[A few months ago I write a blog post about winning a bet about a PowerShell Switch statement. Jeffery Hicks commented on the post that he was hoping I used PowerShell to write the code in that post&#8230; if I had done it by hand I would have been plain crazy! Now although I am [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/' data-shr_title='Why+do+things+by+hand+when+you+have+PowerShell%3F+-+Part+1'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/' data-shr_title='Why+do+things+by+hand+when+you+have+PowerShell%3F+-+Part+1'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/' data-shr_title='Why+do+things+by+hand+when+you+have+PowerShell%3F+-+Part+1'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>A few months ago I write a blog post about <a href="http://jeffwouters.nl/index.php/2012/09/winning-a-bet-about-the-powershell-switch-statement/">winning a bet about a PowerShell Switch statement</a>.</p>
<p>Jeffery Hicks commented on the post that he was hoping I used PowerShell to write the code in that post&#8230; if I had done it by hand I would have been plain crazy!<br />
Now although I am pretty much crazy, I don&#8217;t like manual labor&#8230; so, how can you do something like that in an easy way?</p>
<p>It&#8217;s actually very easy with just three simple steps:</p>
<p>1) Create 300 objects:</p>
<pre class="brush:powershell">1..300</pre>
<p>2) For each object, do a Write-Output:</p>
<pre class="brush:powershell">1..300 | ForEach-Object {Write-Output "$_ {The number is $_}"}</pre>
<p>4) Redirect the output to the clipboard so you can paste it in a blog post:</p>
<pre class="brush:powershell">1..300 | ForEach-Object {Write-Output "$_ {The number is $_}"} | clip.exe</pre>
<p>Writing the script? about 3 minutes&#8230;<br />
Doing it by hand? Are you nuts!!!!???? <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="shr-publisher-1324"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/' data-shr_title='Why+do+things+by+hand+when+you+have+PowerShell%3F+-+Part+1'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/' data-shr_title='Why+do+things+by+hand+when+you+have+PowerShell%3F+-+Part+1'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/' data-shr_title='Why+do+things+by+hand+when+you+have+PowerShell%3F+-+Part+1'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Why+do+things+by+hand+when+you+have+PowerShell%3F+%E2%80%93+Part+1+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1324"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/11/why-do-things-by-hand-when-you-have-powershell-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Black or grey screen with HP ILO on a blade server</title>
		<link>http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/</link>
		<comments>http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/#comments</comments>
		<pubDate>Wed, 31 Oct 2012 12:30:59 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1322</guid>
		<description><![CDATA[Problem When working on the HP ILO of a blade server you get a grey/black screen, both with the ILO through the Java- and ActiveX-based ILO. A reboot of the server does not offer a solution, the grey/black screen remains. No POST message is shown at the (re)boot of the server. Cause Unknown. Resolution  1 [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/' data-shr_title='Black+or+grey+screen+with+HP+ILO+on+a+blade+server'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/' data-shr_title='Black+or+grey+screen+with+HP+ILO+on+a+blade+server'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/' data-shr_title='Black+or+grey+screen+with+HP+ILO+on+a+blade+server'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p><strong>Problem</strong><br />
When working on the HP ILO of a blade server you get a grey/black screen, both with the ILO through the Java- and ActiveX-based ILO.<br />
A reboot of the server does not offer a solution, the grey/black screen remains.<br />
No POST message is shown at the (re)boot of the server.</p>
<p><strong>Cause</strong><br />
Unknown.</p>
<p><strong>Resolution  1</strong><br />
1) Reset the ILO.<br />
2) Perform a &#8216;cold boot&#8217;  of the machine.</p>
<p><strong>Resolution 2</strong><br />
1) Open a telnet session to your enclosure.<br />
2)  Logon to the telnet session.<br />
3) Execute the following command : Reset Server &lt;bay number of your server&gt;</p>
<pre class="brush:powershell">DC1RCK1ENC2&gt; reset server 3

WARNING: Resetting the server trips its E-Fuse. This causes all power to be momentarily 
removed from the server. This command should only be used when physical access to the 
server is unavailable, and the server must be removed and reinserted.

Any disk operations on direct attached storage devices will be affected. I/O
will be interrupted on any direct attached I/O devices.

Entering anything other than 'YES' will result in the command not executing.

Do you want to continue ? YES

Successfully reset the E-Fuse for device bay 3.</pre>
<div class="shr-publisher-1322"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/' data-shr_title='Black+or+grey+screen+with+HP+ILO+on+a+blade+server'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/' data-shr_title='Black+or+grey+screen+with+HP+ILO+on+a+blade+server'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/' data-shr_title='Black+or+grey+screen+with+HP+ILO+on+a+blade+server'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Black+or+grey+screen+with+HP+ILO+on+a+blade+server+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1322"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/10/black-or-grey-screen-with-hp-ilo-on-a-blade-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Scripting Dutchman and The Scripting Dutchmen</title>
		<link>http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/</link>
		<comments>http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/#comments</comments>
		<pubDate>Tue, 30 Oct 2012 08:24:32 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1318</guid>
		<description><![CDATA[Although I didn&#8217;t had any PowerShell workshops or presentations planned this week, I did receive a call last Friday afternoon requesting me to do one. And so, yesterday evening it was time again to show off some PowerShell goodness Last evening I was introduced with a new nickname: Jeff &#8216;The Scripting Dutchman&#8217; Wouters Walking on [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/' data-shr_title='The+Scripting+Dutchman+and+The+Scripting+Dutchmen'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/' data-shr_title='The+Scripting+Dutchman+and+The+Scripting+Dutchmen'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/' data-shr_title='The+Scripting+Dutchman+and+The+Scripting+Dutchmen'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Although I didn&#8217;t had any PowerShell workshops or presentations planned this week, I did receive a call last Friday afternoon requesting me to do one.<br />
And so, yesterday evening it was time again to show off some PowerShell goodness <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Last evening I was introduced with a new nickname: Jeff &#8216;The Scripting Dutchman&#8217; Wouters <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /><br />
Walking on stage, laughing about the nickname, I started the presentation and mentioned that I never heard that nickname before and that I&#8217;ll remember it.</p>
<p>So, this morning I&#8217;ve registered http://www.thescriptingdutchman.com and http://www.thescriptingdutchman.nl which now link to http://www.jeffwouters.nl</p>
<p>But&#8230; &#8216;man&#8217; is a singular person where &#8216;men&#8217; is many persons.</p>
<p>So since I was adding aliasses I&#8217;ve also added two for the Dutch PowerShell User Group.<br />
Both http://www.thescriptingdutchmen.com and http://www.thescriptingdutchmen.nl link to http://www.dupsug.com</p>
<div class="shr-publisher-1318"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/' data-shr_title='The+Scripting+Dutchman+and+The+Scripting+Dutchmen'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/' data-shr_title='The+Scripting+Dutchman+and+The+Scripting+Dutchmen'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/' data-shr_title='The+Scripting+Dutchman+and+The+Scripting+Dutchmen'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+The+Scripting+Dutchman+and+The+Scripting+Dutchmen+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1318"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/10/the-scripting-dutchman-and-the-scripting-dutchmen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade your Windows Server edition without a re-install</title>
		<link>http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/</link>
		<comments>http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/#comments</comments>
		<pubDate>Mon, 29 Oct 2012 14:24:11 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1315</guid>
		<description><![CDATA[Back in the ‘old days’ there were , just as right now, different version of Windows Server. Whenever you installed the Enterprise Edition and realized you should have chosen DataCenter edition, you would need to do a re-install of the operating system. Very, very annoying… Then Windows Server 2008 R2 was introduced Open-mouthed smile One [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/' data-shr_title='Upgrade+your+Windows+Server+edition+without+a+re-install'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/' data-shr_title='Upgrade+your+Windows+Server+edition+without+a+re-install'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/' data-shr_title='Upgrade+your+Windows+Server+edition+without+a+re-install'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Back in the ‘old days’ there were , just as right now, different version of Windows Server.<br />
Whenever you installed the Enterprise Edition and realized you should have chosen DataCenter edition, you would need to do a re-install of the operating system.<br />
Very, very annoying…</p>
<p>Then Windows Server 2008 R2 was introduced Open-mouthed smile</p>
<p>One of its may improvements was the ability to ‘upgrade’ your Windows edition within having to re-install the entire operating system.<br />
Instead, you could do this with a simple commandline where you use the tool called DISM which is part of the operating system since Windows Server 2008 R2.</p>
<p>The supported upgrade paths for Windows Server 2008 R2 are:</p>
<ul>
<li>Windows Server 2008 R2 Standard -&gt; Windows Server 2008 R2 Enterprise -&gt; Windows Server 2008 R2 Datacenter</li>
<li>Windows Server 2008 R2 Standard Server Core -&gt; Windows Server 2008 R2 Enterprise Server Core -&gt; Windows Server 2008 R2 Datacenter Server Core</li>
<li>Windows Server 2008 R2 Foundation -&gt; Windows Server 2008 R2 Standard</li>
</ul>
<p>So, howto do the actual upgrade? Easy <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<pre class="brush:powershell">PS C:\Users\Jeff&gt; dism /online /get-currentedition

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385
Image Version: 6.1.7600.16385
Current edition is:
Current Edition : ServerEnterprise
The operation completed successfully.

PS C:\Users\Jeff&gt; dism /online /get-targeteditions

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385
Image Version: 6.1.7600.16385
Editions that can be upgraded to:
Target Edition : ServerDataCenter
The operation completed successfully.

PS C:\Users\Jeff&gt; dism /online /Set-Edition:ServerDataCenter /ProductKey:74YFP-3QFB3-KQT8W-PMXWJ-7M648

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385
Image Version: 6.1.7600.16385
Starting to update components...
Starting to install product key...
Finished installing product key.
Removing package Microsoft-Windows-ServerEnterpriseEdition~31bf3856ad364e35~amd64~~6.1.7601.17514
[==========================100.0%==========================]
Finished updating components.
Starting to apply edition-specific settings...
Restart Windows to complete this operation.

Do you want to restart the computer now (Y/N)?</pre>
<p>Note that in this post I&#8217;ve used the KMS Client Setup Key. These keys can be found here: http://technet.microsoft.com/en-us/library/ff793421.aspx</p>
<div class="shr-publisher-1315"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/' data-shr_title='Upgrade+your+Windows+Server+edition+without+a+re-install'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/' data-shr_title='Upgrade+your+Windows+Server+edition+without+a+re-install'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/' data-shr_title='Upgrade+your+Windows+Server+edition+without+a+re-install'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Upgrade+your+Windows+Server+edition+without+a+re-install+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1315"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/10/upgrade-your-windows-server-edition-without-a-re-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use PowerShell to write to the event log</title>
		<link>http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/</link>
		<comments>http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/#comments</comments>
		<pubDate>Mon, 29 Oct 2012 13:15:09 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1313</guid>
		<description><![CDATA[Whenever writing scripts that are intended to automate something I always want to leave something behind so I can see if the script has run correctly. Sometimes this can be as easy as a report to a file, e-mail or something like it. However, in an enterprise environment you propably have a monitoring tool that [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/' data-shr_title='Use+PowerShell+to+write+to+the+event+log'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/' data-shr_title='Use+PowerShell+to+write+to+the+event+log'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/' data-shr_title='Use+PowerShell+to+write+to+the+event+log'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Whenever writing scripts that are intended to automate something I always want to leave something behind so I can see if the script has run correctly.<br />
Sometimes this can be as easy as a report to a file, e-mail or something like it.</p>
<p>However, in an enterprise environment you propably have a monitoring tool that also monitors the eventlogs of the operating systems&#8230; you can use that!<br />
Would&#8217;t it be nice to configure your monitoring tools to pick up the your scripts leave behind?<br />
So, the script would need to create an event in the Windows Event Log&#8230; Howto do that?</p>
<pre class="brush:powershell">trap [Exception] { 
	$log = Get-EventLog -List | Where-Object { $_.Log -eq "Application" }
	$log.Source = "MyScriptName"
	$log.WriteEntry("TRAPPED: $error[0]", [system.Diagnostics.EventLogEntryType]::Error,1234) 
	exit 
}</pre>
<p>You can simply modify the log source to the name of your script (where the error originated from) and the error ID (1234 in my example) <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>And to convert it into a reusable function:</p>
<pre class="brush:powershell">function Write-EventLog
{
  [CmdletBinding()]
  [OutputType([int])]
  Param (
    [Parameter(Mandatory=$true)][string]$LogName,
    [parameter(Mandatory=$true)][int]$EventID,
    [Parameter(Mandatory=$true)][string]$SourceName,
    [Parameter(Mandatory=$true)][string]$ErrorMessage
  )
  trap [Exception] { 
    $log = Get-EventLog -List | Where-Object { $_.Log -eq $LogName }
    $log.Source = $SouceName
    $log.WriteEntry("TRAPPED: $ErrorMessage", [system.Diagnostics.EventLogEntryType]::Error,$EventID) 
    exit 
  }
}</pre>
<p>Some of you may correctly think that this is taking the long way around since there is the Write-EventLog cmdlet.<br />
By using this, you can accomplish the same:</p>
<pre class="brush:powershell">trap [Exception] { 
  Write-EventLog -LogName Application -source MyScriptName -EventId 1234 -message "TRAPPED: $error[0]"
  exit
}</pre>
<p>And to convert that into a function:</p>
<pre class="brush:powershell">function Write-EventLog
{
  [CmdletBinding()]
  [OutputType([int])]
  Param (
    [Parameter(Mandatory=$true)][string]$LogName,
    [parameter(Mandatory=$true)][int]$EventID,
    [Parameter(Mandatory=$true)][string]$SourceName,
    [Parameter(Mandatory=$true)][string]$ErrorMessage
  )
  trap [Exception] { 
    Write-EventLog -LogName $LogName -source $SourceName -EventId $EventID -message "TRAPPED: $ErrorMessage"
    exit
  }
}</pre>
<p>As you can see there are multiple ways to accomplish your goal <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="shr-publisher-1313"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/' data-shr_title='Use+PowerShell+to+write+to+the+event+log'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/' data-shr_title='Use+PowerShell+to+write+to+the+event+log'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/' data-shr_title='Use+PowerShell+to+write+to+the+event+log'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Use+PowerShell+to+write+to+the+event+log+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1313"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/10/use-powershell-to-write-to-the-event-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows RT has PowerShell</title>
		<link>http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/</link>
		<comments>http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/#comments</comments>
		<pubDate>Fri, 26 Oct 2012 09:04:30 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1306</guid>
		<description><![CDATA[Yes, you’ve read the title correctly… Windows RT has PowerShell! And here I was afraid that RT would be a totally stripped Windows version, so no PowerShell… But there seems to be someone at Microsoft that loves us scripters… so thank you! Edit: One tiny little detail&#8230; I just heard on Twitter that the PowerShell [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/' data-shr_title='Windows+RT+has+PowerShell'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/' data-shr_title='Windows+RT+has+PowerShell'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/' data-shr_title='Windows+RT+has+PowerShell'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p><span style="font-family: Arial; font-size: medium;">Yes, you’ve read the title correctly… Windows RT has PowerShell!<br />
And here I was afraid that RT would be a totally stripped Windows version, so no PowerShell…<br />
But there seems to be someone at Microsoft that loves us scripters… so thank you!<br />
<br />
<b>Edit:</b> One tiny little detail&#8230; I just heard on Twitter that the PowerShell on RT is constrained.<br />
Haven&#8217;t found any documentation on it though, guess that will be available later?</span></p>
<p>&nbsp;</p>
<p><a href="http://jeffwouters.nl/wp-content/uploads/2012/10/image1.png"><span style="font-family: Arial; font-size: medium;"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" src="http://jeffwouters.nl/wp-content/uploads/2012/10/image_thumb1.png" alt="image" width="782" height="276" border="0" /></span></a></p>
<p>&nbsp;</p>
<div class="shr-publisher-1306"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/' data-shr_title='Windows+RT+has+PowerShell'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/' data-shr_title='Windows+RT+has+PowerShell'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/' data-shr_title='Windows+RT+has+PowerShell'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+Windows+RT+has+PowerShell+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1306"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/10/windows-rt-has-powershell/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>VMM &#8211; PowerShell oneliners to set VM Network Optimization (Part 2)</title>
		<link>http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/</link>
		<comments>http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/#comments</comments>
		<pubDate>Wed, 24 Oct 2012 12:14:50 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SCVMM]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1302</guid>
		<description><![CDATA[Some time ago I wrote a blog post PowerShell oneliner to enable VM Network Optimization in VMM Last week I received a question about this post: Howto accomplish this on only VM&#8217;s on a specific cluster, or even a specific node. So let&#8217;s start with the node since that&#8217;s the easy one. To select all virtual [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/' data-shr_title='VMM+-+PowerShell+oneliners+to+set+VM+Network+Optimization+%28Part+2%29'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/' data-shr_title='VMM+-+PowerShell+oneliners+to+set+VM+Network+Optimization+%28Part+2%29'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/' data-shr_title='VMM+-+PowerShell+oneliners+to+set+VM+Network+Optimization+%28Part+2%29'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Some time ago I wrote a blog post <a href="http://jeffwouters.nl/index.php/2012/08/powershell-oneliner-to-enable-vm-network-optimization-in-vmm/">PowerShell oneliner to enable VM Network Optimization in VMM</a></p>
<p>Last week I received a question about this post: <em>Howto accomplish this on only VM&#8217;s on a specific cluster, or even a specific node</em>.<br />
So let&#8217;s start with the node since that&#8217;s the easy one.</p>
<p>To select all virtual machines on a node:</p>
<pre class="brush:powershell">Get-VMHost -ComputerName HVC01N01 | Get-VM</pre>
<p>And to enable the VM Network Optimzation on them:</p>
<pre class="brush:powershell">Get-VMHost -ComputerName HVC01N01 | Get-VM | ForEach-Object { Set-VirtualNetworkAdapter -VMNetworkOptimizationEnabled $True }</pre>
<p>But most clusters will consist of more than one node&#8230;<br />
Executing a line for each cluster node? Well&#8230; there should be a more elegant way to accomplish that task.<br />
And there is <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>To select the cluster:</p>
<pre class="brush:powershell">Get-VMHostCluster -Name HVC01</pre>
<p>To select all nodes within that cluster:</p>
<pre class="brush:powershell">Get-VMHostCluster -Name HVC01 | Get-VMHost</pre>
<p>To select all VMs on a cluster:</p>
<pre class="brush:powershell">Get-VMHostCluster -Name HVC01 | Get-VMHost | Get-VM</pre>
<p>And of course to set the VM Network Optimization on all those VM&#8217;s:</p>
<pre class="brush:powershell">Get-VMHostCluster -Name HVC01 | Get-VMHost | Get-VM | ForEach-Object { Set-VirtualNetworkAdapter -VMNetworkOptimizationEnabled $True }</pre>
<p>Note how easy you can use the pipeline this way in order to go deeper from cluster to nodes to VM&#8217;s <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<div class="shr-publisher-1302"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/' data-shr_title='VMM+-+PowerShell+oneliners+to+set+VM+Network+Optimization+%28Part+2%29'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/' data-shr_title='VMM+-+PowerShell+oneliners+to+set+VM+Network+Optimization+%28Part+2%29'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/' data-shr_title='VMM+-+PowerShell+oneliners+to+set+VM+Network+Optimization+%28Part+2%29'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+VMM+%E2%80%93+PowerShell+oneliners+to+set+VM+Network+Optimization+%28Part+2%29+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1302"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/10/vmm-powershell-oneliners-to-set-vm-network-optimization-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell &#8211; What type is my variable?</title>
		<link>http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/</link>
		<comments>http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/#comments</comments>
		<pubDate>Wed, 24 Oct 2012 07:53:02 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[DuPSUG]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1298</guid>
		<description><![CDATA[When learning you will propably encounter a situation where you would want to know of which type your variable is&#8230; a string, array, integrr, boolean&#8230;? At the time when you&#8217;re more advanced in PowerShell you will look at the code where you create the variable and know what type it is&#8230; but especially when you&#8217;re [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/' data-shr_title='PowerShell+-+What+type+is+my+variable%3F'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/' data-shr_title='PowerShell+-+What+type+is+my+variable%3F'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/' data-shr_title='PowerShell+-+What+type+is+my+variable%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>When learning you will propably encounter a situation where you would want to know of which type your variable is&#8230; a string, array, integrr, boolean&#8230;?<br />
At the time when you&#8217;re more advanced in PowerShell you will look at the code where you create the variable and know what type it is&#8230; but especially when you&#8217;re learning the basics this is not so easy.</p>
<p>So how do you know?<br />
It&#8217;s actually pretty easy&#8230; all variables have the &#8216;GetType&#8217; method attached to it which gives you the feedback what type the variable is <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre class="brush:powershell">PS C:\Users\Jeff&gt; $VarInteger = 123
PS C:\Users\Jeff&gt; $varinteger.gettype()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Int32                                    System.ValueType

PS C:\Users\Jeff&gt; $VarArray = "1","2","3"
PS C:\Users\Jeff&gt; $VarArray.gettype()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Object[]                                 System.Array

PS C:\Users\Jeff&gt; $VarString = "123"
PS C:\Users\Jeff&gt; $varString.gettype()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     String                                   System.Object</pre>
<div class="shr-publisher-1298"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/' data-shr_title='PowerShell+-+What+type+is+my+variable%3F'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/' data-shr_title='PowerShell+-+What+type+is+my+variable%3F'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/' data-shr_title='PowerShell+-+What+type+is+my+variable%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+%E2%80%93+What+type+is+my+variable%3F+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1298"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/10/powershell-what-type-is-my-variable/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PowerShell oneliner to change virtual switch settings on virtual machines</title>
		<link>http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/</link>
		<comments>http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 08:24:53 +0000</pubDate>
		<dc:creator>Jeff Wouters</dc:creator>
				<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://jeffwouters.nl/?p=1295</guid>
		<description><![CDATA[Recently I’ve been asked howto use PowerShell to modify the virtual switch setting on VMs. Specifically they wanted to migrate 30+ IIS virtual machines from one virtual switch to another. This was because since their configuration was that each VLAN has their own virtual switch on the Hyper-V hosts. Get-VM -Name "*IIS*" &#124; ForEach-Object {Connect-VMNetworkAdapter [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/' data-shr_title='PowerShell+oneliner+to+change+virtual+switch+settings+on+virtual+machines'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/' data-shr_title='PowerShell+oneliner+to+change+virtual+switch+settings+on+virtual+machines'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/' data-shr_title='PowerShell+oneliner+to+change+virtual+switch+settings+on+virtual+machines'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Recently I’ve been asked howto use PowerShell to modify the virtual switch setting on VMs.<br />
Specifically they wanted to migrate 30+ IIS virtual machines from one virtual switch to another.<br />
This was because since their configuration was that each VLAN has their own virtual switch on the Hyper-V hosts.</p>
<pre class="brush:powershell">Get-VM -Name "*IIS*" | ForEach-Object {Connect-VMNetworkAdapter -VMName $_.Name -SwitchName "vSwitch VLAN901"}</pre>
<p>Why don&#8217;t I just use the pipe directly and avoid the ForEach all together?<br />
The VMName parameter doesn&#8217;t take pipeline input <img src='http://jeffwouters.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="shr-publisher-1295"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/' data-shr_title='PowerShell+oneliner+to+change+virtual+switch+settings+on+virtual+machines'></a><a class='shareaholic-fbsend' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/' data-shr_title='PowerShell+oneliner+to+change+virtual+switch+settings+on+virtual+machines'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/' data-shr_title='PowerShell+oneliner+to+change+virtual+switch+settings+on+virtual+machines'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=My+new+blog+post%3A+PowerShell+oneliner+to+change+virtual+switch+settings+on+virtual+machines+http%3A%2F%2Fjeffwouters.nl%2F%3Fp%3D1295"><img class="nothumb" src="http://jeffwouters.nl/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://jeffwouters.nl/index.php/2012/10/powershell-oneliner-to-change-virtual-switch-settings-on-virtual-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
