Follow-up on Scripting Games 2013 Event 6

As you can see, MVP Richard Siddaway voted so far on more than 1000 script, WOW!!!!!
He left the following comment on my Event 6 entry:

Don’t get me wrong. I really appreciate the feedback. The Scripting Games are a unique occasion to get a review from your peers and most valuable persons, who are all part of the PowerShell community. Richard Siddaway is one of the judges in the Scripting Games 2013 that you can follow on twitter:

Source: and

Let’s get back to the comment of Richard Siddaway and here’s what I’d like to say:


Hi, Thanks for the feedback. Please allow me to comment on event 6, answer your questions and explain the choices I made:

Well, the instructions don’t say what hypervisor we should use. I choose Hyper-V because I know it, because it’s installed by a single cmdlet. I could have used VMware but I don’t know it. I could have also used KVM but there isn’t any PowerShell module for it…To continue on the Hypervisor, the instructions don’t say what version, if it’s clustered, if it’s domain joined, if there are other virtual machines running,…

The instructions don’t say if the DHCP is running Windows, if it’s running Windows 2012 that has the built-in DHCP module, if it’s joined to the domain…

Yes, you’re right it would have been easier to use the wildcard for the trusted host. However it doesn’t sound as a good practice for me. I also wanted to have reusable code for handling trusted host additions and removals.

Yes, I’m sure that I can rename and join and reboot the computer the way I did. I started with Add-computer but had some weird issues. So, I switched over the above WMI approach. I’ve tested and it worked better than Add-computer. Add-computer has limited Fjoin flags whereas WMI hasn’t. In my testing, WMI appeared to be more reliable. I’ve a blog post about this

Event 6 was the hardest event of the Scripting Games. Currently, only Bartek Bielawski shared how he’d have done this event: (I’m glad I’m not the only one who noticed that you can get IP and MAC addresses directly from Hyper-V running on Windows 2012 😀 )

Nobody asked or commented on it yet, but there are actually 2 reasons why I collected IP Addresses from Hyper-V in my entry:
First, I installed a few VMs, deleted them, installed a new serie,… but DHCP leases of dead VMs were still “active”. (My bad, yeah, I know, I’m not a DHCP guy 😛 )
The second reason was that I wanted to test the remoting with the built-in Test-WSMan cmdlet before trying to use Invoke-Command on the target VMs and join them to the domain.
So, to speed-up WSMan/PSremoting tests, I ended filtering the DHCP data with the active IPs I got from Hyper-V.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.