Enterprise PowerShell Scripting Bootcamp

The quick start guide for an advanced enterprise PowerShell framework

Enterprise PowerShell Scripting Bootcamp

This ebook is included in a Mapt subscription
Brenton J.W. Blawat

The quick start guide for an advanced enterprise PowerShell framework
$10.00
$44.99
RRP $35.99
RRP $44.99
eBook
Print + eBook
Access every Packt eBook & Video for just $100
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Find Out More
 
Preview in Mapt

Book Details

ISBN 139781787288287
Paperback238 pages

Book Description

Enterprise PowerShell Scripting Bootcamp explains how to create your own repeatable PowerShell scripting framework. This framework contains script logging methodologies, answer file interactions, and string encryption and decryption strategies.

This book focuses on evaluating individual components to identify the system’s function, role, and unique characteristics. To do this, you will leverage built-in CMDlets and Windows Management Instrumentation (WMI) to explore Windows services, Windows processes, Windows features, scheduled tasks, and disk statistics. You will also create custom functions to perform a deep search for specific strings in files and evaluate installed software through executable properties.

We will then discuss different scripting techniques to improve the efficiency of scripts. By leveraging several small changes to your code, you can increase the execution performance by over 130%.

By the end of this book, you will be able to tie all of the concepts together in a PowerShell-based Windows server scanning script. This discovery script will be able to scan a Windows server to identify a multitude of components.

Table of Contents

Chapter 1: Getting Started with Enterprise PowerShell Scripting
Windows server scanning script
Performance considerations
PowerShell scripting templates
Summary
Chapter 2: Script Structure, Comment Blocks, and Script Logging
Overall script structure
Comment blocks
Script logging
Summary
Chapter 3: Working with Answer Files
Answer files
Summary
Chapter 4: String Encryption and Decryption
RijndaelManaged encryption
Encrypting and decrypting strings
Summary
Chapter 5: Interacting with Services, Processes, Profiles, and Logged on Users
Windows services
Managing Windows processes
Identifying logged on users
User profiles
Summary
Chapter 6: Evaluating Scheduled Tasks
Scheduled tasks
Identifying scheduled tasks running as alternate users
Summary
Chapter 7: Determining Disk Statistics
Disk statistics
Disk information script
Summary
Chapter 8: Windows Features and Installed Software Detection
Windows features
Installed software detection
Summary
Chapter 9: File Scanning
File scanning
Excluding long paths
Excluding files
Summary
Chapter 10: Optimizing Script Execution Speed
Script execution speed
Summary
Chapter 11: Improving Performance by Using Regular Expressions
Using regular expressions
Dynamically building expressions
Implementating regular expression performance
Summary
Chapter 12: Overall Script Workflow, Termination Files, and Merging Data Results
Windows server scanning script overview
Pre-script security
XML answer file creation
PowerShell script 3 - the termination files
PowerShell script 4 - merging the scanning script result data
Summary
Chapter 13: Creating the Windows Server Scanning Script and Post-Execution Cleanup
Windows server scanning script creation
Creating a termination function
Multiple Windows server scanning script functions
Running the script
Performing script cleanup
Summary

What You Will Learn

  • Create an advanced PowerShell scripting template that provides repeatable code to jumpstart all of your scripting projects
  • Learn how to securely encrypt and store usernames, passwords, and other sensitive data in PowerShell scripts and answer files
  • Understand how to optimize the performance of scripts to help process large datasets quickly and avoid time-consuming mistakes
  • Develop a script to scan for non-standard Windows Server configurations and identify service accounts used on Windows Servers
  • Gather a large list of data from a Windows server without locally or remotely logging in interactively

Authors

Table of Contents

Chapter 1: Getting Started with Enterprise PowerShell Scripting
Windows server scanning script
Performance considerations
PowerShell scripting templates
Summary
Chapter 2: Script Structure, Comment Blocks, and Script Logging
Overall script structure
Comment blocks
Script logging
Summary
Chapter 3: Working with Answer Files
Answer files
Summary
Chapter 4: String Encryption and Decryption
RijndaelManaged encryption
Encrypting and decrypting strings
Summary
Chapter 5: Interacting with Services, Processes, Profiles, and Logged on Users
Windows services
Managing Windows processes
Identifying logged on users
User profiles
Summary
Chapter 6: Evaluating Scheduled Tasks
Scheduled tasks
Identifying scheduled tasks running as alternate users
Summary
Chapter 7: Determining Disk Statistics
Disk statistics
Disk information script
Summary
Chapter 8: Windows Features and Installed Software Detection
Windows features
Installed software detection
Summary
Chapter 9: File Scanning
File scanning
Excluding long paths
Excluding files
Summary
Chapter 10: Optimizing Script Execution Speed
Script execution speed
Summary
Chapter 11: Improving Performance by Using Regular Expressions
Using regular expressions
Dynamically building expressions
Implementating regular expression performance
Summary
Chapter 12: Overall Script Workflow, Termination Files, and Merging Data Results
Windows server scanning script overview
Pre-script security
XML answer file creation
PowerShell script 3 - the termination files
PowerShell script 4 - merging the scanning script result data
Summary
Chapter 13: Creating the Windows Server Scanning Script and Post-Execution Cleanup
Windows server scanning script creation
Creating a termination function
Multiple Windows server scanning script functions
Running the script
Performing script cleanup
Summary

Book Details

ISBN 139781787288287
Paperback238 pages
Read More

Read More Reviews