Book description
Expert recommendations, pragmatically applied.
Automate system administration using Windows PowerShell best practices—and optimize your operational efficiency. With this practical guide, Windows PowerShell expert and instructor Ed Wilson delivers field-tested tips, real-world examples, and candid advice culled from administrators across a range of business and technical scenarios. If you’re an IT professional with Windows PowerShell experience, this book is ideal.
Discover how to:
Use Windows PowerShell to automate Active Directory tasks
Explore available WMI classes and methods with CIM cmdlets
Identify and track scripting opportunities to avoid duplication
Use functions to encapsulate business logic and reuse code
Design your script’s best input method and output destination
Test scripts by checking their syntax and performance
Choose the most suitable method for running remote commands
Manage software services with Desired State Configuration
Table of contents
- Windows PowerShell Best Practices
- Dedication
- Foreword
- Introduction
-
I. Understanding the basics of Windows PowerShell
- 1. Survey of Windows PowerShell capabilities
- 2. Using the CIM cmdlets
-
II. Planning for scripting
- 3. Using the Active Directory module
- 4. Identifying scripting opportunities
- 5. Configuring the script environment
- 6. Avoiding scripting pitfalls
- 7. Tracking scripting opportunities
-
III. Designing the script
- 8. Designing the script
-
9. Designing help for scripts
- Adding help documentation to a script with single-line comments
- Using multiple-line comment tags in Windows PowerShell 4.0
- Using comment-based help
-
The 13 rules for writing effective comments
- Update documentation when a script is updated
- Add comments during the development process
- Write for an international audience
- Consistent header information
- Document prerequisites
- Document deficiencies
- Avoid useless information
- Document the reason for the code
- Use of one-line comments
- Avoid end-of-line comments
- Document nested structures
- Use a standard set of keywords
- Document the strange and bizarre
- Additional resources
- 10. Designing modules
- 11. Handling input and output
- 12. Handling errors
- 13. Testing scripts
- 14. Documenting scripts
-
IV. Deploying the script
- 15. Managing the execution policy
- 16. Running scripts
- 17. Versioning scripts
- 18. Logging results
- 19. Troubleshooting scripts
- 20. Using the Windows PowerShell ISE
- 21. Using Windows PowerShell remoting and jobs
- 22. Using Windows PowerShell Workflow
- 23. Using the Windows PowerShell DSC
- A. About the author
- Index
- About the Author
- Copyright
Product information
- Title: Windows PowerShell Best Practices
- Author(s):
- Release date: January 2014
- Publisher(s): Microsoft Press
- ISBN: 9780735676589
You might also like
book
Windows PowerShell Cookbook
This Cookbook by Windows PowerShell team developer Lee Holmes provides hundreds of tested scripts that you …
book
Windows PowerShell for .NET Developers - Second Edition
Efficiently administer and maintain your development environment with Windows PowerShell About This Book Explore scripting and …
book
Windows PowerShell for Developers
Want to perform programming tasks better, faster, simpler, and make them repeatable? Take a deep dive …
book
Pro PowerShell Desired State Configuration: An In-Depth Guide to Windows PowerShell DSC
Use Windows PowerShell Desired State Configuration (DSC) to configure your infrastructure on-premises and in the cloud. …