Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Automation Using Windows PowerShell 2.0

Similar presentations


Presentation on theme: "Advanced Automation Using Windows PowerShell 2.0"— Presentation transcript:

1 Advanced Automation Using Windows PowerShell 2.0
4/27/2018 6:30 PM WSV406 Advanced Automation Using Windows PowerShell 2.0 Jeffrey Snover Distinguished Engineer Microsoft Dan Harman Senior Program Manager Microsoft © 2007 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.

2 Session Overview Technical Level: 400
Intended Audience: IT administrators and scripters Learning Objectives: Learn about improvements to Windows PowerShell 2.0 Understand how to use advanced scripting techniques See how PowerShell features work in common scenarios Presentation Outline: Overview of new PowerShell 2.0 features Advanced scripting techniques in depth GUI over PowerShell demo Production scripting demo Universal automation environment demo

3 Improvements in PowerShell 2.0 Dozens of big features
Remoting Modules PowerShell ISE Eventing Advanced Functions Session Pools Background Jobs Language Enhancements Restricted Sessions WMI Improvements Transactions Improved AD Adapter Out-GridView Performance Improvements Script Debugging Script Internationalization New & Improved Cmdlets Parser API Support Hosting APIs More…

4 PowerShell Architecture
4/27/2018 6:30 PM PowerShell Architecture User Experience Shell Language Debugger Engine APIs Execution Context Object Manager Managed Elements Cmdlets WMI COM .NET XML ADO ADSI Native Commands © 2007 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.

5 PowerShell 2.0 Themes GUI over PowerShell Production Scripting
Universal Automation Environment Language and Cmdlets

6 GUI Over PowerShell GUI over PowerShell
Layering admin GUIs on top of PowerShell Drives consistency between CLI & GUI Enables agility in delivering new GUIs Guarantees automation of GUI commands Facilitates GUI teaching command line Standardizes access to managed elements GUI over PowerShell

7 GUI Over PowerShell Features
4/27/2018 6:30 PM GUI Over PowerShell Features User Experience Shell Language Debugger Engine APIs Execution Context Object Manager Managed Elements Cmdlets WMI COM .NET XML ADO ADSI Native Commands PowerShell ISE Out-GridView Hosting APIs Session Pooling Thread Control © 2007 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.

8 Dan Harman Senior Program Manager Windows PowerShell
4/27/2018 6:30 PM GUI Over PowerShell Dan Harman Senior Program Manager Windows PowerShell demo © 2007 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.

9 Production Scripting Production Scripting Scripts are: Easy to use
Easy to share Easy to support Safe to operate Production Scripting

10 Production Scripting Features
4/27/2018 6:30 PM Production Scripting Features User Experience Shell Language Debugger Engine APIs Execution Context Object Manager Managed Elements Cmdlets WMI COM .NET XML ADO ADSI Native Commands Advanced Functions Advanced Functions Debugger Enhancements Native Code Restricted Language Modules Transactions © 2007 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.

11 Advanced Functions Gives the power of authoring custom cmdlets to IT pros Write PowerShell cmdlets using script instead of compiled code Enables consistent syntax and semantics between functions & cmdlets Evolution of function syntax from PowerShell 1.0 Near parity with .NET cmdlet capabilities Cmdlet attributes -SupportsShouldProcess -ConfirmImpact { Low | Medium | High } $PSCmdlet similar to 'this' in C# $PSCmdlet.ShouldProcess("Target", "Action") $PSCmdlet.ShouldContinue("Query", "Caption") Support inline help or external PSMAML help Parameter attributes Range Length Not Null Not Null or Empty Pattern Set Count Script

12 Production Scripting Advanced Functions
4/27/2018 6:30 PM Production Scripting Advanced Functions Jeffrey Snover Distinguished Engineer Windows PowerShell demo © 2007 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.

