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
PowerShell for Sysadmins
PowerShell® is both a scripting language and an administrative shell that lets you control and automate …
book
Cybersecurity Blue Team Toolkit
A practical handbook to cybersecurity for both tech and non-tech professionals As reports of major data …
book
Python Crash Course, 2nd Edition
This is the second edition of the best selling Python book in the world. Python Crash …
book
Mastering Windows Server 2019 - Third Edition
Enhance and secure your datacenter with Microsoft Windows Server 2019 Key Features Updated with four new …