Зарегистрироваться
Восстановить пароль
FAQ по входу

Bertram Adam. PowerShell Tips to Write By

  • Файл формата pdf
  • размером 1,09 МБ
  • Добавлен пользователем
  • Описание отредактировано
Bertram Adam. PowerShell Tips to Write By
Leanpub, 2019.
“This book was created out of necessity. There are many books out there on how to learn PowerShell. You’ll also find thousands of articles and blog posts on PowerShell best practices. But there wasn’t an entire collection of PowerShell learning and best practices brought together before.”
“Each chapter in this book is broken down by chapter with multiple “tips” inside. Each chapter is a bucket for the kinds of tips you can expect to read about. Each tip is a best practice. Tips are short, actionable steps you can take today to help you improve your PowerShell scripts.
Tips do not go into major detail. There are other resources out there for that. The tips in this book are not meant to be exhaustive how-tos but to rather act as a checklist for actions to take.
All tips in this book were written by the authors but many were contributed by the PowerShell community. If a tip did come from the community, the community member will be referenced.”
About This Book
About the Authors.
Feedback.
Tip Format.
Sponsors.
Do The Basics.
Plan Before you Code.
Don’t Reinvent the Wheel.
Build Functions as Building Blocks.
Build Re-usable Tools.
Don’t Focus Purely on Peformance.
Build Pester tests.
Implement Error handling.
Build Manageable Code.
Don’t Skimp on Security.
Log Script Activity.
Parameterize Everything.
Limit Script and Function Input.
Maintain Coding Standards.
Code in Context.
Return Informative Output.
Understand Your Code.
Use Version Control.
Write for Cross Platform.
Write for the Next Person.
Use a Code Editor.
Don’t Reinvent the Wheel.
Use Community Modules.
Leverage Others’ work.
Plan Before you Code.
Create Building Blocks with Functions.
Write Functions with One, Single Goal.
Build Functions with Pipeline Support.
Save Commonly-Used, Interactive Functions to Your Profile.
Parameterize Everything.
Log Script Activity.
Build with Manageability in Mind.
DRY: Don’t Repeat Yourself.
Don’t Store Configuration Items in Code.
Be Specific.
Use Strict Mode.
Don’t Ignore Errors.
Validate Input Parameters.
Explicitly Define Parameter Types.
Enforce Mandatory Parameters.
Use the #requires Statement.
Write for the Next Person.
Give your Variables Meaningful Names.
String Substitution.
Don’t use Aliases in a Script.
Put functions in alphabetical order in a Module.
Comments.
Misc.
Write for Cross Platform.
Handle Errors Gracefully.
Don’t Skimp on Security.
Sign Scripts.
Use Scriptblock Logging.
Never Store Sensitive Information in Clear Text in Code.
Don’t use Invoke-Expression.
Use PowerShell Constrained Language Mode.
Stick to PowerShell.
Use Native PowerShell Where Possible.
Use PowerShell standard cmdlet naming.
Build Tools.
Code for Portablity.
Wrap Command-Line Utilities in Functions.
Force Functions to Return Common Object Types.
Ensure Module Functions Cover all the Verbs.
Return Stndardized, Informative Output.
Build Scripts for Speed.
Use an ArrayList or GenericList .NET Class when Elements Need to be Added to an Array.
Use a Regular Expression to Search Multiple String Values.
Don’t use Write-Host in Bulk.
Don’t use the Pipeline.
Use the .foreach() and .where() Methods.
Use Parallel Processing.
Use the .NET StreamReader Class When Reading Large Text Files.
Build Tests.
Learn the Pester Basics.
Leverage Infrastructure Tests.
Automate Pester Tests.
Miscellaneous Tips.
Use Version Control.
Release Notes.
  • Чтобы скачать этот файл зарегистрируйтесь и/или войдите на сайт используя форму сверху.
  • Регистрация