Windows Power Shell and Windows Server 2008 R

  • Slides: 47
Download presentation

Windows Power. Shell and Windows Server 2008 R 2 Dan Reger Sr. Product Manager

Windows Power. Shell and Windows Server 2008 R 2 Dan Reger Sr. Product Manager Microsoft WSV 319

Agenda Introduction to Power. Shell …Within the Context of Management Power. Shell Goals and

Agenda Introduction to Power. Shell …Within the Context of Management Power. Shell Goals and Themes Power. Shell 2. 0 GUI over Power. Shell (Demo) Production Scripting (Demo) Community Feedback Interlude - Power. Shell. Community. org Power. Shell 2. 0 (continued) Universal Automation Environment Demo – Compellent Technologies

Today’s IT Challenges Increasing demands from the business Reliance on technology for business-critical operations

Today’s IT Challenges Increasing demands from the business Reliance on technology for business-critical operations Always-available, anywhere Increasing complexity Adding capabilities adds management burden 80% of IT cost is managing existing systems Trends of the future magnify challenges Move to Datacenters – large scale, virtualization remote management Outsourcing – lower skilled, high turnover users

Windows Server 2008 R 2 Streamlined Management Scenarios Datacenter Automation Server Migration Rich Server

Windows Server 2008 R 2 Streamlined Management Scenarios Datacenter Automation Server Migration Rich Server Management • Power. Shell: Universal Code Execution Model, GUI over Power. Shell, Production Scripting • WMI: Discoverability through PS, Profile discovery, CIM update • WS-Man: Remote Shell, Support for hosted environments (Web proxy traversal, Federated Auth using Live ID), Hardware Management (out-of-band management in-band with OS), Resource management • BITS: Lightweight server • PS cmdlets across all! • • • Known fact: most customers do not perform in-place upgrade Migration is a complex problem – both from technical and process perspective WS 7 – pragmatic approach – focus on understanding the problem and building foundation Goal: consistent documentation across all roles, Stretch: scriptable solution for core roles Lays foundation for more complete and richer solution in the future Server Manager creates consistency and enables integration Goal: Further improve Server Manager, adding incremental value Key features: PS cmdlets to add/remove roles/features, remoting, Best Practice Analyzers Incubating next-gen UX – Active Directory User Management

Server Manager & Power. Shell Integration Server Manager Power. Shell Cmdlets: Get-Windows. Feature Add-Windows.

Server Manager & Power. Shell Integration Server Manager Power. Shell Cmdlets: Get-Windows. Feature Add-Windows. Feature Remove-Windows. Feature Leverages Power. Shell features/reach Richer command line experience (auto-completion, wildcards, object pipeline, etc) Remoting Availability on Server Core

Power. Shell

Power. Shell

Windows Power. Shell New command-line shell and scripting language • • As interactive and

Windows Power. Shell New command-line shell and scripting language • • As interactive and composable as BASH/KSH As programmatic as Perl/Python/Ruby As production oriented as AS 400 CL/VMS DCL Allows access to data stores as easy to access as filesystem

A taste of Power. Shell Using pkgmgr to install Web Server (IIS): start /w

A taste of Power. Shell Using pkgmgr to install Web Server (IIS): start /w pkgmgr /iu: IIS-Web. Server. Role; IIS-Web. Server; IIS-Common. Http. Features; IISStatic. Content; IIS-Default. Document; IIS-Directory. Browsing; IIS-Http. Errors; IISHttp. Redirect; IIS-Application. Development; IIS-ASPNET; IIS-Net. Fx. Extensibility; IIS-ASP; IIS-CGI; IIS-ISAPIExtensions; IIS-ISAPIFilter; IIS-Server. Side. Includes; IISHealth. And. Diagnostics; IIS-Http. Logging; IIS-Logging. Libraries; IIS-Request. Monitor; IIS-Http. Tracing; IIS-Custom. Logging; IIS-ODBCLogging; IIS-Security; IISBasic. Authentication; IIS-Windows. Authentication; IIS-Digest. Authentication; IISClient. Certificate. Mapping. Authentication; IIS-IISCertificate. Mapping. Authentication; IIS-URLAuthorization; IIS-Request. Filtering; IIS-IPSecurity; IIS-Performance; IIS-Http. Compression. Static; IISHttp. Compression. Dynamic; IIS-Web. Server. Management. Tools; IIS-Management. Console; IISManagement. Scripting. Tools; IIS-Management. Service; IIS-IIS 6 Management. Compatibility; IIS-Metabase; IIS-WMICompatibility; IIS-Legacy. Scripts; IIS-Legacy. Snap. In; IIS-FTPPublishing. Service; IIS-FTPServer; IIS-FTPManagement; WASWindows. Activation. Service; WAS-Process. Model; WAS-Net. Fx. Environment; WAS-Configuration. API Or using Server Manager: Add-Windows. Feature web-server OR servermanagercmd –install web-server

