27

Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

Embed Size (px)

Citation preview

Page 1: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02
Page 2: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

What's Coming In PowerShell V2Jeffrey Snover Partner ArchitectBruce Payette Principal DeveloperDan Harman Program Manager

MSD Solutions and PlatformsMicrosoft Corporation

SE02

Page 3: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

SE01 – Introduction to PowerShellWhat: Overview of basic featuresWho: Beginners or no prior experienceWhen: Wednesday, 11:45am – 1:00pmLevel: 200

SE02 – What’s Coming in PowerShell V2?What: Overview of features in PowerShell 2.0Who: Intermediate and advanced usersWhen: Wednesday, 4:00pm – 5:15pmLevel: 300

SE03 – PowerShell Scripting for WizardsWhat: Programming features & advanced scriptingWho: Advanced and expert usersWhen: Friday, 10:00am – 11:15amLevel: 400

SE02 – What’s Coming in PowerShell V2What: Overview of features in PowerShell 2.0Who: Intermediate and advanced usersWhen: Wednesday, 4:00pm – 5:15pmLevel: 300

PowerShell Sessions

Page 4: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

State Of The SoftwarePhenomenal rate of adoption

Over 2 million downloads in less than 18 months

Windows XP, Windows Vista, Windows Server 2003 and 2008

Adopted by Exchange, SQL, SCOM, SCVMM, and SCDPM

CEC 2009 requirement

Dozens of 3rd party tools, ISVs, and partners

Strong community engagement, 27 PowerShell MVPs

Nov-06

Jan-07M

ar-07M

ay-07Jul-07Sep-07Nov-07

Jan-08M

ar-08

0

500000

1000000

1500000

2000000

2500000

PowerShell Downloads

Shipped withWindows Server 2008

Page 5: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

Tower Of PowerPowerShell books

2007 2008

Now available inJapaneseGermanFrenchMore…

Page 7: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

PowerShell Architecture

User Experience

Shell

Language

Debugger

Engine

APIs

Execution Context

Object Mgr

Managed Elements

Cmdlets

WMI

COM

.NET

XML

ADO

ADSI

Native Commands

Page 8: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

PowerShell V2 Themes

GUI over PowerShell

Production Scripting

Universal Code Execution Model

Community Feedback

Page 9: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

PowerShell V2 Themes

Admin GUIs layer on top of PowerShellCLI & GUIAgility in delivering new GUIsEnsures automationGUI teaches command lineStandardizes access to managed elements

GUI over PowerShell

Page 10: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

User Experience

Shell

Language

Debugger

Engine

APIs

Execution Context

Object Mgr

Managed Elements

Cmdlets

WMI

COM

.NET

XML

ADO

ADSI

Native Commands

GUI Over PS: Features

Graphical PowerShell

Out-Gridview

New APIs

Runspace PoolingThread Control

Page 11: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

GUI Over PowerShellDan HarmanProgram ManagerMSD Solutions and Platforms

D E M O

Page 12: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

PowerShell V2 Themes

Scripts are Easy to useSafe to operateEasy to shareEasy to support

Production Scripting

Page 13: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

User Experience

Shell

Language

Debugger

Engine

APIs

Execution Context

Object Mgr

Managed Elements

Cmdlets

WMI

COM

.NET

XML

ADO

ADSI

Native Commands

Production Scripting: Features

Script Cmdlets

Data Language

Modules

Debugger Enhancements

Transactions

Script Cmdlets

Native Code

Page 14: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

Production ScriptingBruce PayettePrincipal Developer MSD Solutions and Platforms

D E M O

Page 15: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

PowerShell V2 Themes

Expressions, Commands, and ScriptBlocks can run

In the foreground or background On one or more machinesOver a LAN or a WANIn restricted or unrestricted environmentsUsing short or long connectionsUsing impersonation or supplied credentialsInitiated by user input or by events

Universal Code Execution Model

Page 16: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

User Experience

Shell

Language

Debugger

Engine

APIs

Execution Context

Object Mgr

Managed Elements

Cmdlets

WMI

COM

.NET

XML

ADO

ADSI

Native Commands

UCCE Features

Remoting

Background Jobs

Eventing

Restricted Runspaces

Mobile Object Model

Page 17: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

