Table Of ContentWindows PowerShell
Self-Study Training Kit
PowerShell 3.0, 4.0, 5.0
2 Full-length Personal Training Guides in 1 Convenient Kit!
William Stanek Training Solutions
PUBLISHED BY
Stanek & Associates
PO Box 362
East Olympia, WA 98540-0362
Copyright © 2015 William Stanek
All rights reserved. No part of the contents of this book may be reproduced,
stored or transmitted in any form or by any means without the express written
permission of the publisher.
United States of America
The Personal Trainer and Stanek & Associates are trademarks of William
Stanek. All other marks are property of their respective owners.
The example names for companies, organizations, persons and other named
elements used in the book are fictitious. No association with any real company,
organization, person or other named element is intended or should be inferred.
This book expresses the author’s views and opinions. The information contained
herein is provided without any express, statutory or implied warranties. Neither
the authors, the publishers, the resellers nor distributors will be held liable for
any damages caused or alleged to be caused either directly or indirectly by this
book.
Cover Design: Creative Designs Ltd.
Editorial Development: Andover Publishing Solutions
Technical Review: L & L Technical Content Services You can provide feedback
related to this book by emailing the author at williamstanek@aol.com. Please
use the name of the book as the subject line.
Training Kit Contents
Windows PowerShell: The Personal Trainer
Contents at a Glance
Introduction
Chapter 1. Windows PowerShell Essentials
Chapter 2. Getting the Most from Windows PowerShell
Chapter 3. Managing Your Windows PowerShell Environment
Chapter 4. Using Sessions and Remoting
Chapter 5. Using Background Jobs and Scheduled Jobs
Chapter 6. Navigating Core Windows PowerShell Structures
Chapter 7. Mastering Aliases and Functions
Chapter 8. Conquering COM, WMI, CMI, .NET, and Objects
Windows PowerShell for Administration:
The Personal Trainer
Contents at a Glance
Introduction
Chapter 1. Managing Computers with Commands and Scripts
Chapter 2. Installing Roles, Role Services, and Features
Chapter 3. Inventorying and Evaluating Windows Systems
Chapter 4. Managing File Systems
Chapter 5. Configuring Security Permissions and Auditing
Chapter 6. Managing and Securing the Registry
Chapter 7. Managing Windows Events and Logs
Chapter 8. Managing System Services
Chapter 9. Managing Computer Accounts
Chapter 10. Creating and Using System Restore Checkpoints
Chapter 11. Fine-Tuning System Performance
Chapter 12. Detecting and Resolving Performance Issues
About the Author
Training Kit Contents: Detailed
Windows PowerShell: The Personal Trainer
Table of Contents
Introduction
What’s This Book About?
What Do I Need to Know?
How Is This Book Organized?
What Conventions Are Used in This Book?
Other Resources
Chapter 1. Windows PowerShell Essentials
Getting Started with Windows PowerShell
Running Windows PowerShell
PowerShell Versions and Prerequisites
Using the Windows PowerShell Console
Using the Standard Console
Using the Elevated, Administrator Console
Working the PowerShell Console
Using the Windows PowerShell ISE
Configuring Windows PowerShell Console Properties
Working with the Command History
Working with Cmdlets and Scripts
Using Cmdlets
Understanding Cmdlet Names
Getting Information About Cmdlets
Using Cmdlet Parameters
Using External Commands
Using Scripts
Understanding Execution Policy
Understanding Script Signing
Creating and Using Self-Signed Certificates
Specifying Authentication Credentials
Working with the Help Documentation
Accessing Help Files
Creating a Central Help Folder
Chapter 2. Getting the Most from Windows PowerShell
Initializing the Environment
Passing Startup Parameters
Invoking Windows PowerShell
Using –Command to Run Commands
Using –File to Run Scripts
Using Nested Consoles
Understanding Command Input, Parsing, and Output
Basic Line Editing
How Parsing Works
Parsing Assigned Values
Parsing Exceptions
Output from Parsing
Writing and Formatting Output
Using Formatting Cmdlets
Specifying Output Format
Using Pipelines With Formatters
Specifying Properties to Display
Grouping and Sorting
Writing to Output Streams
Explicitly Writing Output
Using Other Output Streams
Rendering and Finalizing the Output
More on Redirecting Input, Output, and Error
Chapter 3. Managing Your Windows PowerShell Environment
Using Profiles
Creating Profiles
Understanding Execution Order
Working with the Command Path
Managing the Command Path
Managing File Extensions and File Associations
Navigating Windows PowerShell Extensions
Working with Windows PowerShell Extensions
Using Snapins
Snap-in Essentials
PowerShell Core Commands
Adding and Removing Snapins
Checking for Snap-in Availability
Using Providers
Navigating Provider Drives
Managing Providers
Working with Provider Drives
Setting the Working Location
Using Modules
Module Essentials
Working with Modules
Obtaining and Installing Modules
Importing Modules
Chapter 4. Using Sessions and Remoting
Enabling Remote Commands
Remoting Fundamentals
Configuring Remoting
Connecting Between Domains and in Workgroups
Creating HTTPS and Other Listeners
Executing Remote Commands
Understanding Remote Execution
Standard Commands for Remoting
Invoking Remote Commands
Establishing PowerShell Sessions
Invoking Sessions
Understanding Remote Execution and Object Serialization
Disconnecting Sessions
Reconnecting Sessions
Connecting through PowerShell Web Access
Establishing CIM Sessions
Working Remotely Without WinRM
Chapter 5. Using Background Jobs and Scheduled Jobs
Creating Background Jobs
Using Background Jobs
Starting Jobs in Interactive Sessions
Running Jobs Noninteractively
Creating Scheduled Jobs
Defining Job Triggers
Running Jobs at Startup or Logon
Running Jobs Daily or Weekly
Creating Jobs that Run Once or Repeatedly
Setting Job Options
Understanding Job Option Parameters
Working with Job Options
Registering and Running Scheduled Jobs
Modifying and Removing Scheduled Jobs
Chapter 6. Navigating Core Windows PowerShell Structures
Working with Expressions and Operators
Arithmetic, Grouping, and Assignment Operators