“click and run ” “click once repeat often” admins service operations “ install and...

18
Building Your Administration GUI over Windows PowerShell Kenneth Hansen, Program Manager Narayanan Lakshmanan, Developer Microsoft Corporation SVR12

Upload: vanessa-bishop

Post on 14-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

Building Your Administration GUI over Windows PowerShellKenneth Hansen, Program ManagerNarayanan Lakshmanan, DeveloperMicrosoft Corporation

SVR12

Page 2: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

Management Landscape

Key considerations:> Easy to use AND Flexible> Consistent and discoverable> Fast and responsive

“Click and Run”

“Click once

repeat often”

Admins

Service Operation

s

“Install and

forget”Engineeri

ng Support

Key considerations:• Deterministic, fool

proof • Repeatable• Scalable

Exte

rnal

Customers

Inte

rnal

Customers

Service Partners

Population size

Frequency of use

Create custom automation across islands of technology

Support GUI and Command Line

Page 3: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

PowerShell Enables GUI/CommandLineConsistent Commands

> Verb-Noun syntax> Standard set of verbs

Adaptive Type System> default display property set> custom properties/methods> csv, xml, ado, etc

Customization> Script Cmdlets – provide right abstractions to

admins/users> Customized Runspaces

Fluent .Net API> Follows ADO.Net Model> Data binding> State persisted and stateless executions

Built-in Remoting

Page 4: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

GUI over PowerShell Design Principles

Separation of business and presentation logic is key

> Enables “skinning” the same operations through many tools > Otherwise much time can be spent building one-off solutions > Enables partitioning of engineering work

Large surface area should not mean exposing everything to everyone

> Some customers may never need to or should never see <feature x>

> Even within the same customer, there are multiple personas (AD vs. Exchange admin)

> Different personas have different scopes of responsibility

Don’t expect users to figure it all out the first time or ever

> Make it simple> Make it consistent > Make it flexible > Err on the side of frequent failures, and then auto or easy

recovery 4

Page 5: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

Management Stack

Web Client

Integrated management service

Rich client

External customers

IIS Host Process

WinRM Plugin

Authorization

AD

Element

Mailbox

Authentication

PowerShell server runtime

Custom Endpoint

Internal Customers

Automated management

Store

InteractiveCmdline

Partner Applications

Managed Elements

PowerShell client runtime WinRM Client

Windows Auth

CSV files to define roles

Customized using scripts & ACLs

WPF application

Interactive Cmdline

CSV files for UIcontrol mapping

Impersonation

Page 6: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

A Very Simple GUI

Narayanan LakshmananDeveloperWindows Management

demo

Page 7: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

What did we leverage?

> Command Consistency and Discovery> Verb-Noun

> Script Cmdlets> Easily construct composite commands

> Adaptive Type System> Default Display Property Set

> Simple PowerShell hosting API> Easy Data Binding

Page 8: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

Remote UI, Focused actions and Script display

Narayanan LakshmananDeveloperWindows Management

demo

Page 9: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

What did we leverage?

> Built-in Remoting> Adaptive Type System

> custom properties/methods> csv, xml, ado, etc

> Stateless execution (runspace pool)> PowerShell API (Script Display)

Page 10: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

Delegation and Customized UI

Narayanan LakshmananDeveloperWindows Management

demo

Page 11: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

PowerShell Delegated AdministrationRemoting execution connects to an endpoint

> PS> New-PSSession –ConfigurationName Inventory

Register endpoints with a Name, ACL, StartupScript

StartupScript can configure> LanguageMode: Full, Restricted, None> Commands available

Delegate by…> Registering Endpoints with different capabilities> Scripting different capabilities based upon incoming

request

Page 12: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

PowerShell Enables GUI/CommandLineConsistent Commands

> Verb-Noun syntax> Standard set of verbs

Adaptive Type System> default display property set> custom properties/methods> csv, xml, ado, etc

Customization> Script Cmdlets – provide right abstractions to

admins/users> Customized Runspaces

Fluent .Net API> ADO.Net Model> Data binding> State persisted and stateless executions

Built-in Remoting

Page 13: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

Management Landscape

Key considerations:> Easy to use AND Flexible> Consistent and discoverable> Fast and responsive

“Click and Run”

“Click once

repeat often”

Admins

Service Operation

s

“Install and

forget”Engineeri

ng Support

Key considerations:• Deterministic, fool

proof • Repeatable• Scalable

Exte

rnal

Customers

Inte

rnal

Customers

Service Partners

Population size

Frequency of use

Create tailored automation across islands of technology

Support GUI and Command Line

Page 14: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

Q & A

Page 15: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

YOUR FEEDBACK IS IMPORTANT TO US!

Please fill out session evaluation

forms online atMicrosoftPDC.com

Page 16: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

Learn More On Channel 9

> Expand your PDC experience through Channel 9

> Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses

channel9.msdn.com/learnBuilt by Developers for Developers….

Page 17: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool

© 2009 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.

Page 18: “Click and Run ” “Click once repeat often” Admins Service Operations “ Install and forget” Engineering Support Key considerations: Deterministic, fool