PowerShell: Automating Administrative Tasks

Learn PowerShell from the inside out, right from basic scripting all the way to becoming a master at automating, managing, and maintaining your Windows environment
Preview in Mapt

PowerShell: Automating Administrative Tasks

Michael Shepard et al.

1 customer reviews
Learn PowerShell from the inside out, right from basic scripting all the way to becoming a master at automating, managing, and maintaining your Windows environment

Quick links: > What will you learn?> Table of content> Product reviews

Mapt Subscription
FREE
$29.99/m after trial
eBook
$47.60
RRP $67.99
Save 29%
Print + eBook
$84.99
RRP $84.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
$47.60
$84.99
$29.99 p/m after trial
RRP $67.99
RRP $84.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


PowerShell: Automating Administrative Tasks Book Cover
PowerShell: Automating Administrative Tasks
$ 67.99
$ 47.60
Enterprise PowerShell Scripting Bootcamp Book Cover
Enterprise PowerShell Scripting Bootcamp
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $68.98
Add to Cart

Book Details

ISBN 139781787123755
Paperback737 pages

Book Description

Are you tired of managing Windows administrative tasks manually and are looking to automate the entire process? If yes, then this is the right course for you. 

This learning path starts your PowerShell journey and will help you automate the administration of the Windows operating system and applications that run on Windows. It will get you up and running with PowerShell, taking you from the basics of installation to writing scripts and performing web server automation. You will explore the PowerShell environment and discover how to use cmdlets, functions, and scripts to automate Windows systems. 

The next installment of the course focuses on gaining concrete knowledge of Windows PowerShell scripting to perform professional-level scripting. The techniques here are packed with PowerShell scripts and sample C# code to automate tasks. You will use .NET classes in PowerShell and C# to manage Exchange Online. 

In the final section, you will delve into real-world examples to learn how to simplify the management of your Windows environment. You will get to grips with PowerShell’s advanced functions and how to most effectively administer your system. 

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products: 

  • Getting Started with PowerShell by Michael Shepard
  • Windows PowerShell for .Net Developers Second Edition by Chendrayan Venkatesan and Sherif Talaat
  • Mastering Windows PowerShell Scripting by Brenton J.W. Blawat

Table of Contents

