Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Enterprise PowerShell Scripting Bootcamp

You're reading from   Enterprise PowerShell Scripting Bootcamp The fastest way to learn PowerShell scripting

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787288287
Length 238 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Brenton J.W. Blawat Brenton J.W. Blawat
Author Profile Icon Brenton J.W. Blawat
Brenton J.W. Blawat
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Getting Started with Enterprise PowerShell Scripting FREE CHAPTER 2. Script Structure, Comment Blocks, and Script Logging 3. Working with Answer Files 4. String Encryption and Decryption 5. Interacting with Services, Processes, Profiles, and Logged on Users 6. Evaluating Scheduled Tasks 7. Determining Disk Statistics 8. Windows Features and Installed Software Detection 9. File Scanning 10. Optimizing Script Execution Speed 11. Improving Performance by Using Regular Expressions 12. Overall Script Workflow, Termination Files, and Merging Data Results 13. Creating the Windows Server Scanning Script and Post-Execution Cleanup Index

PowerShell scripting templates

As you develop different scripts for your enterprise environment, you will have a core set of functions that you tend to use in all of your scripts. Some enterprise scripters create their own functions, while others leverage scripts from the vast community of PowerShell developers. With either method, you will need a solid foundation to build your scripts on.

Some of the most common items this book provides for scripting templates include:

  • Encryption and decryption technologies: Probably the most common requirement in enterprise environments is security. It's no secret that you should not have clear text administrative-level credentials in scripts. Providing an encryption and decryption function in your scripts is essential to maintaining a secure enterprise.
  • Logging mechanisms: The second most common requirement in enterprise environments is logging script actions. Since scripts are typically executed on a large number of systems at the same time, you will need the ability to track exactly what is being performed on these systems. Creating a logging function will provide the ability to log script actions to both the event log and a log file.
  • Answer file logic: One of the more advanced methods for PowerShell scripting is leveraging an answer file for script variables. The core to the answer file is that you can add, remove, and modify the values in the answer file without having to modify your script. This provides the ability to have flexibility in your scripts without needing to touch any lines of code.
  • Standardized comment blocks: When you are creating scripts, it's essential to give yourself and others reminders of what the script's function is. Comment blocks enable the ability to provide details about the script, revision history, and execution parameters of the script.

Whether you are new to PowerShell scripting or you have been scripting for a long time, this book provides thought-inspiring methods to improve your scripting abilities. As you work through this book, it's strongly encouraged to incorporate these examples in your own scripts. This applied learning methodology will significantly help in your retention of the content, and provide a very robust enterprise scripting platform.

You have been reading a chapter from
Enterprise PowerShell Scripting Bootcamp
Published in: May 2017
Publisher: Packt
ISBN-13: 9781787288287
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime