Enterprise PowerShell Scripting Bootcamp

The quick start guide for an advanced enterprise PowerShell framework

Enterprise PowerShell Scripting Bootcamp

Brenton J.W. Blawat

The quick start guide for an advanced enterprise PowerShell framework
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
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

Recommended for You

Mastering Windows PowerShell Scripting Book Cover
Mastering Windows PowerShell Scripting
$ 39.99
$ 28.00
PowerShell: Automating Administrative Tasks Book Cover
PowerShell: Automating Administrative Tasks
$ 67.99
$ 47.60
Mastering PowerShell - Second Edition Book Cover
Mastering PowerShell - Second Edition
$ 43.99
$ 30.80
Windows Server 2016 Automation with PowerShell Cookbook - Second Edition Book Cover
Windows Server 2016 Automation with PowerShell Cookbook - Second Edition
$ 47.99
$ 33.60
Learning PowerShell DSC - Second Edition Book Cover
Learning PowerShell DSC - Second Edition
$ 35.99
$ 25.20
AWS Tools for PowerShell 6 Book Cover
AWS Tools for PowerShell 6
$ 35.99
$ 25.20