Advanced Windows Power Shell Scripting
Advanced Windows Power Shell Scripting
PowerShell Architecture
User Experience
Shell
Engine
APIs
Managed Elements
Cmdlets WMI COM
Language
Execution Context
Debugger
Object Manager
Production Scripting
Scripts are:
Easy to use Easy to share Easy to support Safe to operate
Production Scripting
Engine
APIs
Managed Elements
Cmdlets Advanced Functions WMI
Debugger Enhancements
Language Execution Restricted Language Context
Modules
Debugger Object Manager
Transactions
Production Scripting
Dan Harman Program Manager Windows PowerShell
Universal Automation
Engine
APIs
Managed Elements
Remoting
Cmdlets WMI COM .NET XML ADO ADSI Native Commands
Background Jobs
Language Execution Context Eventing
Restricted Sessions
Debugger Object Manager
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
Engine
APIs
Managed Elements
Cmdlets WMI COM
Out-GridView
Language Execution Context Hosting APIs
Session Pooling
Debugger Object Manager
Thread Control
Engine
APIs
Managed Elements
Cmdlets New Cmdlets WMI
Modules
Export-ModuleMember Get-Module Import-Module New-Module New-ModuleManifest Remove-Module Test-ModuleManifest
Transactions
Complete-Transaction Get-Transaction Start-Transaction Undo-Transaction Use-Transaction
Computers
Add-Computer Checkpoint-Computer Disable-ComputerRestore Enable-ComputerRestore Get-ComputerRestorePoint Remove-Computer Reset-ComputerPassword Restart-Computer Restore-Computer Stop-Computer Test-Connection
Debugging
Disable-PSBreakpoint Enable-PSBreakpoint Get-PSBreakpoint Get-PSCallStack Remove-PSBreakpoint Set-PSBreakpoint
Eventing
Get-Event Get-EventSubscriber New-Event Register-EngineEvent Register-ObjectEvent Remove-Event Unregister-Event Wait-Event
WMI
Invoke-WMIMethod Register-WMIEvent Remove-WMIObject Set-WMIInstance
Type Conversion
Add-Type ConvertFrom-Csv ConvertFrom-StringData ConvertTo-Csv ConvertTo-Xml
Custom Sessions
Disable-PSSessionConfiguration Enable-PSSessionConfiguration Get-PSSessionConfiguration New-PSSessionOption Register-PSSessionConfiguration Set-PSSessionConfiguration Unregister-PSSessionConfiguration
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
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
Diagnostics
Clear-EventLog Export-Counter Get-Counter Get-Hotfix Get-WinEvent Import-Counter Limit-EventLog New-EventLog Remove-EventLog Show-EventLog Write-EventLog
Background Jobs
Get-Job Receive-Job Remove-Job Start-Job Stop-Job Wait-Job
Community Resources
Newsgroup: Microsoft.Public.Windows.PowerShell Team blog: http://blogs.msdn.com/PowerShell PowerShell Community: http://www.powershellcommunity.org Channel 9: http://channel9.msdn.com/tags/PowerShell Wiki: http://channel9.msdn.com/wiki/default.aspx/Channel9.WindowsPowerShellWiki Script Center: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx CodePlex: http://codeplex.com/Project/ProjectDirectory.aspx?TagName=powershell Books
PowerShell in Action by Bruce Payette http://manning.com/powershell Windows PowerShell Cookbook by Lee Holmes http://www.oreilly.com/catalog/9780596528492/index.html Professional Windows PowerShell Programming http://www.wrox.com/WileyCDA/WroxTitle/productCd-0470173939.html Many others
Resources
www.microsoft.com/teched
Sessions On-Demand & Community
www.microsoft.com/learning
Microsoft Certification & Training Resources
http://microsoft.com/technet
Resources for IT Professionals
http://microsoft.com/msdn
Resources for Developers
Related Content
Breakout Sessions
DAT314 SIA313 WCL314 WSV304 WSV325 Microsoft SQL Server Automation on Steroids, Including PowerShell Support Managing Active Directory Identities with Active Directory PowerShell Windows PowerShell for the Windows 7 Enterprise Client Deploying and Managing Scalable Web Server Farms with IIS 7.0 Windows PowerShell: Tips from the Expert
Hands-on Labs
WSV08-HOL Introduction to Windows PowerShell Fundamentals WSV03-HOL Advanced Windows PowerShell Scripting WSV19-HOL Windows Server 2008 R2: Server Management and PowerShell V2
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.