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: http://powershell.org/wp/2013/04/06/2013-scripting-games-judges and http://powershell.org/wp/2013/04/06/2013-scripting-games-mighty-panel-of-celebrity-judges

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

@RichardSiddaway,

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 https://p0w3rsh3ll.wordpress.com/2013/06/04/2013-scripting-games-event-6/

Event 6 was the hardest event of the Scripting Games. Currently, only Bartek Bielawski shared how he’d have done this event: http://becomelotr.wordpress.com/2013/06/05/event-6-my-way (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.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s