More Productivity Mailbox Statistics Exchange 2003 (VBScript) E 12 (Power. Shell) Set list. Exchange_Mailboxs

More Productivity Mailbox Statistics Exchange 2003 (VBScript) E 12 (Power. Shell) Set list. Exchange_Mailboxs = Get. Object("winmgmts: {impersonation. Level=impersonate}!\COMPUTERNAMEROOTMicrosoft. Excha nge. V 2"). Instances. Of("Exchange_Mailbox") Get-Mailbox. Statistics –Server $servername For Each obj. Exchange_Mailbox in list. Exchange_Mailboxs WScript. echo "Assoc. Content. Count =” + obj. Exchange_Mailbox. Assoc. Content. Count WScript. echo " Date. Discovered. Absent. In. DS =” + obj. Exchange_Mailbox. Date. Discovered. Absent. In. DS WScript. echo " Deleted. Message. Size. Extended =” + obj. Exchange_Mailbox. Deleted. Message. Size. Extended WScript. echo " Last. Logged. On. User. Account =” + obj. Exchange_Mailbox. Last. Logged. On. User. Account WScript. echo " Last. Logoff. Time =” + obj. Exchange_Mailbox. Last. Logoff. Time WScript. echo " Last. Logon. Time =” + obj. Exchange_Mailbox. Last. Logon. Time WScript. echo " Legacy. DN =” + obj. Exchange_Mailbox. Legacy. DN WScript. echo " Mailbox. Display. Name =” + obj. Exchange_Mailbox. Display. Name WScript. echo " Mailbox. GUID =” + obj. Exchange_Mailbox. GUID WScript. echo " Server. Name =” + obj. Exchange_Mailbox. Server. Name WScript. echo " Size =” + obj. Exchange_Mailbox. Size WScript. echo " Storage. Group. Name =” + obj. Exchange_Mailbox. Storage. Group. Name WScript. echo " Storage. Limit. Info =” + obj. Exchange_Mailbox. Storage. Limit. Info WScript. echo " Store. Name =” + obj. Exchange_Mailbox. Store. Name WScript. echo " Total. Items =” + obj. Exchange_Mailbox. Total. Items Next Database Mgmt Dim Stor. Group as New CDOEXM. Storage. Group Stor. Group. Data. Source. Open "LDAP: //" + DCServer + "/ CN=First Storage Group, CN=Information. Store, CN=" + Server + ", CN=Servers, CN=First Administrative Group, CN=Administrative Groups, CN=First Organization, CN=Microsoft Exchange, CN=Services, CN=Configuration, " + Domain. Name Move-Storage. Group. Path -Identity “First Storage Group“ –Log "C: newlog. Path” Stor. Group. Move. Log. Files("C: newlog. Path", 0) Recipient Mgmt Dim obj. Mailbox As CDOEXM. IMailbox. Store Set obj. Mailbox = Get. Object("LDAP: //" + DCServer + "CN=FOO, CN=users, " + Domain. Name) obj. Mailbox. Create. Mailbox "LDAP: //" + DCServer + "/CN=Private MDB, CN=First Storage Group, CN=Information. Store, CN=" + Server + ", CN=Servers, CN=First Administrative Group, CN=Administrative Groups, CN=First Organization, CN=Microsoft Exchange, CN=Services, CN=Configuration, " + Domain. Name Enable-Mailbox -Identity domainFOO –Database “First Storage GroupPrivate MDB”

