Mastering Windows PowerShell Scripting
eBook - ePub

Mastering Windows PowerShell Scripting

Brenton J.W. Blawat

Partager le livre
  1. 282 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Mastering Windows PowerShell Scripting

Brenton J.W. Blawat

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Mastering Windows PowerShell Scripting est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Mastering Windows PowerShell Scripting par Brenton J.W. Blawat en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatik et Programmiersprachen. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
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...

Table des matiĂšres