Chapter 1: First Steps
Determining the installed PowerShell version
Installing/upgrading PowerShell
Starting a PowerShell session
Simple PowerShell commands
PowerShell aliases
Summary
For further reading
Chapter 2: Building Blocks
What can you do?
The scripter's secret weapon – tab completion
How does that work?
Interpreting the cmdlet syntax
Summary
For further reading
Chapter 3: Objects and PowerShell
Objects all the way down
What are members?
The Get-Member cmdlet
Where did these all come from?
Summary
For further reading
Chapter 4: Life on the Assembly Line
The pipeline as an assembly line
Dealing with pipeline data
Putting them together
Summary
For further reading
Chapter 5: Formatting Output
When does formatting occur?
The rules of automatic formatting
Cmdlets that control formatting
The dangers of formatting
Best practices of formatting
Summary
For further reading
Chapter 6: Scripts
Packaging commands
Parameters add flexibility
Adding some logic
Profiles
Summary
For further reading
Chapter 7: Functions
Another kind of container
Executing and calling functions
Naming conventions
Comment-based help
Parameters revisited
Default values for parameters
Output
Summary
For further reading
Chapter 8: Modules
Packaging functions
Script modules
Where do modules live?
Removing a module
PowerShell module autoloading
The #Requires statement
Removing a module – take two
Listing modules
Summary
Chapter 9: File I/O
Reading and writing text files
Working with CSV files
PowerShell streams and redirection
CLIXML – a special type of XML
Summary
For further reading
Chapter 10: WMI and CIM
What is WMI?
Finding WMI classes
Retrieving objects with Get-WMIObject
Calling methods
WMI and CIM
CDXML modules
Summary
For further reading
Chapter 11: Web Server Administration
Installing IIS
Verifying IIS
The WebAdministration module
Starting, stopping, and restarting IIS
Creating virtual directories and web applications
Working with application pools
Summary
For further reading
Chapter 12: Getting Started with Windows PowerShell
Scripting the cmdlet style
Introducing Windows PowerShell
Using an interactive shell
Summary
Chapter 13: Unleashing Development Skills Using Windows PowerShell 5.0
Basics of WMI and CIM
Working with XML and COM
Exploring .NET objects
Exploring Windows PowerShell 5.0
Understanding PowerShell modules
Script debugging
Summary
Chapter 14: Exploring Desired State Configuration
Prerequisites
Installing the WMF 5.0 April 2015 preview
Imperative versus declarative programming
Getting started with DSC
Exploring Windows Remote Management and CIM
Creating configuration scripts
Types of deployment modes
Summary
Chapter 15: PowerShell and Web Technologies
PowerShell Web Access
Management OData IIS Extensions
Exploring web requests
Exploring web services
Exploring the REST API
Exploring JSON
Summary
Chapter 16: Exploring Application Programming Interface
Exploring API using PowerShell
The Lync 2013 client-side API
Client-side object model – SharePoint Online
Summary
Chapter 17: Variables, Arrays, and Hashes
Variables
Arrays
Hashes
Deciding the best container for your scripts
Summary
Chapter 18: Data Parsing and Manipulation
String manipulation
Number manipulation and parsing
Date and time manipulation
Forcing data types
Piping variables
Summary
Chapter 19: Comparison Operators
Comparison operator basics
Equal and not equal comparison
Greater than and less than comparison
Contains, like, and match operators
And / OR comparison operators
Best practices for comparison operators
Summary
Chapter 20: Functions, Switches, and Loops Structures
Functions
Looping structures
Switches
Combining the use of functions, switches, and loops
Best practices for functions, switches, and loops
Summary
Chapter 21: Regular Expressions
Getting started with regular expressions
Regular expression grouping constructs and ranges
Regular expression quantifiers
Regular expression anchors
Regular expressions examples
Summary
Chapter 22: Error and Exception Handling and Testing Code
Error and exception handling – parameters
Error and exception handling – Try/Catch
Error and exception handling – legacy exception handling
Methodologies for testing code
Summary
Chapter 23: Session-based Remote Management
Utilizing CIM sessions
Summary
Chapter 24: Managing Files, Folders, and Registry Items
Registry provider
Creating files, folders, and registry items with PowerShell
Adding named values to registry keys
Verifying files, folders, and registry items
Copying and moving files and folders
Renaming files, folders, registry keys, and named values
Deleting files, folders, registry keys, and named values
Summary
Chapter 25: File, Folder, and Registry Attributes, ACLs, and Properties
Retrieving attributes and properties
Viewing file and folder extended attributes
Setting the mode and extended file and folder attributes
Managing file, folder, and registry permissions
Summary
Chapter 26: Windows Management Instrumentation
WMI structure
Using WMI objects
Searching for WMI classes
Creating, modifying, and removing WMI property instances
Invoking WMI class methods
Summary
Chapter 27: XML Manipulation
XML file structure
Summary
Chapter 28: Managing Microsoft Systems with PowerShell
Managing local users and groups
Managing Windows services
Managing Windows processes
Installing Windows features and roles
Summary
Chapter 29: Automation of the Environment
Invoking programs for automation
Using desired state configuration
Detecting and restoring drifting configurations
Summary
Chapter 30: Script Creation Best Practices and Conclusion
Best practices for script management
# commenting headers
Best practices for script creation
Best practices for software automation
Summary

What You Will Learn

  • Discover PowerShell commands and cmdlets and understand PowerShell formatting
  • Solve common problems using basic file input/output functions
  • Use .NET classes in Windows PowerShell and C# and manage Exchange Online
  • Use PowerShell in C# to manage Exchange Online and work with .NET classes in PowerShell
  • Automate LYNC clients, consuming client-side object models to administrate SharePoint Online
  • Optimize code through the use of functions, switches, and looping structures
  • Manage files, folders, and registries through the use of PowerShell
  • Discover best practices to manage Microsoft systems

Authors

Table of Contents