Tower Of Power. Shell books Now available in Japanese German French More… 2007 2008

Tower Of Power. Shell books Now available in Japanese German French More… 2007 2008

demo Discovery

demo Discovery

Power. Shell V 2 Goals Reduce the cost and effort to: Use Power. Shell

Power. Shell V 2 Goals Reduce the cost and effort to: Use Power. Shell Get, learn, share scripts Layer applications on Power. Shell GUI, web, workflow, etc. Manage anything/everything Servers, clients, distributed systems, applications, web services, cloud services, raw HW, other OSes, everything Using any and all mechanisms (WMI, . Net, native code, web services, WSMAN)

Power. Shell V 2 Themes GUI over Power. Shell Production Scripting Universal Automation Environment

Power. Shell V 2 Themes GUI over Power. Shell Production Scripting Universal Automation Environment Community Feedback

Datacenter Automation Power. Shell GUI over Power. Shell Admin GUIs layered over Power. Shell

Datacenter Automation Power. Shell GUI over Power. Shell Admin GUIs layered over Power. Shell Features: Graphical Power. Shell, Outgrid View, New Engine APIs, Runspace Pooling, Thread control Server Role coverage: AD Domain Services, AD Lightweight Directory Services, Application Server, Terminal Services, Web Server

Datacenter Automation Power. Shell Production Scripting: Scripts are easy to use, share and support

Datacenter Automation Power. Shell Production Scripting: Scripts are easy to use, share and support and safe to operate Features: Script cmdlets, debugger enhancements, restricted language, modules and transactions Universal Code Execution Model: Flexibility over where/how expressions, Commands & Script. Blocks can run On one or more machines In restricted or unrestricted environments Initiated by user input or by events Features: Remoting, background jobs, eventing, restricted runspaces, mobile object model

Power. Shell Architecture User Experience Engine Managed Elements Cmdlets Shell APIs WMI COM Language

Power. Shell Architecture User Experience Engine Managed Elements Cmdlets Shell APIs WMI COM Language Execution Context . NET XML ADO Debugger Object Mgr ADSI Native Commands

Power. Shell V 2 Themes Admin GUIs layer on top of Power. Shell CLI

Power. Shell V 2 Themes Admin GUIs layer on top of Power. Shell CLI & GUI Agility in delivering new GUIs Ensures automation GUI teaches command line Standardizes access to managed elements GUI over Power. Shell

GUI Over Power. Shell: Features User Experience Graphical Power. Shell Engine Cmdlets APIs Out-Gridview

GUI Over Power. Shell: Features User Experience Graphical Power. Shell Engine Cmdlets APIs Out-Gridview Language WMI COM New APIs Execution Context PSSession Pooling Debugger Managed Elements Object Mgr Thread Control . NET XML ADO ADSI Native Commands

demo GUI Over Power. Shell

demo GUI Over Power. Shell

Power. Shell V 2 Themes Scripts are Easy to use Safe to operate Easy

Power. Shell V 2 Themes Scripts are Easy to use Safe to operate Easy to share Easy to support Production Scripting

Production Scripting: Features User Experience Script Cmdlets Shell Engine APIs Debugger Enhancements Restricted Language

Production Scripting: Features User Experience Script Cmdlets Shell Engine APIs Debugger Enhancements Restricted Language Execution Context Debugger Managed Elements Cmdlets Script Cmdlets WMI COM Native Code. NET XML Modules ADO Object Mgr ADSI Transactions Native Commands

demo Production Scripting

demo Production Scripting

Power. Shell V 2 Themes Respond to community feedback Enhance the language Tweak the

Power. Shell V 2 Themes Respond to community feedback Enhance the language Tweak the engine Add and enhance Cmdlets Community Feedback

Community Feedback: Features User Experience Language Shell Enhancements Language Debugger Engine Managed Elements Cmdlets

Community Feedback: Features User Experience Language Shell Enhancements Language Debugger Engine Managed Elements Cmdlets APIs WMI COM Improved Execution Context Object Adapters WMI++ Object Mgr ADSI . NET XML ADO New Cmdlets Native Commands