Mobile Objects Model

Islands of optimization in a sea of interoperability

Whenever possible, use live .NET objectsUse typed property bags everywhere else

Live objects get serialized at runspace borders

Typed property bags using 22+ core datatypesEverything else is converted using ToString()Process can be tweaked with typeXML entries

Automatically deserialized into typed property bags on receipt

Type: Deserialized.OriginalTypeComputerName

Page 18: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

Universal Code ExecutionJeffrey SnoverPartner ArchitectMSD Solutions and Platforms

D E M O

Page 19: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

PowerShell V2 Themes

Respond to community feedbackEnhance the languageTweak the engineAdd and enhance Cmdlets

Community Feedback

Page 20: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

User Experience

Shell

Language

Debugger

Engine

APIs

Execution Context

Object Mgr

Managed Elements

Cmdlets

WMI

COM

.NET

XML

ADO

ADSI

Native Commands

Community Feedback: Features

Language Enhancement

s

ImprovedObject

Adapters

New Cmdlets

WMI++

Page 21: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

New Cmdlets (So Far)Remoting:

Invoke-CommandNew-RunspaceGet-RunspacePush-RunspacePop-RunspaceRemove-Runspace

Converting Types:Add-TypeConvertTo-CsvConvertFrom-CsvConvertTo-XmlConvertFrom-StringData

Event Viewer and ETW Logs:

Get-Event 

Script Internationalization:

Import-LocalizedData

Modules:Add-ModuleGet-ModuleRemove-ModuleExport-ModuleMember

Debugging:Set-PSBreakpointGet-PSBreakpointEnable-PSBreakpointDisable-PSBreakpointRemove-PSBreakpointGet-PSCallStack 

Eventing:Register-ObjectEventRegister-PSEventWait-PSEvent Remove-PSEventUnregister-PSEvent Get-PSEventNew-PSEventGet-PSEventSubscriber

Background Jobs:Start-PSJobGet-PsJobStop-PSJobReceive-PSJobWait-PSJob Remove-PSJob

Transactions:Complete-PSTransactionStart-PSTransactionUndo-PSTransactionUse-PSTransaction

WMI:Register-WMIEvent Set-WMIInstanceInvoke-WMIMethodRemove-WMIObject

More Cmdlets:Clear-HistoryGet-RandomOut-GridViewSet-StrictModeUpdate-ListWait-Process

Page 22: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

WMI+++

CmdletsGet-WmiObject, Remove-WmiObjectSet-WMIInstanceInvoke-WmiMethodRegister-WMIEvent

New parameters -Impersonation, -Authentication, -Locale, -EnableAllPrivileges, -Amended, -DirectRead, -Authority -AsJob and -ThrottleLimit (!)

Connection settings stay with the object [bug fix]

Page 23: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

Community FeedbackJeffrey SnoverBruce PayetteDan HarmanMSD Solutions and Platforms

D E M O

Page 24: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

Community Resources

Newsgroup: Microsoft.Public.Windows.PowerShellTeam blog: http://blogs.msdn.com/PowerShellPowerShell Community: http://www.powershellcommunity.orgChannel 9: http://channel9.msdn.com/tags/PowerShellWiki: http://channel9.msdn.com/wiki/default.aspx/Channel9.WindowsPowerShellWikiScript Center: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspxCodePlex: http://codeplex.com/Project/ProjectDirectory.aspx?TagName=powershellBooks

PowerShell in Action by Bruce Payettehttp://manning.com/powershell Windows PowerShell Cookbook by Lee Holmes http://www.oreilly.com/catalog/9780596528492/index.htmlProfessional Windows PowerShell Programming http://www.wrox.com/WileyCDA/WroxTitle/productCd-0470173939.htmlMany others…

Page 25: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

Q & A

Page 26: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

Be eligible to win fun daily prizes – t-shirts, USB drives, and more!

Please Complete An Evaluation FormYour input is important!

Two ways to access online evaluation forms

CommNet and evaluation stations located in hallways outside breakout roomsFrom any wired or wireless connection to http://mms-2008.com

Page 27: Jeffrey SnoverPartner Architect Bruce PayettePrincipal Developer Dan HarmanProgram Manager MSD Solutions and Platforms Microsoft Corporation SE02

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.