Download presentation
Presentation is loading. Please wait.
1
Microsoft Virtual Academy
12/4/2018 Microsoft Virtual Academy Free, online, technical courses Take a free online course. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
2
Windows Server Management Marketing
12/4/2018 Introduction to PowerShell Workflow Joe Levy, Program Manager Symon Perriman, Senior Technical Evangelist Cloud & Enterprise Microsoft © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
3
Windows Server Management Marketing
12/4/2018 Meet the Speakers © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
4
Joe Levy Program Manager Cloud & Enterprise, Microsoft @Jodoglevy
Build 2012 12/4/2018 Joe Levy Program Manager Cloud & Enterprise, Joe Levy is a Program Manager on the Automation and Integration team of Microsoft’s Cloud and Enterprise division. He has expertise in PowerShell, PowerShell Workflow, System Center, Windows Azure, and Windows Azure Pack. He is a graduate of Duke University, with a degree in Computer Science. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
5
Agenda Introduction to PowerShell Workflow
Build 2012 12/4/2018 Agenda Introduction to PowerShell Workflow Benefits of PowerShell Workflow PowerShell vs. PowerShell Workflow Best Practices PowerShell Workflow with SMA © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
6
Introduction to PowerShell Workflow
Windows Server Management Marketing 12/4/2018 Introduction to PowerShell Workflow © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
7
Windows Workflow Foundation
PowerShell Workflow Windows Workflow Foundation PowerShell PowerShell Workflow
8
Windows Workflow Foundation
For defining and executing long-running processes Main benefits: Cross-host execution Ability to run sections in parallel or serially Interruptible, suspendable, resumeable execution Written in XAML
9
PowerShell For managing local and remote hosts and systems
Main benefits: Easy to use scripting language Extensible Lots of 1st party and 3rd party modules / script content Lively community
10
Windows Workflow Foundation
PowerShell Workflow – Best of Both Worlds Windows Workflow Foundation PowerShell PowerShell Workflow
11
PowerShell Workflow – Best of Both Worlds
For defining and executing long-running processes – using PowerShell! Write using familiar PowerShell syntax, compile into Windows Workflow Leverage PowerShell modules, scripts Cross-host execution / management Ability to run sections in parallel or serially Interruptible, suspendable, resumeable execution
12
Benefits of PowerShell Workflow
Windows Server Management Marketing 12/4/2018 Benefits of PowerShell Workflow © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
13
PowerShell Workflow Need a way to define and execute long-running processes that span many hosts / systems Need robust, reliable, fault-tolerant execution Need to parallelize Need to be able to integrate into many tools / systems / services Need an easy authoring language
14
PowerShell vs PowerShell Workflow
Windows Server Management Marketing 12/4/2018 PowerShell vs PowerShell Workflow © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
15
Only in PowerShell Workflow
Parallel Foreach –Parallel Sequence InlineScript Checkpoint-Workflow Suspend-Workflow
16
Only in PowerShell Add-History Invoke-History Add-PSSnapin New-Alias
Clear-History New-Variable Clear-Variable Out-GridView Complete-Transaction Remove-PSBreakpoint Debug-Process Remove-PSSnapin Disable-PSBreakpoint Remove-Variable Enable-PSBreakpoint Set-Alias Enter-PSSession Set-PSBreakpoint Exit-PSSession Set-PSDebug Export-Alias Set-StrictMode Export-Console Set-TraceMode Get-Alias Set-Variable Get-History Start-Transaction Get-PSBreakpoint Start-Transcript Get-PSCallStack Stop-Transcript Get-PSSnapin Trace-Command Get-Transaction Undo-Transaction Get-Variable Use-Transaction Import-Alias Write-Host, Read-Host, Import-Module
17
Windows Server Management Marketing
12/4/2018 Best Practices © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
18
Common PowerShell Workflow Best Practices
Cannot use positional parameters PowerShell PowerShell Workflow workflow foo { $numbers 2, 3) $numbers | Where-Object { $_ -eq 1 } } $numbers 2, 3) $numbers | Where-Object { $_ -eq 1 } Where-Object : Parameter set cannot be resolved using the specified named parameters. + CategoryInfo : InvalidArgument: (:) [Where-Object], ParentContainsErrorRecordException + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.PowerShell.Commands.WhereObjectCommand + PSComputerName : [localhost] 1
19
Common PowerShell Workflow Best Practices
Cannot use positional parameters PowerShell Workflow workflow foo { $numbers 2, 3) $numbers | Where-Object -FilterScript { $_ -eq 1 } } 1
20
Common PowerShell Workflow Best Practices
Cannot call methods PowerShell PowerShell Workflow $date = Get-Date $date.AddDays(1) workflow bar { $date = Get-Date $date.AddDays(1) } Friday, September 12, :52:30 PM At line:3 char:5 + $date.AddDays(1) + ~~~~~~~~~~~~~~~~ Method invocation is not supported in a Windows PowerShell Workflow. To use .NET scripting, place your commands in an inline script: InlineScript { <commands> }. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : MethodInvocationNotSupported
21
Common PowerShell Workflow Best Practices
Cannot call methods PowerShell Workflow workflow bar { InlineScript { $date = Get-Date $date.AddDays(1) } Friday, September 12, :52:30 PM
22
Common PowerShell Workflow Best Practices
Objects are deserialized PowerShell PowerShell Workflow $vm = New-AzureVMConfig ` -Name "asdassa" ` -InstanceSize Medium ` -ImageName "asd" ` -MediaLocation " ` -AvailabilitySetName "dsffdfd" ` -DiskLabel "OS" Add-AzureProvisioningConfig ` -WindowsDomain ` -AdminUserName "sdf" ` -Password "sdffd" ` -DisableAutomaticUpdates ` -Domain "sdfsfd" ` -JoinDomain "sdsfd" ` -DomainUserName "sdfdsfd" ` -DomainPassword "sdfddf“ ` -VM $vm workflow foobar { $vm = New-AzureVMConfig ` -Name "asdassa" ` -InstanceSize Medium ` -ImageName "asd" ` -MediaLocation " ` -AvailabilitySetName "dsffdfd" ` -DiskLabel "OS" Add-AzureProvisioningConfig ` -WindowsDomain ` -AdminUserName "sdf" ` -Password "sdffd" ` -DisableAutomaticUpdates ` -Domain "sdfsfd" ` -JoinDomain "sdsfd" ` -DomainUserName "sdfdsfd" ` -DomainPassword "sdfddf" ` -VM $vm } Cannot bind parameter 'VM'. Cannot convert the "Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM" value of type "Deserialized.Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM" to type "Microsoft.WindowsAzure.Commands.ServiceManagement.Model.IPersistentVM". + CategoryInfo : InvalidArgument: (:) [Add-AzureProvisioningConfig], ParameterBindingException + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.AddAzureProvisioningConfigCommand + PSComputerName : [localhost]
23
Common PowerShell Workflow Best Practices
Objects are deserialized PowerShell Workflow workflow foobar { InlineScript { $vm = New-AzureVMConfig ` -Name "asdassa" ` -InstanceSize Medium ` -ImageName "asd" ` -MediaLocation " ` -AvailabilitySetName "dsffdfd" ` -DiskLabel "OS" Add-AzureProvisioningConfig ` -WindowsDomain ` -AdminUserName "sdf" ` -Password "sdffd" ` -DisableAutomaticUpdates ` -Domain "sdfsfd" ` -JoinDomain "sdsfd" ` -DomainUserName "sdfdsfd" ` -DomainPassword "sdfddf" ` -VM $vm }
24
PowerShell Workflow with Service Management Automation
Windows Server Management Marketing 12/4/2018 PowerShell Workflow with Service Management Automation © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
25
Built on PowerShell Workflow
12/4/2018 Built on PowerShell Workflow PowerShell Workflow Use Windows PowerShell syntax Multi-device management Running a single task to manage complex, end-to-end processes Automated failure recovery Connection and activity retries Centralized Store Credentials / certificates Global variable Global connection for runbooks Modules Runbooks (draft / published versioning) Scheduling Highly Available Runbook servers to process jobs Odata Web service to submit / retrieve status SQL Server clustering / always on Historical Analysis Historical view of runbook jobs Reporting through Excel PowerPivot for ROI View runbook used for all jobs PowerShell Workflow Centralized store Service Management Automation Highly Available Historical Analysis © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
26
Tech Ready 15 12/4/2018 Summary PowerShell Workflow is useful for executing long-running processes reliably, using PowerShell syntax PowerShell Workflow is the underlying engine for SMA runbooks © 2012 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.
27
TechNet Virtual Labs Deep technical content and free product evaluations Hands-on deep technical labs Free, online, technical courses At the TechNet Evaluation Center you can download free, trial versions of Microsoft software, with no feature limits. Dozens of trials are available – all at no cost. Try Windows Server 2012 R2 for up to 180 days. Download the Windows 8.1 Enterprise 90-day evaluation. Or try Microsoft Azure at no-cost for up to 90 days. Microsoft Hands On Labs offer virtual environments that will take you through guided, technically deep product learning experience. Learn at your own pace in labs that you can complete in 90 minutes or less. There is no complex setup or installation is required to use TechNet Virtual Labs. Microsoft Virtual Academy provides free online training on the IT scenarios that are important to your company and your career. Learn at your own pace and boost your IT skills with over 100 courses across more than 15 Microsoft technologies including Windows Server, Windows 8, Microsoft Azure, Office 365, virtualization, Windows Phone, and more. Download Microsoft software trials today. Find Hand On Labs. Take a free online course. Technet.microsoft.com/evalcenter Technet.microsoft.com/virtuallabs microsoftvirtualacademy.com
28
12/4/ :25 PM © 2014 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. © 2010 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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.