Chapter 15. Interlude: creating a new tool
We’re not going to teach you anything new in this chapter. Instead, we’d like to take a brief break from the learning and focus on reinforcing what you’ve done so far, using a different example. This chapter, then, is basically one giant lab. You’ll be walking through every step of the toolmaking process (as we’ve covered it thus far) and creating an all-new tool for yourself.
Note
In the example Lab Answers provided at http://MoreLunches.com, we’ll provide you with an example script for each section of this chapter. That way, if you get lost, you can catch up by looking at our example for that point.
This chapter will require that you have a Windows 8 or Windows Server 2012 computer. You’re going to design a tool that makes use of the SmbShare module included in those versions of Windows. Your task is to create a function named Get-RemoteSmbShare. It should accept one or more computer names, either on a –ComputerName parameter or from the pipeline, and then retrieve a list of current shared folders from each specified computer. The output must include each computer’s name, the share name, description, and the path to the share.