ebook img

PowerShell Deep Dives PDF

464 Pages·2013·15.68 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview PowerShell Deep Dives

DEEP DIVES E DITED BY Jeffery Hicks Richard Siddaway Oisín Grehan Aleksandar Nikolic´ ● ● ● C ONTRIBUTORS Chris Bellée Bartek Bielawski Robert C. Cain Jim Christopher Adam Driscoll Josh Gavant Jason Helmick Don Jones ● ● ● ● ● ● ● Ashley McGlone Jonathan Medd Ben Miller James O’Neill Arnaud Petitjean Vadims Podans Karl Prosser Boe Prox ● ● ● ● ● ● ● Matthew Reynolds Mike Robbins Donabel Santos Will Steele Trevor Sullivan Jeff Wouters ● ● ● ● ● Author royalties go to support the Save the Children Fund M A N N I N G www.it-ebooks.info PowerShell Deep Dives www.it-ebooks.info www.it-ebooks.info PowerShell Deep Dives Edited by Jeffery Hicks Richard Siddaway ■ Oisín Grehan Aleksandar Nikolic´ ■ MANNING SHELTER ISLAND www.it-ebooks.info For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 261 Shelter Island, NY 11964 Email: [email protected] ©2013 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine. Manning Publications Co. Development editor: Cynthia Kane 20 Baldwin Road Copyeditor: Gwen Burda, Tiffany Taylor, PO Box 261 and Lianna Wlasiuk Shelter Island, NY 11964 Proofreader: Melody Dolab Typesetter: Dennis Dalinnik Cover designer: Marija Tudor ISBN 9781617291319 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – MAL – 18 17 16 15 14 13 www.it-ebooks.info To the memory and indomitable spirit of Will Steele @pen_test www.it-ebooks.info authors and their chapters Chris Bellée 28 James O’Neill 9 Bartosz Bielawski 5, 13 Arnaud Petitjean 3 Robert C. Cain 25 Vadims Podans 7 Jim Christopher 22 Karl Prosser 21 Adam Driscoll 14 Boe Prox 4, 26 Josh Gavant 20 Matthew Reynolds 15 Jason Helmick 27 Mike F. Robbins 6 Jeffery Hicks 17 Donabel Santos 24 Don Jones 1 Richard Siddaway 2, 16, 19 Ashley McGlone 8 Will Steele 11 Jonathan Medd 12 Trevor Sullivan 18 Ben Miller 23 Jeff Wouters 10 vi www.it-ebooks.info brief contents PART 1 POWERSHELL ADMINISTRATION. ........................1 1 ■ Diagnosing and troubleshooting PowerShell remoting 3 2 ■ CIM sessions 22 3 ■ Collecting and analyzing performance counter data 31 4 ■ TCP port communications with PowerShell 51 5 ■ Managing systems through a keyhole 71 6 ■ Using PowerShell to audit user logon events 80 7 ■ Managing and administering a certification authority database with PowerShell 93 8 ■ Using PowerShell to reduce Active Directory token bloat 115 PART 2 POWERSHELL SCRIPTING...............................127 9 ■ The 10 PowerShell scripting commandments 129 10 ■ Avoiding the pipeline 150 11 ■ A template for handling and reporting errors 161 12 ■ Tips and tricks for creating complex or advanced HTML reports with PowerShell 171 13 ■ Using and “abusing” dynamic parameters 192 14 ■ PowerShell type formatting 207 15 ■ Scalable scripting for large data sets: pipeline and database techniques 221 vii www.it-ebooks.info viii BRIEF CONTENTS 16 ■ Building your own WMI-based cmdlets 236 17 ■ Turning command-line tools into PowerShell tools 247 PART 3 POWERSHELL FOR DEVELOPERS......................259 18 ■ Using Source Control Software with PowerShell 261 19 ■ Inline .NET code 270 20 ■ PowerShell and XML: better together 278 21 ■ Adding automatic remoting to advanced functions and cmdlets 306 22 ■ Taming software builds (and other complicated processes) with psake 326 PART 4 POWERSHELL PLATFORMS.............................341 23 ■ PowerShell and the SQL Server provider 343 24 ■ Creating flexible subscriptions in SSRS 354 25 ■ Inventory database table statistics using PowerShell and SQL Server Management Objects 368 26 ■ WSUS and PowerShell 379 27 ■ Provisioning IIS web servers and sites with PowerShell 392 28 ■ Active Directory Group Management application 406 www.it-ebooks.info contents preface xxi acknowledgments xxii about this book xxiii about Save the Children xxvi PART 1 POWERSHELL ADMINISTRATION. ......................... 1 EDITED BY RICHARD SIDDAWAY 1 Diagnosing and troubleshooting PowerShell remoting 3 DON JONES Diagnostics examples 3 A perfect remoting connection 6 Connection problem: Blocked port 14 Connection problem: No permissions 16 Connection problem: Untrusted host 19 Summary 20 2 CIM sessions 22 RICHARD SIDDAWAY WMI 22 CIM cmdlets 23 Using CIM sessions 25 CIM session options 28 Summary 30 ix www.it-ebooks.info

Description:
absolute beginner, much of the content will be lost on you. This book isn't intended This book is divided into 4 parts, each centered on a PowerShell theme: □.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.