13 Production Scripting Modules
4/27/2018 6:30 PM Production Scripting Modules Dan Harman Senior Program Manager Windows PowerShell demo © 2007 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.

14 Universal Automation Environment
Interactive or programmatic In the foreground or background Local or remote Single machine or multiple machines Synchronous or asynchronous In restricted or unrestricted environments Wide range of authentication mechanisms Simple scripting to systems programming Universal Automation Environment

15 Automation Environment Features
4/27/2018 6:30 PM Automation Environment Features User Experience Shell Language Debugger Engine APIs Execution Context Object Manager Managed Elements Cmdlets WMI COM .NET XML ADO ADSI Native Commands Remoting Background Jobs Eventing Restricted Sessions Mobile Object Model © 2007 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.

16 Remoting Scenarios 1:Many (fan-out): Large Scale Automation
Send the script to remote machines Select properties - allows client to specify which properties to return Throttling - limits the number of concurrent operations Job support - runs commands in the background on client 1:1 (interactive): Secure Telnet Replacement Cmdlet equivalent of Remote Desktop Interact with a remote machine as if it were local No Invoke-Command required Ideal for troubleshooting a remote machine Many:1 (fan-in): Delegated Administration & Hosting Hosting model for web services No tools installation required on client Constrained session environment (cmdlets, parameters, language)

17 Universal Automation Environment Remoting
4/27/2018 6:30 PM Universal Automation Environment Remoting Jeffrey Snover Distinguished Engineer Windows PowerShell demo © 2007 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.

18 Universal Automation Environment Background Jobs
4/27/2018 6:30 PM Universal Automation Environment Background Jobs Dan Harman Senior Program Manager Windows PowerShell demo © 2007 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.

19 Language and Cmdlets Language and Cmdlets
Responding to community feedback Enhance the language Improve the engine Provide more built-in cmdlets Language and Cmdlets

20 Language and Cmdlets User Experience Engine Managed Elements
4/27/2018 6:30 PM Language and Cmdlets User Experience Shell Language Debugger Engine APIs Execution Context Object Manager Managed Elements Cmdlets WMI COM .NET XML ADO ADSI Native Commands New Cmdlets WMI++ Language Enhancements Improved Object Adapters © 2007 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.

21 Over 100 New Built-In Cmdlets Hundreds more from partners
Remoting Disable-PSSessionConfiguration Enable-PSSessionConfiguration Enable-PSRemoting Enter-PSSession Exit-PSSession Export-PSSession Get-PSSession Get-PSSessionConfiguration Import-PSSession Invoke-Command New-PSSession New-PSSessionOption New-WebServiceProxy Register-PSSessionConfiguration Remove-PSSession Set-PSSessionConfiguration Custom Sessions Unregister-PSSessionConfiguration Background Jobs Get-Job Receive-Job Remove-Job Start-Job Stop-Job Wait-Job Modules Export-ModuleMember Get-Module Import-Module New-Module New-ModuleManifest Remove-Module Test-ModuleManifest Eventing Get-Event Get-EventSubscriber New-Event Register-EngineEvent Register-ObjectEvent Remove-Event Unregister-Event Wait-Event WS-Man Connect-WSMan Disable-WSManCredSSP Disconnect-WSMan Enable-WSManCredSSP Get-WSManCredSSP Get-WSManInstance Invoke-WSManAction New-WSManInstance New-WSManSessionOption Remove-WSManInstance Set-WSManInstance Set-WSManQuickConfig Test-WSMan Transactions Complete-Transaction Get-Transaction Start-Transaction Undo-Transaction Use-Transaction Debugging Disable-PSBreakpoint Enable-PSBreakpoint Get-PSBreakpoint Get-PSCallStack Remove-PSBreakpoint Set-PSBreakpoint Type Conversion Add-Type ConvertFrom-Csv ConvertFrom-StringData ConvertTo-Csv ConvertTo-Xml Diagnostics Clear-EventLog Export-Counter Get-Counter Get-Hotfix Get-WinEvent Import-Counter Limit-EventLog New-EventLog Remove-EventLog Show-EventLog Write-EventLog Computers Add-Computer Checkpoint-Computer Disable-ComputerRestore Enable-ComputerRestore Get-ComputerRestorePoint Remove-Computer Reset-ComputerPassword Restart-Computer Restore-Computer Stop-Computer Test-Connection WMI Invoke-WMIMethod Register-WMIEvent Remove-WMIObject Set-WMIInstance Other Clear-History Debug-Process Export-FormatData Get-FormatData Get-Random Import-LocalizedData Out-GridView Select-Xml Send-MailMessage Set-StrictMode Start-Process Test-ComputerSecureChannel Update-List Wait-Process

