We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9
Course 10325A: Automating Administration with
Windows PowerShell 2.0
The purpose of this document is to explain how the demonstrations should be run and give some pointers on how the course itself can be delivered. The demonstrations do not have step-by-step instructions included in the instructor notes in the Microsoft Office PowerPoint deck as is usually the case; the steps t are included instead in the actual scripts themselves. This arrangement should make it easier to run through the demos and refer to the steps as you need to do so. Delivering the Demonstrations Demonstrations are intended to be run mostly on the LON-DC1 domain controller virtual computer. When other virtual machines are required, the course content and the demo script notes will let you know. Preparing for the Demonstration As you begin each module, open all of that modules demonstration script files within the Windows PowerShell ISE (Integrated Scripting Environment).
Use the three-pane view that displays your script to the right and output and an interactive prompt to the left.
Running Demonstration Commands The ISE enables you to highlight a single command and press F8 to execute just the highlighted command. In most demonstrations, this is the best way to proceed through the script because doing so enables you to discuss each command and review its output. Notice that each demonstration is numbered within the demonstration script. Highlight the entire demonstration, and press F8 (or right-click the selection and choose Run Selection from the context menu).
You will see the command output in the top-left pane.
You can see more detailed instructions in comments within the demonstration scripts themselves.
If the output area becomes crowded, you can clear it using the Clear Output Pane button on the toolbar.
Remind students that these scripts are on their companion CD, so they dont need to copy your commands themselvesthey can run them on their own as they wish. Maximizing the Demonstrations When you run through the demonstrations, move quickly. When you run a new cmdlet for the first time, ask students to discuss other ways in which it might be used or other cmdlets it might be used with. Encourage curiosity and independent exploration. Otherwise, try to move through demos quickly to maintain students attention. This is especially true for the first day of demos, when youre really reinforcing concepts and not doing anything that students are likely to perceive as useful in a practical way. It is a major mission of the course to get students to explore the shell on their own. Give them time to do so. Let them make mistakes in labs; coach them to the solutiondont just fix it for them. You wont be going back to the office with them, after all. Most demos can be accomplished in the ISE, but switch to the console window now and again. Students may prefer the ISE, but they should achieve some basic comfort in the console. Students who prefer the console should be encouraged to use the ISE at least sometimes. Theyre both valuable environments. Note: For classrooms that require a double- byte character set, only the ISE is a practical working environment. The students companion materials include numerous example commands that illustrate the point being made. Encourage students to follow along and run these as you teach. (Theres no need to demo them yourselfin most cases, the same commands come up in the official demos.) Some commands need to be modified (computer names, filenames, and so on) slightly to run. Let students help you figure out what would need to be changed. All of this helps increase their exposure to these commands and encourages them to become more comfortable changing and repurposing example commands on the fly. Dont Push Too Hard Be cautious with your students. Its very tempting to show them a lot of tricks, but doing so increases the number of things they have to learn and remember in a short period of time. It can be confusing to see three different ways to accomplish the same thing; in this course, we have tried to select one standard way to accomplish a task. If we explain and demonstrate a second way, it is because the first way cannot handle some particular scenario, and we explain that as well. Although other methods may exist, and some of them may even be shortcuts, weve tried to select the technique that is most readable and self-explanatory. Students will of course learn more techniques as they learn PowerShell; the goal of this course isnt to teach every possible thing but to help students use the shell effectively. Try very hard not to introduce material out of order. In some cases, we must introduce thingssuch as variableswithout fully explaining what they are. That is generally because we need a variable, but are trying to focus on some other important aspect of the shell at the time. In those few cases, the course text acknowledges that were introducing something that we will cover later. The idea is to let the student know that new information is coming without creating a tangent from what is most important at that time. Try to remember that Windows PowerShell can be very confusing to newcomers who are not experienced scripters or shell users. In this course, we have tried to avoid tangents that become very programming-like because those are confusing to many administrators. Although topics such as Microsoft .NET Framework programming and COM objects can enable administrators to accomplish additional tasks, many administrators have no interest in accomplishing those tasks if they perceive the method as programming. More advanced students can, of course, explore these additional topics by themselves. Our primary mission with this course is to enable students to be immediately successful with some key, real-world tasks. Only by doing so can we ensure that students continue to want to learn more, both on their own and through other learning mechanisms. If we over-complicate instruction in class, we will not be encouraging immediate success. Students will thus tend to set the shell aside, and the course will not be a success for them. The Top-Level Design Philosophies for This Course This course is just the students first step in their Windows PowerShell education. This course is intended for full-time administrators who have no programming or scripting experience and who may have avoided scripting in the past because of its similarity to programming and software development. Some administrators enjoy scripting or programming; although this course acknowledges their skills and background, this course is not designed specifically for them. If something can be accomplished in more than one way, show the way that is the most consistent with the rest of the shell. Use techniques that focus on commands, not scripts or programming-style syntax. Avoid shortcut techniques until the more formal technique has been demonstrated multiple times; do not feel obligated to show any shortcut techniques. If accomplishing a task requires programming-style syntax (especially involving COM or .NET Framework elements), ignore that task. It is not a suitable automation candidate for the entry-level Windows PowerShell student. Exception: Invoking WMI methods is needed by 80 percent of administrators in 80 percent of their tasks, and it often requires programming-style syntax, so this will be covered. Focus only on those problems that affect 80 percent of administrators 80 percent of the time. We cannot teach the entire shell in five days and do not attempt to do so. We focus on teaching students how to learn more on their own, and we encourage independent exploration.
Delivering to Different Audiences Windows PowerShell addresses the needs of three distinct audiences: Tier 1. These IT professionals use Windows PowerShell to complete administrative tasks. They may create scripts, but those scripts are relatively uncomplicated and may contain just a few hard-to-type commands. These IT professionals may use functions written by more advanced Windows PowerShell users. Tier 2. These IT professionals have more shell experience and may create more complex scripts, functions, and script modules that are in turn reused by their less-experienced colleagues. Tier 3. These professionals approach software developer in terms of programming experience. This course does not specifically target this audience. Members of this audience may be comfortable using Microsoft Visual Studio to develop shell cmdlets in Microsoft Visual Basic or C#, and they are comfortable using elements of the .NET Framework, even from within the shell. IT professionals with less scripting or programming experiencethe Tier 1 audiencemay need more time to complete labs and may not be ready for more advanced scripting topics. For this audience, it is recommended that you: Omit Module 4 Lesson 3 (which is included only in the students companion content). Omit Module 5 Lesson 3 and Lab B, if you are running short on time. Complete all of Module 9, even if some of it must be completed at the beginning of the last day. Consider omitting Module 11, which is entirely higher-level scripting topics.
If your class consists more of a Tier 2 audience, consider: Including Module 4 Lesson 3, which is included in the students companion content. Include Module 5 Lesson 3 and Lab B. Complete only as much of Module 9 as you can finish on the fourth day. Complete all of Module 11. Review the content in the Appendix.
Again, the primary differentiator between these audiences is their level of past experience with scripting or programming topics. Administrators without that past experience may in particular find Module 11 to be going to far, especially on the last day. Those administrators can still be extremely effective in Windows PowerShell; scripting is not a minimal requirement to use Windows PowerShell effectively. As those professionals become more experienced with Windows PowerShell, they can return to Module 11 in their companion content to begin exploring those more advanced topics.