Mastering Windows Powershell Scripting

Total Page:16

File Type:pdf, Size:1020Kb

Mastering Windows Powershell Scripting Mastering Windows PowerShell Scripting Third Edition Automate and manage your environment using PowerShell Core 6.0 Chris Dent BIRMINGHAM - MUMBAI Mastering Windows PowerShell Scripting Third Edition Copyright © 2019 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 or its dealers and distributors, will be held liable for any damages caused or alleged to have been 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. Commissioning Editor: Vijin Boricha Acquisition Editor: Meeta Rajani Content Development Editor: Nithin George Varghese Technical Editor: Rutuja Patade Copy Editor: Safis Editing Project Coordinator: Drashti Panchal Proofreader: Safis Editing Indexer: Pratik Shirodkar Graphics: Tom Scaria Production Coordinator: Jisha Chirayil First published: April 2015 Second edition: October 2017 Third edition: February 2019 Production reference: 1280219 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78953-666-9 www.packtpub.com mapt.io Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website. Why subscribe? Spend less time learning and more time coding with practical eBooks and videos from over 4,000 industry professionals Improve your learning with Skill Plans built especially for you Get a free eBook or video every month Mapt is fully searchable Copy and paste, print, and bookmark content Packt.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.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.packt.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. Contributors About the author Chris Dent is an automation specialist with a deep interest in the PowerShell language. Chris is often found lurking and answering questions about PowerShell in both the UK and virtual PowerShell user groups. Chris has been developing in PowerShell since 2007 and has released several modules over the years. My thanks, first and foremost, must go to my wife and two children for their forbearance as I have written this book. I want to express my thanks to the technical reviewers, Paul Broadwith and Graham Beer, for their invaluable comments and feedback throughout this journey. Finally, I would like to thank the members of the Virtual PowerShell User Group for putting up with my weekend rambling and musing as I work through each of the chapters. About the reviewers Paul Broadwith is a senior technology professional freelancing in Scotland, with over 25 years of experience in diverse sectors, from manufacturing and financial services to the public sector and managed IT services. He has been involved in the open source and PowerShell communities for several years. His love of not doing things twice motivates him to automate as much as possible with PowerShell, and you will find much of it on GitHub. You'll find him working between there and the Chocolatey community, where he works on several open source projects. In what's left of his spare time (which isn't much), you can find him blogging at pauby.com and tweeting from @pauby. Graham Beer is an experienced IT professional with excellent PowerShell skills and a flair for automation with Microsoft and AWS products. He is a regular contributor to 4sysops articles and was named in SQLShack's top 50 PowerShell bloggers of 2018. He recently had a chapter published in The PowerShell Conference Book about extending type data. He co- founded a PowerShell user group in the South of England, which has been running for over a year. Packt is searching for authors like you If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea. Table of Contents Preface 1 Section 1: Section 1: Exploring PowerShell Fundamentals Chapter 1: Introduction to PowerShell 8 Technical requirements 9 What is PowerShell? 9 PowerShell editors 10 Getting help 10 Updatable help 11 The Get-Help command 12 Syntax 13 Examples 14 Parameter 14 Detailed and full switches 15 Save-Help 16 Update-Help 16 About help files 18 Command naming and discovery 19 Verbs 19 Nouns 19 Finding commands 20 Aliases 21 Parameters and parameter sets 22 Parameters 22 Optional parameters 22 Optional positional parameters 23 Mandatory parameters 23 Mandatory positional parameters 23 Switch parameters 24 Common parameters 24 Parameter values 25 Parameter sets 26 Confirm, WhatIf, and Force 27 Confirm parameter 27 ConfirmPreference 28 WhatIf parameter 30 WhatIfPreference 30 Force parameter 31 Introduction to providers 31 Drives using providers 32 Table of Contents Using providers 34 Introduction to splatting 35 Splatting to avoid escaped end-of-line 36 Splatting to avoid repetition 38 Splatting and positional parameters 39 Summary 39 Chapter 2: Modules and Snap-ins 40 Introducing modules 40 What is the PowerShell Gallery? 42 The Get-Module command 43 PSModulePath in Windows PowerShell 43 PSModulePath in PowerShell Core 44 Get-Module, PSCompatibility, and PSEdition 45 The Import-Module command 45 The Remove-Module command 47 The Find-Module command 47 The Install-Module command 48 The Update-Module command 49 The Save-Module command 49 PowerShell Core and the WindowsCompatibility module 49 The compatibility session 50 Add-WindowsPSModulePath 51 Get-WinModule and Import-WinModule 52 Copy-WinModule 52 Invoke-WinCommand 53 Introducing snap-ins 53 Using snap-ins 54 Summary 54 Chapter 3: Working with Objects in PowerShell 55 Pipelines 56 Standard output 56 Non-standard output 56 The object pipeline 57 Members 57 The Get-Member command 58 Accessing properties 59 Using methods 60 Access modifiers 61 The Add-Member command 63 Enumerating and filtering 65 The ForEach-Object command 65 Where-Object command 66 Selecting and sorting 67 The Select-Object command 67 [ ii ] Table of Contents The Sort-Object command 70 Grouping and measuring 73 The Group-Object command 73 The Measure-Object command 76 Comparing 77 Importing, exporting, and converting 79 The Export-Csv command 79 The Import-Csv command 81 Export-Clixml and Import-Clixml 83 Summary 84 Chapter 4: Operators 85 Arithmetic operators 86 Operator precedence 86 Addition and subtraction operators 87 Addition operators 87 Subtraction operator 88 Multiplication, division, and remainder operators 88 Multiplication operator 89 Division operator 89 Remainder operator 90 Shift left and shift right operators 90 Assignment operators 93 Assign, add and assign, and subtract and assign 93 Multiply and assign, divide and assign, and modulus and assign 95 Comparison operators 96 Case-sensitivity 96 Comparison operators and arrays 97 Equal to and not equal to 98 Like and not like 99 Greater than and less than 99 Contains and in 100 Regular expression-based operators 101 Match and not match 101 Replace 102 Split 103 Binary operators 104 Binary and 104 Binary or 105 Binary exclusive or 105 Binary not 106 Logical operators 106 And 106 Or 107 Exclusive or 107 Not 107 [ iii ] Table of Contents Type operators 108 As 108 is and isnot 109 Redirection operators 109 Redirection to a file 110 Redirecting streams to standard output 112 Redirection to null 113 Other operators 114 Call 114 Comma 114 Format 115 Increment and decrement 116 Join 117 Summary 117 Section 2: Section 2: Working with Data Chapter 5: Variables, Arrays, and Hashtables 119 Naming and creating variables 120 Variable commands 121 Clear 122 Get 122 New 122 Remove 123 Set 123 Variable provider 124 Variable scope 125 Local and global scope 126 Private scope 127 Script scope 128 Type and type conversion 129 Objects assigned to variables 131 Arrays 132 Creating an array 133 Arrays with a type 133 Adding elements to an array 134 Selecting elements from an array 135 Changing element values in an array 136 Removing elements from an array 136 Removing elements by index 137 Removing elements by value 138 Clearing an array 138 Filling variables from arrays 138 Multi-dimensional and jagged arrays 139 Hashtables 140 [ iv ] Table of Contents Creating a hashtable 141 Adding and changing elements to a hashtable 141 Selecting elements from a hashtable 143 Enumerating a hashtable 144 Removing elements from
Recommended publications
  • Powershell Scripting Language Course Proposal for Tallinn University of Technology
    TALLINN UNIVERSITY OF TECHNOLOGY School of Information Technologies Riivo Kiljak 178071IABM POWERSHELL SCRIPTING LANGUAGE COURSE PROPOSAL FOR TALLINN UNIVERSITY OF TECHNOLOGY Master’s thesis Supervisor: Siim Vene MSc Tallinn 2019 TALLINNA TEHNIKAULIKOOL¨ Infotehnoloogia teaduskond Riivo Kiljak 178071IABM POWERSHELLI SKRIPTIMISKEELE KURSUSE ETTEPANEK TALLINNA TEHNIKAULIKOOLILE¨ Magistrito¨o¨ Juhendaja: Siim Vene MSc Tallinn 2019 Author’s Declaration of Originality I hereby certify that I am the sole author of this thesis. All the used materials, references to the literature and the work of others have been referred to. This thesis has not been presented for examination anywhere else. Author: Riivo Kiljak 07.05.2019 3 Abstract In the thesis, a recommendation is made to establish a new course at TalTech. The course is intended to teach the PowerShell scripting language to students, most importantly in the IT Systems Administration programme. Course material is proposed in the form of lecture slides, home assignments and knowledge tests. All three of which are available in the appendices of the paper. Design science is used to pass iterations of improving the content prior the the paper publishing. Academic literature is analysed to determine the included and excluded topics and the teaching methodology. More- over, input is acquired from scrutinising public information on Microsoft’s official PowerShell courses and interviewing subject matter experts who use PowerShell at local companies. The course material is provided written in LATEX which means that it can be conveniently modified, version controlled and distributed in the PDF format. Although the proposed course is seen as an online course hosted on Moodle, argumentation is made suggesting a combination with classroom seminars is likely to result in better learning outcomes at the cost of scalability.
    [Show full text]
  • CONESTOGA CABINET ASSEMBLY INFORMATION What Is Included with Your Cabinets: What Is Not Included with Your Cabinets
    CONESTOGA CABINET ASSEMBLY INFORMATION We suggest you view the 4 minute assembly demonstration video on our web site to see how easily our high end custom cabinets are assembled. Before continuing, it is important to realize that Conestoga’s RTA cabinet is targeted at cabinet shops who would rather use this system than build their own custom cabinets from scratch. On one hand, this indicates that it’s a VERY high quality cabinet. On the other hand, it means Conestoga has made some assumptions that its user has certain level of cabinet making skills and knowledge which most homeowners may not possess. As a result, we feel the assembly instructions Conestoga details in their guide are incomplete. Therefore, we have compiled the following assembly information from our years of assembly experience with this product. Remember, as opposed to other Conestoga Re-sellers or sales agents, we actually use the product every day. So, if you have a question that is not answered here, just give us a call and we can talk you through it, send you images from our shop floor, diagrams or even helpful hardware items to assist you. If it gets frustrating, take some time away and give us a call or shoot us an email. Rest assured, we’ll get you through it! What is Included with Your Cabinets: Everything necessary to build the cabinet box. Drawer glides and necessary hardware/screws. Hinges and necessary hardware/screws. Doors, drawer fronts and drawer boxes. What is not included with Your Cabinets: Screws required to mount drawer fronts to the drawer boxes (we use self tapping wood screws 1-1/4” long, available at local home centers or hardware stores.
    [Show full text]
  • Solve Errors Caused by Corrupt System Files
    System File Corruption Errors Solved S 12/1 Repair Errors Caused by Missing or Corrupt System Files With the information in this article you can: • Find out whether corrupt system files could be causing all your PC problems • Manually replace missing system files using your Windows installation CD • Use System File Checker to repair broken Windows system files • Boost the memory available to Windows File Protection for complete system file protection Missing or corrupt system files can cause many problems when using your PC, from cryptic error messages to mysterious system crashes. If one of the key files needed by Windows has gone missing or become corrupt, you may think that the only way to rectify the situation is to re-install Windows. Fortunately, nothing that drastic is required, as Microsoft have included several tools with Windows that allow you to replace corrupt or missing files with new, fresh copies directly from your Windows installation CD. Now, whenever you find that an important .DLL file has been deleted or copied over, you won’t have to go to the trouble of completely re-installing your system – simply replace the offending file with a new copy. Stefan Johnson: “One missing file can lead to your system becoming unstable and frequently crashing. You may think that the only way to fix the problem is to re-install Windows, but you can easily replace the offending file with a fresh copy from your Windows installation CD.” • Solve errors caused by corrupt system files ................... S 12/2 • How to repair your missing system file errors ..............
    [Show full text]
  • Information Technology Security Policy
    BRAIN UK UK Brain Archive Information Network INFORMATION TECHNOLOGY SECURITY POLICY SOP Reference BUK SOP 3 Version number 1.31 Date created 15 April 2015 Date of last review 15 April 2015 Date of next review 15 April 2017 Author: Name Dr Clare Mitchell Signature Authorised by: Name Prof. James A R Nicoll Signature Ref: 14/SC/0098 UK Brain Archive Information Network (BRAIN UK) SOP 3 v1.31 Date: 15 April 2015 - 1 - THIS PAGE IS BLANK Table of Contents Ref: 14/SC/0098 UK Brain Archive Information Network (BRAIN UK) SOP 3 v1.31 Date: 15 April 2015 - 2 - 1. Purpose 5 2. Policy Declaration 2.1 Data Storage 5 2.2 Backup and Recovery Plan 6 2.3 System access and Passwords 6 2.4 Encryption 6 2.5 Data Transfer 7 2.6 Physical Security 7 2.7 Data Quality and Accuracy 2.7.1 Data Entry 7 2.7.2 Data Modification and Deletion 7 2.8 System Specification 8 3. References 8 4. Supporting Documentation 8 Ref: 14/SC/0098 UK Brain Archive Information Network (BRAIN UK) SOP 3 v1.31 Date: 15 April 2015 - 3 - THIS PAGE IS BLANK Ref: 14/SC/0098 UK Brain Archive Information Network (BRAIN UK) SOP 3 v1.31 Date: 15 April 2015 - 4 - 1. Purpose BRAIN UK processes and maintains a large amount of valuable data. This policy aims to protect such data against loss, unauthorised access and modification, inadvertent destruction and to ensure that the integrity and quality of stored data is maintained. The data processed by BRAIN UK falls into one of two distinct categories: 1.
    [Show full text]
  • Installation Tips
    Installation Tips Important Please Read Before Going Further! Installation of Kitchen Cabinets is NOT a Do-It-Yourself project for those without extensive experience in finish carpentry. If you are not a professional carpenter please seek help from a trained professional. This guide is meant to be used as a supplement to carpenters who are trained and familiar with cabinetry installa- tion techniques, it is not meant to be a stand alone installation guide. Version 1.0 - 2009 CABINET INSTALLATION TABLE OF CONTENTS Cabinet installation requires special skills and tools. If you are COMMON INSTALLATION TOOLS uncertain of any part of these basic instructions, terms or lack the minimum listed tools, consult with your cabinet supplier For professional results have the tools you need at hand and for recommended professional cabinet installation mechanics. ready. Here’s a tip: save changeover time by having two An error during installation can result in costly repairs and cordless screwguns – one with a drill bit for predrilling screw delays. holes and another with a screw tip. TERMS TO KNOW • Power Drill • Sand Paper • Drill Bits • Block Plane • Terms and Tools Level: A horizontal plane at right angles to the plumb. • Carpenter’s Levels (2’ & 4’) • Clamps • Carpenter’s Square • Caulking Plumb: A true vertical line. If something is “out of plumb” it •Tape Measure (1”x25’) • Chalk Line is not exactly straight up and down. • Step ladder • Mitre Box • Common Construction Details • Nail Set • Marking Tools Square: All lines parallel and at 90° to each other. • Extension Cord(s) • Stud Finder Rail: A horizontal framing member of a cabinet door.
    [Show full text]
  • Software to Extract Cab Files
    Software to extract cab files click here to download You can use WinZip to extract CAB files by following the steps listed below. file extension associated with WinZip program, just double-click on the file. PeaZip offers read-only support (open and extract cab files) for Microsoft Cabinet file format, providing a free alternative utility to open (list content) and www.doorway.ru packages, or disassemble single files from the container, under Windows and Linux operating systems. Moreover, the OS can create, extract, or rebuild cab files. This means you do not require any additional third-party software for this task. All CAB. For a number of years, Microsoft has www.doorway.ru files to compress software that was distributed on disks. Originally, these files were used to minimize the number . The InstallShield installer program makes files with the CAB However, you can also open or extract CAB files with a file decompression tool. Open, browse, extract, or view Microsoft CAB files with Altap Salamander File Manager. High quality software with emphasis on error states. Affordable cost: . Microsoft uses cab files to package software programs. You can view the contents of a cab file by unzipping it and extracting its contents to a. Hi, I need some help www.doorway.ru files. I have to extract a patch for one game, so i used universal extractor for to extract www.doorway.ru Now I have to. cab Extension - List of programs that can www.doorway.ru files. www.doorway.ru, Inventoria Stock Manager, NCH Software, Extract with Express Zip, Low.
    [Show full text]
  • Windows 95 & NT
    Windows 95 & NT Configuration Help By Marc Goetschalckx Version 1.48, September 19, 1999 Copyright 1995-1999 Marc Goetschalckx. All rights reserved Version 1.48, September 19, 1999 Marc Goetschalckx 4031 Bradbury Drive Marietta, GA 30062-6165 tel. (770) 565-3370 fax. (770) 578-6148 Contents Chapter 1. System Files 1 MSDOS.SYS..............................................................................................................................1 WIN.COM..................................................................................................................................2 Chapter 2. Windows Installation 5 Setup (Windows 95 only)...........................................................................................................5 Internet Services Manager (Windows NT Only)........................................................................6 Dial-Up Networking and Scripting Tool....................................................................................6 Direct Cable Connection ..........................................................................................................16 Fax............................................................................................................................................17 Using Device Drivers of Previous Versions.............................................................................18 Identifying Windows Versions.................................................................................................18 User Manager (NT Only) .........................................................................................................19
    [Show full text]
  • Pagescope Cabinet User Manual
    4343-7733-01 User Manual PageScope Cabinet Table of Contents 1 Introduction 1.1 Welcome to Minolta ......................................................................1-1 1.2 Roadmap of this Manual...............................................................1-2 Where to find what in this User's Manual........................................1-2 Brief Explanation of Special Type Styles and Method of Presentation...................................................................1-3 2 About PageScope Cabinet 2.1 Software Features.........................................................................2-1 3 Installation 3.1 System Requirements ..................................................................3-1 3.2 Installing the Software..................................................................3-2 3.3 Uninstalling the Software.............................................................3-4 4First Steps 4.1 Starting and Closing the Application ..........................................4-1 Starting PageScope Cabinet...........................................................4-1 Closing PageScope Cabinet ...........................................................4-2 4.2 Overview of the Main Window .....................................................4-2 4.3 Setting System Environment .......................................................4-3 Open the “SetUp” Dialog.................................................................4-3 System Index card ..........................................................................4-4 Interval
    [Show full text]
  • UC San Diego Policy & Procedure Manual ______
    UC San Diego Policy & Procedure Manual _________________________________________________ Search | A–Z Index | Numerical Index | Classification Guide | What’s New COMPUTING SERVICES Section: 135-3 APPENDIX C Effective: 01/17/2012 Supersedes: 04/15/2010 Review Date: TBD Issuance Date: 01/17/2012 Issuing Office: Administrative Computing & Telecommunications (ACT) APPENDIX C – RISKY FILE TYPES File Extension Description .ani Windows animated cursor file security vulnerability. Possible buffer overflow in Windows .bat Batch files are often malicious .bmp Windows bitmap file security vulnerability. Possible buffer overflow in Windows .cab Possible malicious Microsoft cabinet file .cer Dangerous Security Certificate (according to Microsoft Q883260) .chm Complied help files are very dangerous in email .cmd Batch files are often malicious .cnf Speed Dials are very dangerous in email .com Executable DOS/Windows Programs are dangerous in email .cpl Control panel items are often used to hide viruses .cur Windows cursor file security vulnerability. Possible buffer overflow in Windows .exe Executable DOS/Windows programs are dangerous in email .hlp Windows file security vulnerability. Possible buffer overflow in Windows .hta HTML archives are very dangerous in email .ico Windows icon file security vulnerability. Possible buffer overflow in Windows .ins Windows Internet Settings are dangerous in email .its Dangerous Internet Document Set (according to Microsoft Q883260) .job Task Scheduler requests are dangerous in email .jse* JScript Scripts are dangerous
    [Show full text]
  • Diamond Cabinets Installation Guide.Pdf
    the helpful guide to cabinet installation table of contents Introduction 2 Tools You’ll Need 3 Step 1 - Preparation 4 Step 2 - Removal 4 Step 3 - Wall Cabinets 4 Step 4 - Make a “Map” 5 Step 5 - Mark for Base 6 Step 6 - Installation of Wall Cabinets 7 Step 7 - Install Base Cabinets 9 Lazy Susan Installation 10 Specialty Cabinets Installation 10 Step 8 - Putting on the Counter Top 11 Step 9 - Door and Drawer Alignment 12 Step 10 - Putting on the Hardware 13 Wood Dust Caution 13 Warped Door Policy 14 Care and Cleaning 15 Trouble Shooting 15 1 This booklet covers the basic guidelines of installation and is a great help when installing yourself. However, you should be aware that each project will have some unique characteristics and no installation guide could cover them all. As the installer, you are fully responsible for your finished product. MasterBrand Cabinets disclaims all responsibility for any damages arising from cabinet installation. In addition, the warranty on your cabinets becomes void if the cabinets are in any way modified, improperly installed or damaged prior or during installation. Thank you for purchasing Diamond Cabinetry! 2 tools you’ll need Figure 1 • Steel tape measure • Stud finder • Carpenter’s level at least 24" in length • Patching plaster and putty knife • Chalk line or string • Small carpenter’s saw • A few cedar shakes, shingles or • Claw hammer other suitable tapered pieces of wood for shims • Assortment of straight blade and Phillips head screwdrivers • Scribing tool and pencil 7 3 • Variable speed drill with /32", /16" 1 and /4" drill bits and screwdriver attachments IMPORTANT • Step ladder Shut off water to the sink and dishwasher.
    [Show full text]
  • Risk Control Bulletin Laptop Computer Security
    Risk Control Bulletin Laptop Computer Security RISK CONTROL Laptop Security conducted in 2009 was that the average value of a lost laptop was $49,246. This value is based on seven cost components: replacement Laptop computers are vital tools used by a wide population of cost, detection, forensics, data breach, lost intellectual property technology-industry workers. Since laptop computers and handheld costs, lost productivity and legal, consulting and regulatory expenses. devices are not typically used in a fixed, securable location, additional Occurrence of a data breach represents 80 percent of the cost. measures are needed to protect them. Therefore, it is important to take additional steps to prevent losses • A formal security policy detailing end-user responsibility for related to data breaches associated with the theft of data storage securing these devices and the data they contain is essential. devices and media. Devices should never be left unattended. • Cable locks and docking stations should be used but only when • First, carefully evaluate the need for storage of sensitive information the device is left in a secure location, such as an office, for short on any type of portable device or removable media. In many cases, periods. it will be determined that the need for storing information on these difficult-to-secure devices is not worth the benefit given today’s - These security methods are easily compromised and higher threat environment. security options should be used when leaving a laptop in an office overnight (locked in storage area, file cabinet, etc…) • Where possible, prohibit such storage in an information security policy but also evaluate technical means of preventing this data • Travel procedures should address common high risk situations: leakage—disabling or monitoring usage of USB ports, content - Avoid storage in automobiles.
    [Show full text]
  • Windows Powershell Best Practices Windows Powershell Best Practices
    Windows PowerShell Best Practices Windows PowerShell Best Practices Expert recommendations, pragmatically applied Automate system administration using Windows PowerShell best practices—and optimize your operational efficiency. With this About the Author practical guide, Windows PowerShell expert and instructor Ed Ed Wilson, MCSE, CISSP, is a well-known Wilson delivers field-tested tips, real-world examples, and candid scripting expert and author of “Hey Windows Scripting Guy!”—one of the most popular advice culled from administrators across a range of business and blogs on Microsoft TechNet. He’s written technical scenarios. If you’re an IT professional with Windows several books on Windows scripting PowerShell experience, this book is ideal. for Microsoft Press, including Windows PowerShell 2.0 Best Practices and Windows PowerShell Scripting Guide. Discover how to: PowerShell • Use Windows PowerShell to automate Active Directory tasks • Explore available WMI classes and methods with CIM cmdlets • Identify and track scripting opportunities to avoid duplication • Use functions to encapsulate business logic and reuse code • Design your script’s best input method and output destination • Test scripts by checking their syntax and performance • Choose the most suitable method for running remote commands • Manage software services with Desired State Configuration Wilson BEST PRACTICES microsoft.com/mspress ISBN 978-0-7356-6649-8 U.S.A. $59.99 55999 Canada $68.99 [Recommended] 9 780735 666498 Operating Systems/Windows Server Celebrating 30 years! Ed Wilson 666498_Win_PowerShell_Best_Practices.indd 1 4/11/14 10:30 AM Windows PowerShell Best Practices Ed Wilson 666498_book.indb 1 12/20/13 10:50 AM Published with the authorization of Microsoft Corporation by: O’Reilly Media, Inc.
    [Show full text]