Good grief, I have spent all morning writing my script for the so-called Beginner Event 6. I mean, that thing was impossible. I think the Script Monkey messed up this time on the event. It was just too hard. I am not sure what he was thinking about. I tried to use the Windows PowerShell commands to read the registry—no problem there. It was also no problem to create a text file or to check for the status of a service. The issue I had was the bit about cycling through a range of IP addresses and connecting to them.
What is the problem? Well, by default Windows PowerShell remoting will not allow you to do that—I mean, hello? He also said in the instructions that you could use local IP addresses, but you cannot connect with remoting to yourself unless you are an administrator. Guess what? I am not an administrator. So that lets that part out, too. However, once I got him to start my Windows PowerShell prompt as an administrator, I could connect to 127.0.0.1, but none of the other IP addresses would work—something about WinRm and trusted hosts.
In the end, I was able to make my script work. I just used specific computer names for my remote connections instead of using IP addresses. There was no way I could make that part work. I will be really interested in seeing what some of the other people come with on this event. It might be cool if someone can actually make it work.
Let’s see, I uploaded my script to PoshCode, and I am gonna e-mail this to the Scripting Guy so that he can post it. I am heading to town to have lunch with a couple of friends. On the way back, I have to stop at the grocery store. That stupid script put me behind schedule today.
Microsoft Scripting Guy Ed Wilson here. I can see what the Scripting Wife is complaining about, but I really had in mind a different approach to the problem. I also will be interested in seeing what other people come up with.
Let me invite you to keep up with the 2010 Scripting Games by following us on Twitter or Facebook. If you have any questions during the Games, send e-mail to us at email@example.com or post your questions on the 2010 Scripting Games Forum. See you tomorrow. Until then, peace.
Ed Wilson and Craig Liebendorfer, Scripting Guys