partner Power. Shell. Community. org Hal Rottenberg Title Company

partner Power. Shell. Community. org Hal Rottenberg Title Company

Power. Shell. Community. org Forums Blogs Script Repository User Group Outreach

Power. Shell. Community. org Forums Blogs Script Repository User Group Outreach

Power. Scripting Podcast Hosts: Jonathan Walz & Hal Rottenberg Online at Power. Scripting. net

Power. Scripting Podcast Hosts: Jonathan Walz & Hal Rottenberg Online at Power. Scripting. net Weekly dose of News, Resources, Interviews, Tips and more!

Virtual User Group Marco Shaw runs a monthly user’s group meeting online using Microsoft

Virtual User Group Marco Shaw runs a monthly user’s group meeting online using Microsoft Live Meeting Interviews Q&A with experts Check news for upcoming events and Marco’s get-powershellblog (marcoshaw. blogspot. com)

Power. Shell Newsgroup Use NNTP server msnews. microsoft. com or web portal Group name:

Power. Shell Newsgroup Use NNTP server msnews. microsoft. com or web portal Group name: microsoft. public. windows. powershell

#powershell IRC Chat Room Freenode IRC network: irc. freenode. net Interactive Power. Shell help

#powershell IRC Chat Room Freenode IRC network: irc. freenode. net Interactive Power. Shell help from experts

Microsoft Resources Power. Shell Team Blog blogs. msdn. com/powershell Scripting Guys Script Center microsoft.

Microsoft Resources Power. Shell Team Blog blogs. msdn. com/powershell Scripting Guys Script Center microsoft. com/technet/scriptcenter Hub for official documentation Power. Shell Tip of the Week The Windows Power. Shell Toolbox Script repository and other goodies

Join the Community! Linked. In: Power. Shell Power Users Twitter: #powershell hashtag Facebook: Power.

Join the Community! Linked. In: Power. Shell Power Users Twitter: #powershell hashtag Facebook: Power. Scripting Podcast, Windows Powershell Users, The Scripting Guys

And You! We need your participation If you blog about Power. Shell, let us

And You! We need your participation If you blog about Power. Shell, let us know! Get on the forums, newsgroups and chat

Universal Automation Features User Experience Managed Elements Engine Remoting Shell Language Debugger APIs Cmdlets

Universal Automation Features User Experience Managed Elements Engine Remoting Shell Language Debugger APIs Cmdlets Background Jobs WMI Eventing Execution Context Restricted PSSessions Mobile Object Mgr Model COM. NET XML ADO ADSI Native Commands

New Cmdlets (So Far) Remoting: Invoke-Command New-PSSession Get-PSSession Push-PSSession Pop-PSSession Remove-PSSession Converting Types: Add-Type

New Cmdlets (So Far) Remoting: Invoke-Command New-PSSession Get-PSSession Push-PSSession Pop-PSSession Remove-PSSession Converting Types: Add-Type Convert. To-Csv Convert. From-Csv Convert. To-Xml Convert. From-String. Data Event Viewer and ETW Logs: Get-Event Script Internationalization: Import-Localized. Data Modules: Imort-Module Get-Module Remove-Module Export-Module. Member Transactions: Complete-Transaction Start-Transaction Undo-Transaction Debugging: Set-PSBreakpoint Get-PSBreakpoint Enable-PSBreakpoint Disable-PSBreakpoint Remove-PSBreakpoint Get-PSCall. Stack Eventing: Register-Object. Event Register-Event Wait-Event Remove-Event Unregister-Event Get-Event New-Event Get-Event. Subscriber Background Jobs: Start-Job Get-Job Stop-Job Receive-Job Wait-Job Remove-Job WMI: Register-WMIEvent Set-WMIInstance Invoke-WMIMethod Remove-WMIObject More Cmdlets: Clear-History Get-Random Out-Grid. View Set-Strict. Mode Update-List Wait-Process Computer Add-Computer Checkpoint-Computer Disable-Computer. Restore Enable-Computer. Restore Get-Computer. Restore. Point Remove-Computer Rename-Computer Reset-Computer. Machine. Password Restart-Computer Restore-Computer Stop-Computer Test-Computer. Secure. Channel