22 16 New Partners in Windows 7 & WS08 R2 Many active internal partners
Exchange Server • Windows Diagnostics • Server Manager • SQL Server • Active Directory • Failover Clustering • System Center Operations Manager • Windows Backup • Server Migration • System Center Virtual Machine Manager • Best Practices Analyzer • Active Directory Rights Management Services • Internet Information Services • Background Intelligent Transfer Service • System Center Data Protection Manager • Network Load Balancing • Remote Desktop Services • Group Policy • WS-Management • AppLocker • WMI

23 Windows PowerShell Community Resources
4/27/2018 6:30 PM Windows PowerShell Community Resources Team blog: PowerShell Community: PowerShell Forum: Channel 9: Wiki: Script Center: CodePlex: Some good books PowerShell in Action, 2nd Edition by Bruce Payette Windows PowerShell Cookbook, 2nd Edition by Lee Holmes Professional Windows PowerShell Programming html PowerShell Comics! powershell-comic-book-first-pages.aspx © 2007 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.

24 Related Content Breakout Sessions Hands-on Labs Product Demo Stations
Tech Ed North America 2010 4/27/2018 6:30 PM Related Content Breakout Sessions WSV406 | Advanced Automation Using Windows PowerShell 2.0 WSV315 Windows PowerShell for Beginners WCL321 | Windows PowerShell Remoting: Definitely NOT Just for Servers WSV322 | Managing the Registry with Windows PowerShell 2.0 WSV471-INT | Build Reusable Tools in Windows PowerShell WSV473-INT | Windows PowerShell 3.0: Why Wait? Get Next-Generation PowerShell… EXL321 | Microsoft Lync Server 2010: Administering Lync Server Deployment Hands-on Labs WSV276-HOL Introduction to Windows PowerShell Fundamentals WSV371-HOL Advanced Windows PowerShell Scripting WSV378-HOL Server Management and Windows PowerShell V2 Product Demo Stations WSV 1 – Windows PowerShell and Server Management © 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.

25 Tech Ed North America 2010 4/27/2018 6:30 PM Track Resources Don’t forget to visit the Cloud Power area within the TLC (Blue Section) to see product demos and speak with experts about the Server & Cloud Platform solutions that help drive your business forward. You can also find the latest information about our products at the following links: Cloud Power - Private Cloud - Windows Server - Windows Azure - Microsoft System Center - Microsoft Forefront - © 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.

26 Resources Learning http://northamerica.msteched.com
Tech Ed North America 2010 4/27/2018 6:30 PM Resources Connect. Share. Discuss. Learning Sessions On-Demand & Community Microsoft Certification & Training Resources Resources for IT Professionals Resources for Developers © 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.

27 Complete an evaluation on CommNet and enter to win!
Tech Ed North America 2010 4/27/2018 6:30 PM Complete an evaluation on CommNet and enter to win! © 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.

28 Tech Ed North America 2010 4/27/2018 6:30 PM
© 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.

29 4/27/2018 6:30 PM © 2011 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. © 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.

30


Download ppt "Advanced Automation Using Windows PowerShell 2.0"

Similar presentations


Ads by Google