Chapter 1: First Steps
Determining the installed PowerShell version
Installing/upgrading PowerShell
Starting a PowerShell session
Simple PowerShell commands
PowerShell aliases
Summary
For further reading
Chapter 2: Building Blocks
What can you do?
The scripter's secret weapon – tab completion
How does that work?
Interpreting the cmdlet syntax
Summary
For further reading
Chapter 3: Objects and PowerShell
Objects all the way down
What are members?
The Get-Member cmdlet
Where did these all come from?
Summary
For further reading
Chapter 4: Life on the Assembly Line
The pipeline as an assembly line
Dealing with pipeline data
Putting them together
Summary
For further reading
Chapter 5: Formatting Output
When does formatting occur?
The rules of automatic formatting
Cmdlets that control formatting
The dangers of formatting
Best practices of formatting
Summary
For further reading
Chapter 6: Scripts
Packaging commands
Parameters add flexibility
Adding some logic
Profiles
Summary
For further reading
Chapter 7: Functions
Another kind of container
Executing and calling functions
Naming conventions
Comment-based help
Parameters revisited
Default values for parameters
Output
Summary
For further reading
Chapter 8: Modules
Packaging functions
Script modules
Where do modules live?
Removing a module
PowerShell module autoloading
The #Requires statement
Removing a module – take two
Listing modules
Summary
Chapter 9: File I/O
Reading and writing text files
Working with CSV files
PowerShell streams and redirection
CLIXML – a special type of XML
Summary
For further reading
Chapter 10: WMI and CIM
What is WMI?
Finding WMI classes
Retrieving objects with Get-WMIObject
Calling methods
WMI and CIM
CDXML modules
Summary
For further reading
Chapter 11: Web Server Administration
Installing IIS
Verifying IIS
The WebAdministration module
Starting, stopping, and restarting IIS
Creating virtual directories and web applications
Working with application pools
Summary
For further reading
Chapter 12: Getting Started with Windows PowerShell
Scripting the cmdlet style
Introducing Windows PowerShell
Using an interactive shell
Summary
Chapter 13: Unleashing Development Skills Using Windows PowerShell 5.0
Basics of WMI and CIM
Working with XML and COM
Exploring .NET objects
Exploring Windows PowerShell 5.0
Understanding PowerShell modules
Script debugging
Summary
Chapter 14: Exploring Desired State Configuration
Prerequisites
Installing the WMF 5.0 April 2015 preview
Imperative versus declarative programming
Getting started with DSC
Exploring Windows Remote Management and CIM
Creating configuration scripts
Types of deployment modes
Summary
Chapter 15: PowerShell and Web Technologies
PowerShell Web Access
Management OData IIS Extensions
Exploring web requests
Exploring web services
Exploring the REST API
Exploring JSON
Summary
Chapter 16: Exploring Application Programming Interface
Exploring API using PowerShell
The Lync 2013 client-side API
Client-side object model – SharePoint Online
Summary
Chapter 17: Variables, Arrays, and Hashes
Variables
Arrays
Hashes
Deciding the best container for your scripts
Summary
Chapter 18: Data Parsing and Manipulation
String manipulation
Number manipulation and parsing
Date and time manipulation
Forcing data types
Piping variables
Summary
Chapter 19: Comparison Operators
Comparison operator basics
Equal and not equal comparison
Greater than and less than comparison
Contains, like, and match operators
And / OR comparison operators
Best practices for comparison operators
Summary
Chapter 20: Functions, Switches, and Loops Structures
Functions
Looping structures
Switches
Combining the use of functions, switches, and loops
Best practices for functions, switches, and loops
Summary
Chapter 21: Regular Expressions
Getting started with regular expressions
Regular expression grouping constructs and ranges
Regular expression quantifiers
Regular expression anchors
Regular expressions examples
Summary
Chapter 22: Error and Exception Handling and Testing Code
Error and exception handling – parameters
Error and exception handling – Try/Catch
Error and exception handling – legacy exception handling
Methodologies for testing code
Summary
Chapter 23: Session-based Remote Management
Utilizing CIM sessions
Summary
Chapter 24: Managing Files, Folders, and Registry Items
Registry provider
Creating files, folders, and registry items with PowerShell
Adding named values to registry keys
Verifying files, folders, and registry items
Copying and moving files and folders
Renaming files, folders, registry keys, and named values
Deleting files, folders, registry keys, and named values
Summary
Chapter 25: File, Folder, and Registry Attributes, ACLs, and Properties
Retrieving attributes and properties
Viewing file and folder extended attributes
Setting the mode and extended file and folder attributes
Managing file, folder, and registry permissions
Summary
Chapter 26: Windows Management Instrumentation
WMI structure
Using WMI objects
Searching for WMI classes
Creating, modifying, and removing WMI property instances
Invoking WMI class methods
Summary
Chapter 27: XML Manipulation
XML file structure
Summary
Chapter 28: Managing Microsoft Systems with PowerShell
Managing local users and groups
Managing Windows services
Managing Windows processes
Installing Windows features and roles
Summary
Chapter 29: Automation of the Environment
Invoking programs for automation
Using desired state configuration
Detecting and restoring drifting configurations
Summary
Chapter 30: Script Creation Best Practices and Conclusion
Best practices for script management
# commenting headers
Best practices for script creation
Best practices for software automation
Summary

Book Details

ISBN 139781787123755
Paperback737 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Enterprise PowerShell Scripting Bootcamp Book Cover
Enterprise PowerShell Scripting Bootcamp
$ 35.99
$ 25.20
Linux: Powerful Server Administration Book Cover
Linux: Powerful Server Administration
$ 79.99
$ 56.00
Mastering Windows PowerShell Scripting - Second Edition Book Cover
Mastering Windows PowerShell Scripting - Second Edition
$ 35.99
$ 25.20
PowerShell for Office 365 Book Cover
PowerShell for Office 365
$ 31.99
$ 22.40
Learning PowerShell DSC - Second Edition Book Cover
Learning PowerShell DSC - Second Edition
$ 35.99
$ 25.20
Windows Server 2012 Automation with PowerShell Cookbook Book Cover
Windows Server 2012 Automation with PowerShell Cookbook
$ 32.99
$ 23.10