Learn about Windows PowerShell
Note: We are no longer accepting entries for this event. See the due dates page for a list of all event due dates.
About This Event
Date of Event
May 3, 2010
May 10, 2010
A recent network trace by the IT network performance team indicates that Browser elections are being forced on one particular subnet: 192.168.1.0/24 every 15 minutes. This is, needless to say, causing a significant amount of network traffic. It has also resulted in complaints from some users of underpowered machines that all of a sudden their hard drives “go crazy” and they can hardly work for several minutes. Research by the networking team indicates that the situation can be resolved by setting the IsDomainMaster registry key to False and setting the MaintainServerList to No on the Browser service in the following registry key:
This is seen in the following image.
Because your boss wants a report, your script should inspect every computer on the subnet, and write to a file the name of the computer, the IP address of the computer, and the status of the two registry keys. You also decide to document the status of the Browser service (running, stopped) and the start mode of the service (automatic, delayed start, manual, disabled).
· Your script will need to be able to read the registry on a remote computer.
· Your script should be able to increment numbers for the last octet of the IP address.
· For testing purposes, if you do not have more than one computer, you can use 127.0.0.1 and increment it a few times: 127.0.0.2, 127.0.0.3, 127.0.0.4….
· For the computer name to which you are connecting to read the registry, you should use the IP address you create.
· You may decide to use 127.0.0. and concatenate it with a loop that creates your new last-digit number.
· If you run into problems, be sure you consult the 2010 Scripting Games Study Guide, and do not forget about the Scripting Guys Forum and the 2010 Scripting Games Forum. Also the #2010sg Twitter tag could come in helpful.
2010 Scripting Games Links
2010 Scripting Games home page
Submit your scripts on PoshCode.org
2010 Scripting Games Forum
Support our sponsors!
Ed Wilson and Craig Liebendorfer, Scripting Guys