partner Hyper-V Automation with Compellent and Power. Shell 2. 0 Shane Anderson Compellent

partner Hyper-V Automation with Compellent and Power. Shell 2. 0 Shane Anderson Compellent

Automation Overview VM Data File Power. Shell 2. 0 Script C: Virtual. Machines Verify

Automation Overview VM Data File Power. Shell 2. 0 Script C: Virtual. Machines Verify Validate Prerequisites Start VM’s and Wait for Ready =. . Test. VM 30 Gold Image =. . Test. VM 49 Windows Server 2008 R 2 Hyper-V Host Create HTML Report

More Info Microsoft Alliance Page http: //www. compellent. com/microsoft Powershell Compellent Powershell site http:

More Info Microsoft Alliance Page http: //www. compellent. com/microsoft Powershell Compellent Powershell site http: //www. compellent. com/powershell Command Set White Paper http: //www. compellent. com/~/media/com/Files/White_Papers/CML_WPS_RR. ashx Windows Live Community Site http: //compellentpowershell. groups. live. com/ Powershell Community. org http: //www. powershellcommunity. org/ Powershell. com http: //www. powershell. com Microsoft and Compellent Joint Customer Webcast “Saving Money while Improving Service availability at Indiana University. ” http: //www. microsoft. com/virtualization

Summary The investments in Windows Server 2008 R 2 are a significant step towards

Summary The investments in Windows Server 2008 R 2 are a significant step towards increasing the manageability of the platform Expanded Power. Shell - available on server core Remote-able

question & answer

question & answer

Community Resources Newsgroup: Microsoft. Public. Windows. Power. Shell Team blog: http: //blogs. msdn. com/Power.

Community Resources Newsgroup: Microsoft. Public. Windows. Power. Shell Team blog: http: //blogs. msdn. com/Power. Shell/ Power. Shell. Community. Org: Channel 9 http: //www. Powershell. Community. Org http: //channel 9. msdn. com/tags/Power. Shell Wiki http: //channel 9. msdn. com/wiki/default. aspx/Channel 9. Windows. Power. Shell. Wiki Script Center: http: //www. microsoft. com/technet/scriptcenter/hubs/msh. mspx Code. Plex: http: //codeplex. com/Project. Directory. aspx? Tag. Name=powershell Many excellent books Manning Press book by Power. Shell Dev Lead Bruce Payette: Power. Shell in Action http: //manning. com/powershell/ O’Reilly book by Power. Shell Dev Lee Holmes – Windows Power. Shell Cookbook http: //www. oreilly. com/catalog/9780596528492/index. html

Resources www. microsoft. com/teched www. microsoft. com/learning Sessions On-Demand & Community Microsoft Certification &

Resources www. microsoft. com/teched www. microsoft. com/learning Sessions On-Demand & Community Microsoft Certification & Training Resources http: //microsoft. com/technet http: //microsoft. com/msdn Resources for IT Professionals Resources for Developers www. microsoft. com/learning Microsoft Certification and Training Resources

Related Content WSV 402 Advanced Windows Power. Shell Scripting DAT 314 Manageability Series: Microsoft

Related Content WSV 402 Advanced Windows Power. Shell Scripting DAT 314 Manageability Series: Microsoft SQL Server Automation on Steroids, Including Power. Shell Support SIA 313 Managing Active Directory Identities with Active Directory Power. Shell WSV 325 Windows Power. Shell: Tips from the Expert WCL 314 Windows Power. Shell for the Windows 7 Enterprise Client WSV 08 -HOL Introduction to Windows Power. Shell Fundamentals WSV 19 -HOL Windows Server 2008 R 2: Server Management and Power. Shell V 2 WSV 02 -HOL Administering Internet Information Services (IIS) 7. 0 by Using Windows Power. Shell

Complete an evaluation on Comm. Net and enter to win!

Complete an evaluation on Comm. Net and enter to win!

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U. S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. 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 provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.