Brenton j w blawat mastering windows powershell scripting free download

Mastering Windows PowerShell Scripting

Table of Contents

Mastering Windows PowerShell Scripting

Credits

Foreword

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Instant updates on new Packt books

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Variables, Arrays, and Hashes

Variables

Objects stored in variables

Arrays

Single-dimension arrays

Jagged arrays

Updating array values

Hashes

Deciding the best container for your scripts

Summary

2. Data Parsing and Manipulation

String manipulation

Replacing and splitting strings

Counting and trimming strings

The Trim method

The Substring method

The string true and false methods

Number manipulation and parsing

Formatting numbers

Formatting bytes

Date and time manipulation

Forcing data types

Piping variables

Summary

3. 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

4. Functions, Switches, and Loops Structures

Functions

Looping structures

Switches

Combining the use of functions, switches, and loops

Best practices for functions, switches, and loops

Best practices for functions

Best practices for looping structures and switches

Summary

5. Regular Expressions

Getting started with regular expressions

Regular expression grouping constructs and ranges

Regular expression quantifiers

Regular expression anchors

Regular expressions examples

Summary

6. Error and Exception Handling and Testing Code

Error and exception handling – parameters

Error and exception handling – Try/Catch

Error and exception handling –Try/Catch with parameters

Error and exception handling – legacy exception handling

Methodologies for testing code

Testing the –WhatIf argument

Testing the frequency

Hit testing containers

Don't test in production

Summary

7. Session-based Remote Management

Utilizing CIM sessions

Creating a session

Creating a session with session options

Using sessions for remote management

Removing sessions

Summary

8. 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

9. 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

Copying access control lists

Adding and removing ACL rules

Summary

10. Windows Management Instrumentation

WMI structure

Using WMI objects

Searching for WMI classes

Creating, modifying, and removing WMI property instances

Creating property instances

Modifying property instances

Removing property instances

Invoking WMI class methods

Summary

11. XML Manipulation

XML file structure

Reading XML files

Adding XML content

Modifying XML content

Removing XML content

Summary

12. Managing Microsoft Systems with PowerShell

Managing local users and groups

Managing local users

Managing local groups

Querying for local users and groups

Managing Windows services

Managing Windows processes

Installing Windows features and roles

Summary

13. Automation of the Environment

Invoking programs for automation

Using desired state configuration

Authoring phase

Staging and remediation phase

Detecting and restoring drifting configurations

Summary

14. Script Creation Best Practices and Conclusion

Best practices for script management

# commenting headers

Commenting code

Best practices for script creation

Script structure

Other important best practices for script creation

Controlling source files

Best practices for software automation

Summary

Mastering Windows PowerShell Scripting – conclusion

Staying connected with the author

Index

Mastering Windows PowerShell Scripting


Mastering Windows PowerShell Scripting

Copyright © 2015 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: April 2015

Production reference: 1210415

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78217-355-7

www.packtpub.com

Credits

Author

Brenton J.W. Blawat

Reviewers

Tim Amico

Christophe CRÉMON

Tomas Restrepo

Acquisition Editor

Meeta Rajani

Content Development Editor

Rohit Singh

Technical Editor

Tanvi Bhatt

Copy Editors

Hiral Bhat

Sonia Mathur

Vikrant Phadke

Alpha Singh

Project Coordinator

Mary Alex

Proofreaders

Simran Bhogal

Safis Editing

Maria Gould

Paul Hindle

Indexer

Rekha Nair

Production Coordinator

Alwin Roy

Cover Work

Alwin Roy

Foreword

We all appreciate a little simplicity when it enters our busy, complicated lives. Technology is no different. In fact, that is what we expect from technology—it should simplify our lives. But it doesn't always work that way.

Sometimes technology can introduce vexing problems we don't anticipate.

With every version of Microsoft DOS and then Windows, Microsoft included separate command-line interface shells. The shell could automate some tasks, but not all of them. Some tasks had to be accomplished manually, which is antithetical—nearly heretical—to our understanding of technology's role.

What should have been simple, automated tasks became slow, frustrating, and manual chores. That conundrum didn't go unnoticed.

Microsoft provided much-needed simplicity when it introduced PowerShell in 2006. Task automation and configuration management eliminated a great deal of time-consuming manual work. In short, PowerShell was a game changer.

PowerShell has solved many of the command-line and scripting issues that complicated our work. It introduced simplicity. It helped organizations become more agile, more productive, and save money. PowerShell is a powerful tool, and it has demonstrated its practical value many times.

Despite its utility, though, PowerShell remains a confusing tool to many IT administrators, and the need for greater clarity remains.

Источник: [https://torrent-igruha.org/3551-portal.html]
.

Microsoft PowerShell for Beginners - Video 1 Learn PowerShell

Brenton j w blawat mastering windows powershell scripting free download