Chapter 4: Using PowerShell Scripts


image from book Download CD Content

Overview

After completing this chapter, you will be able to:

  • Understand the reasons for writing Windows PowerShell scripts

  • Make the configuration changes required to run Windows PowerShell scripts

  • Understand how to run Windows PowerShell scripts

  • Understand how to break lines

  • Understand the use of variables and constants

  • Create objects in a Windows PowerShell script

  • Call methods in a Windows PowerShell script

With the ability to perform so many actions from inside Windows PowerShell in an interactive fashion, you may wonder, “Why do I need to write scripts?” For many network administrators, one-line PowerShell commands will indeed solve many routine problems. This can become extremely powerful when the commands are combined into batch files and perhaps called from a login script. However, there are some very good reasons to write Windows PowerShell scripts. We will examine them as we move into this chapter. All the scripts mentioned in this chapter can be found in the corresponding scripts folder on the CD.




Microsoft Press - Microsoft Windows PowerShell Step by Step
MicrosoftВ® Windows PowerShell(TM) Step By Step (Step By Step (Microsoft))
ISBN: 0735623953
EAN: 2147483647
Year: 2007
Pages: 128
Authors: Ed Wilson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net