Windows PowerShell in Windows Server 2008 R2 – In Brief

White Paper

Published: April 2009

Executive Summary

Businesses today are under increasing pressure to be more productive and profitable with fewer resources. However, analysts report that most organizations use over 70 percent of their IT budgets in maintaining and operating their existing IT infrastructure rather than on investments that add business value.[1]

Many new and enhanced capabilities have been added to Microsoft® Windows Server® 2008 R2 to help enterprises optimize resources and trim costs. Microsoft Windows PowerShell is a command-line shell and scripting language that helps IT Professionals achieve greater productivity and control system administration more easily.

PowerShell 2.0 provides powerful scripting capabilities which can help automate server deployment and configuration, simplifying management – saving time and providing additional flexibility.

The Details…

Windows Server 2008 R2 introduces Windows PowerShell 2.0, which significantly enhances the previous version with the inclusion of more than 240 pre-built “cmdlets” (pronounced “commandlets”) as well as a new graphical user interface (GUI) that adds professional-level development features for writing scripts.

The new interface includes colored syntax which helps make writing and understanding scripts easier, and helps catch errors during script creation. Also included are new production script debugging capabilities.

Windows Server 2008 R2’s roles and features offer broad support of PowerShell. Many of R2’s’ new management interfaces, like the new Active Directory Administrative Center (ADAC), are built entirely upon Windows PowerShell.

Windows PowerShell 2.0 also has a deeper reach than its predecessor, with enhanced support available on both Windows 7 and the Windows Server 2008 R2 Server Core installation option (which previously could not run Windows PowerShell).

Windows Server 2008 R2 PowerShell enhancements and updates include:

·  Improved production scripting. Scripts are easy to use, share and support and safe to operate. Debugger enhancements, restricted language, modules and transactions, in addition to the 240 pre-built cmdlets, simplify automation.

·  Universal code execution model. There is now more flexibility over where and how expressions, commands, and scriptblocks can run. The code can be executed on one or more machines, in restricted or unrestricted environments and initiated by user input or events. Benefits include:

·  Remoting eases the burden of centralized management. Users no longer have to log into a machine directly to run scripts. Users can now send commands to another computer remotely across the network and remote commands to multiple computers at the same time.

·  Asynchronous execution enhances administrator’s ability to multitask. Background jobs allow administrators to run a command or expression in the background without requiring it to interact with the current session. When you start a background job, the command prompt returns immediately, even if the job takes an extended time to complete. Users can continue to work in the session without interruption while the job runs and query for the job results at their convenience.

·  Quicker identification of issues in order to respond to business needs. Eventing allows users to asynchronously respond to events that are generated by various objects in Windows which can help automate certain kinds of tasks. You can use eventing to be notified or take some predefined action when management or system events are raised, file or registry keys are altered, or other managed entities are changed.

·  Delegated management for day to day functions that are better handled in the business unit. Restricted runspaces allow an administrator to create a constrained environment to give users with less privileges access to a subset of Windows PowerShell commands, scripts, and language elements.

·  Consistent management no matter where the system is installed. The Mobile Object Model makes it possible to have objects travel around the network. This means that you can work with objects across the network rather than just being able to see a read-only copy of those objects.

·  Improved server role coverage. Windows PowerShell 2.0 also allows administrators to manage specific WindowsServer2008 R2 roles and features including:

·  Active Directory

·  Active Directory Rights Management Services

·  AppLocker

·  Background Intelligent Transfer Service (BITS)

·  Best Practices Analyzer

·  Failover Clustering (WSFC)

·  Group Policy

·  Internet Information Services (IIS)

·  Network Load Balancing (NLB)

·  Remote Desktop Services (RDS)

·  Server Manager

·  Server Migration

·  Windows Diagnostics

·  WMI (many improvements in R2)

In large scenarios, and especially vertical environments, being able to build your own management tool box is critical. Windows PowerShell is easy to adopt, learn, and use, because it does not require a background in programming, and it works with existing IT infrastructure, existing scripts, and existing command-line tools. A large user community has already grown up around Windows PowerShell, providing support and solutions to common scripting

Summary

Windows Server 2008 R2 PowerShell provides robust automation capabilities that save time, speed deployment and reduce costs by allowing organizations to automate complex and redundant tasks. For more information on PowerShell Efficiency and Management in Windows Server 2008 R2, the following resources are available:

Windows PowerShell blog http://blogs.msdn.com/PowerShell/

Windows PowerShell Owner’s Manual http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/default.mspx

This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This white paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in, or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

© 2009 Microsoft Corporation. All rights reserved.

Microsoft, Active Directory, Hyper-V, Windows, Windows PowerShell, Windows Server, Windows Vista, and the Windows logo, are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

All other trademarks are property of their respective owners.

3 PowerShell Efficiency and Management in Windows Server 2008 R2 3

[1] (Gillett, Yates, Speyer, Brown, Atwood, & Batiancila, October 11, 2006)