Mastering Windows PowerShell Scripting
eBook - ePub

Mastering Windows PowerShell Scripting

Brenton J.W. Blawat

Condividi libro
  1. 282 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Mastering Windows PowerShell Scripting

Brenton J.W. Blawat

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Mastering Windows PowerShell Scripting è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Mastering Windows PowerShell Scripting di Brenton J.W. Blawat in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatik e Programmiersprachen. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2015
ISBN
9781782173557

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

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

Indice dei contenuti