Home Page Icon
Home Page
Table of Contents for
Cover Page
Close
Cover Page
by Adam Bertram
PowerShell for Sysadmins
Cover Page
Title Page
Copyright Page
Dedication
About the Author
BRIEF CONTENTS
CONTENTS IN DETAIL
ACKNOWLEDGMENTS
INTRODUCTION
Why PowerShell?
Who This Book Is For
About This Book
PART I: FUNDAMENTALS
1 GETTING STARTED
Opening the PowerShell Console
Using DOS Commands
Exploring PowerShell Commands
Getting Help
Updating the Docs
Summary
2 BASIC POWERSHELL CONCEPTS
Variables
Data Types
Objects
Data Structures
Creating Custom Objects
Summary
3 COMBINING COMMANDS
Starting a Windows Service
Using the Pipeline
Writing Scripts
Summary
4 CONTROL FLOW
Understanding Control Flow
Using Conditional Statements
Using Loops
Summary
5 ERROR HANDLING
Working with Exceptions and Errors
Handling Nonterminating Errors
Handling Terminating Errors
Exploring the $Error Automatic Variable
Summary
6 WRITING FUNCTIONS
Functions vs. Cmdlets
Defining a Function
Adding Parameters to Functions
Accepting Pipeline Input
Summary
7 EXPLORING MODULES
Exploring Default Modules
The Components of a PowerShell Module
Working with Custom Modules
Creating Your Own Module
Summary
8 RUNNING SCRIPTS REMOTELY
Working with Scriptblocks
Working with Sessions
Understanding PowerShell Remoting Authentication
Summary
9 TESTING WITH PESTER
Introducing Pester
Pester Basics
Executing a Pester Test
Summary
PART II: AUTOMATING DAY-TO-DAY TASKS
10 PARSING STRUCTURED DATA
CSV Files
Excel Spreadsheets
JSON Data
Summary
11 AUTOMATING ACTIVE DIRECTORY
Prerequisites
Installing the ActiveDirectory PowerShell Module
Querying and Filtering AD Objects
Creating and Changing AD Objects
Syncing from Other Data Sources
Summary
12 WORKING WITH AZURE
Prerequisites
Azure Authentication
Creating an Azure Virtual Machine and All Dependencies
Deploying an Azure Web App
Deploying an Azure SQL Database
Summary
13 WORKING WITH AWS
Prerequisites
AWS Authentication
Creating an AWS EC2 Instance
Deploying an Elastic Beanstalk Application
Creating a SQL Server Database in AWS
Summary
14 CREATING A SERVER INVENTORY SCRIPT
Prerequisites
Creating the Project Script(s)
Defining the Final Output
Discovery and Script Input
Querying Each Server
Thinking Ahead: Combining Different Types of Information
Querying Remote Files
Querying Windows Management Instrumentation
Windows Services
Script Cleanup and Optimization
Summary
PART III: BUILDING YOUR OWN MODULE
15 PROVISIONING A VIRTUAL ENVIRONMENT
PowerLab Module Prerequisites
Creating the Module
Automating Virtual Environment Provisioning
Testing the New Functions with Pester
Summary
16 INSTALLING AN OPERATING SYSTEM
Prerequisites
OS Deployments
Automating OS Deployments
Storing Encrypted Credentials on Disk
PowerShell Direct
Pester Tests
Summary
17 DEPLOYING ACTIVE DIRECTORY
Prerequisites
Creating an Active Directory Forest
Building the Forest
Building and Running Pester Tests
Summary
18 CREATING AND CONFIGURING A SQL SERVER
Prerequisites
Creating the Virtual Machine
Installing the Operating System
Adding a Windows Unattended Answer File
Adding the SQL Server to a Domain
Automating the SQL Server
Running Pester Tests
Summary
19 REFACTORING YOUR CODE
A Second Look at New-PowerLabSqlServer
Using Parameter Sets
Summary
20 CREATING AND CONFIGURING AN IIS WEB SERVER
Prerequisites
Installation and Setup
Building Web Servers from Scratch
The WebAdministration Module
Configuring SSL on a Website
Summary
INDEX
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
Title Page
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset