Rough Cuts are manuscripts that are developed but not yet published, available through Safari. Rough Cuts provide you access to the very latest information on a given topic and offer you the opportunity to interact with the author to influence the final publication.
This is a working draft of a pre-release book. It is available before the published date as part of the Rough Cuts service.
PowerShell gives Windows administrators immense power to automate and customize virtually any administrative task–saving time, increasing productivity, and giving you unprecedented flexibility. PowerShell 2.0 adds important new features that offer even greater control over Windows environments. Windows PowerShell Unleashed will not only give you deep mastery over PowerShell but also a greater understanding of the features being introduced in PowerShell 2.0–and show you how to use it to solve your challenges in your production environment.
The authors begin by systematically illuminating PowerShell’s core concepts and techniques, helping you leverage whatever Windows scripting experience you may already have. Next, using complete, easy-to-adapt examples, they show how to use PowerShell to manage file systems, permissions, the Registry, WMI objects, Active Directory, Exchange Server, and many other elements of the Windows environment.
More than half of this edition’s material and examples have been completely rewritten for PowerShell 2.0, and the authors have added seven entirely new chapters–covering security, PowerShell application development, Systems Center Operations Manager 2007, and much more. Whatever Windows systems you manage, Windows PowerShell Unleashed contains the scripts and techniques you need to manage them far more effectively.
Download all examples and source code presented in this book from informit.com/title/9780672329883.
Introduction 1
Part I Introduction to PowerShell
1 Introduction to Shells 7
What Is a Shell? 7
Basic Shell Use 8
Basic Shell Scripts 11
A Shell History 15
Enter PowerShell 16
New Capabilities in PowerShell 2.0 CTP2 18
Summary 19
2 Basic PowerShell Concepts 21
Getting Started 21
PowerShell 1.0 RTW 22
PowerShell 2.0 CTP2 23
Before Installing PowerShell 2.0 CTP2 23
Downloading and Installing PowerShell 2.0 25
Understanding the Command-Line Interface (CLI) 28
Navigating the CLI 30
Tab Key Auto-Completion in PowerShell 30
Understanding Cmdlets 32
Common Parameters 33
Getting Help 34
Get-Help 34
Cmdlet Help Topics 36
Get-Command 36
Understanding Variables 39
Built-In Variables 40
Understanding Aliases 42
Discovering Alias Cmdlets 43
Creating Persistent Aliases 44
Creating Your First Script 45
Summary 47
3 Advanced PowerShell Concepts 49
Working with the .NET Framework 51
Using the New-Object Cmdlet 53
Understanding Assemblies 54
Understanding Reflection 56
Understanding the Pipeline 59
Powerful One-Liners 63
The Extended Type System (ETS) 65
Understanding the Add-Member Cmdlet 67
Understanding the types.ps1xml File 68
Working with Types 68
Type Accelerators 71
Summary 72
4 Other Key PowerShell Concepts 73
Formatting Output 73
The Formatting Cmdlets &nbs
