Mastering Windows PowerShell scripting
Subtitle: master the art of automating and managing your Windows environment using PowerShell
By: Brenton J.W. Blawat ; foreword by Jon Stevens
Series: Professional expertise distilled; Professional expertise distilled
Publisher: Packt Publising
Published: 2015
Place of publication: Birmingham, UK
Language: eng
Number of pages: 282
ISBN-13: 9781782173564; 9781782173557
Subjects: Windows PowerShell (Computer program language); Command languages (Computer science); COMPUTERS; Operating Systems; Windows Desktop; Microsoft Windows (Computer file)
Other titles: Master the art of automating and managing your Windows environment using PowerShell
Description: If you are a system administrator who wants to become an expert in controlling and automating your Windows environment, then this book is for you. Prior knowledge of PowerShell's core elements and applications is required for this book.
Notes: Includes index.
Table of contents: title: Cover; Copyright; Credits; Foreword; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 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; Chapter 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; title: Formatting bytesDate and time manipulation; Forcing data types; Piping variables; Summary; Chapter 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; Chapter 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; title: Best practices for looping structures and switchesSummary; Chapter 5: Regular Expressions; Getting started with regular expressions; Regular expression grouping constructs and ranges; Regular expression quantifiers; Regular expression anchors; Regular expressions examples; Summary; Chapter 6: Error and Exception Handling and Testing Code; Error and exception handling; title: parameters; Error and exception handling; title: Try/Catch; Error and exception handling -Try/Catch with parameters; Error and exception handling; title: legacy exception handling; Methodologies for testing code; title: Testing the -WhatIf argumentTesting the frequency; Hit testing containers; Don't test in production; Summary; Chapter 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; Chapter 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; title: Renaming files, folders, registry keys, and named valuesDeleting files, folders, registry keys, and named values; Summary; Chapter 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; Chapter 10: Windows Management Instrumentation; WMI structure; Using WMI objects; Searching for WMI classes