Mastering Windows PowerShell Scripting
Second Edition
One-stop guide to automating administrative tasks
Chris Dent
Brenton J.W. Blawat
BIRMINGHAM - MUMBAI
Mastering Windows PowerShell Scripting
Second Edition
Copyright 2017 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 authors, 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
Second edition: October 2017
Production reference: 1251017
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78712-630-5
www.packtpub.com
Credits
Authors Chris Dent Brenton J.W. Blawat | Project Coordinator Kinjal Bari |
Reviewer Paul Broadwit h | Proofreader Safis Editing |
Acquisition Editor Meeta Rajani | Indexer Tejal Daruwale Soni |
Content Development Editor Mamata Walkar | Graphics Kirk D'penha |
Technical Editor Varsha Shivhare | Production Coordinator Nilesh Mohite |
Copy Editors Safis Editing Ulka Manjrekar |
About the Authors
Chris Dent is a professional PowerShell developer based in and around London with over 8 years experience in that language alone. He is also proficient in C#, VBScript, Perl, and Python, but PowerShell is his favorite by a wide margin. He is also the author of dnshell.
He describes himself as being a toolset or module developer (he rarely writes scripts in the one-off sense); he has a deep interest in formalized development approaches, continuous integration, secure coding practices, and creating supportable automation frameworks within organizations.
Brenton J.W. Blawat is an entrepreneur, strategic technical advisor, author, and enterprise architect, who has a passion for the procurement of technology in profit-based organizations. He is business-centric and technology-minded. Brenton has many years of experience in bridging the gap between technical staff and decision-makers in several organizations. He takes pride in his ability to effectively communicate with a diverse audience and provide strategic direction for large and small organizations alike.
In 2013, Brenton authored his first book, PowerShell 3.0 WMI Starter, Packt Publishing. In March 2015, he authored his second book, Mastering Windows PowerShell Scripting, with Packt Publishing.
Brenton currently works at CDW as an Enterprise Architect in strategic solutions and services. CDW is a leading multibrand technology solutions provider in the fields of business, government, education, and healthcare. A Fortune 500 company, it was founded in 1984 and employs approximately 7,200 coworkers. In 2016, the company generated net sales of more than $13.0 billion.
His current specialization sits on top of 15 years of experience spread across (predominantly Microsoft) systems, (Juniper and Cisco) networking, and security.
About the Reviewer
Paul Broadwith is a senior technology professional freelancing in Scotland. He has over 25 years of experience in diverse sectors, from manufacturing and financial services to the public sector and managed IT services.
With particular expertise in Microsoft and Linux technologies, he has interest in PowerShell on both platforms. An advocate of a common-sense approach to coding, best practice, and code reusability, he enjoys practicing what he preaches in his code and mentoring new professionals.
www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com .
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service packtpub.com for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Why subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print, and bookmark content
- On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/ 1787126307 .
If you'd like to join our team of regular reviewers, you can email us at customerreviews@packtpub.com . We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
Preface
PowerShell scripts offer a handy way to automate various chores. Working with these scripts effectively can be a difficult task. This comprehensive guide starts from scratch and covers advanced-level topics, along with tips to make you a PowerShell scripting expert.
What this book covers
, Introduction to PowerShell, introduces PowerShell and why it is applicable to the IT community. This chapter discusses the types of Microsoft systems that leverage PowerShell and why it's important to learn this scripting language.
, Working with PowerShell, talks about finding and using commands and parameters.
, Modules and Snap-Ins, shows how to use PowerShell modules and snap-ins.
Next page