Since Windows 7 and Windows Server 2008 R2, Windows PowerShell has been a part of the core operating system, meaning we will see the next version of PowerShell in Windows 8. In this session we will look at what`s new in Windows PowerShell 3.0, based on the Windows Developer Preview released at the BUILD conference in September. You will get to see new features in PowerShell itself, as well as new modules for managing Windows 8 and Windows Server 8.
2. Agenda
• Overview of previous versions
• Windows Management Framework
• New features in PowerShell v3
• Demo
• Sneak peak at PowerShell in «Windows
Server 8»
• Microsoft Script Explorer
January 22, 2012 NIC 2012
3. Previous versions
Windows PowerShell 1.0
• Version 1.0 was released in 2006 for Windows XP SP2/SP3, Windows Server
2003, and Windows Vista. For Windows Server 2008, it was included as an
optional feature.
• The first Microsoft product with native PowerShell support was Exchange
Server 2007
• Shipped with 129 native cmdlets
January 22, 2012 NIC 2012
4. Previous versions
Windows PowerShell 2.0
• Version 2.0 is integrated with Windows 7 and Windows Server 2008 R2 and
is released for Windows XP with Service Pack 3, Windows Server 2003 with
Service Pack 2 and Windows Vista with Service Pack 1
• Part of Microsoft Common Engineering Criteria since 2009
• The major new features includes Remoting, Background
Jobs, Modules, Advanced Functions and the Windows PowerShell ISE
• 16 PowerShell modules available in Windows Server 2008 R2 for managing
server roles and features, in example AD, Group Policy and Failover Clusters.
• Shipped with 236 native cmdlets
January 22, 2012 NIC 2012
5. Disclaimer
• This presentation is based on a Community
Technology Preview (pre-beta) version of the
product.
• Features and behavior are likely to change
before the final release.
8. Windows Management Framework
• Windows PowerShell
• Windows Management Instrumentation
(WMI)
• Windows Remote Management (WinRM)
Windows Management Framework 3.0 - Community Technology Preview (CTP) #2
http://www.microsoft.com/download/en/details.aspx?id=27548
9. New features in PowerShell 3.0
Workflows
Workflows that run long-running
Robust Sessions
Robust sessions that automatically recover from network failures and interruptions
Scheduled Jobs
Scheduled jobs that run regularly or in response to an event.
Delegated Administration
Commands that can be executed with a delegated set of credentials
Simplified Language Syntax
Where-Object and Foreach-Object can be used without a scriptblock
Cmdlet Discovery
Improved cmdlet discovery and automatic module loading
Show-Command
Show-Command, helps users view Cmdlet parameters in a dialog box, and run it.
10. WMI in Windows Management Framework 3.0
A new provider development model
This new model brings down the cost of provider development and removes the
dependency on COM.
A new MI Client API to perform standard CIM operations.
The API can be used to interact with any standard WsMan + CIMOM
implementation, allowing management applications on Windows to manage non-
Windows computers.
The ability to write Windows PowerShell cmdlets in native code
The new WMI Provider APIs supports an extended Windows PowerShell semantics API
11. WinRM in Windows Management Framework 3.0
Connections are more robust
Session disconnect and reconnect, with or without client session
reconstruction, allows long-running tasks to continue even when the session in which
they were started is closed and the client computer is shut down.
Connections are more resilient
In Windows PowerShell 3.0, connections can survive short-term network failures.
14. Windows PowerShell Web Service
Windows PowerShell Web Service enables an administrator to expose a set of
PowerShell cmdlets as a RESTful web endpoint accessible via the (Open Data
Protocol (OData). This provides remote access to invoke cmdlets from both
Windows and non-Windows clients.
15. Windows PowerShell Web Access
The PowerShell console exposed as a website
Use PowerShell from mobile devices
Available in «Windows Server 8»
blog.powershell.no/2011/09/14/windows-powershell-web-access
16. Windows PowerShell Workflow
Windows PowerShell Workflow lets IT pros and developers apply the benefits of
workflows to the automation capabilities of Windows PowerShell.
Getting Started with Windows PowerShell Workflow
A workflow is a sequence of automated steps or activities that execute tasks on or
retrieve data from one or more managed nodes (computers or devices). These activities
can include individual commands or scripts. Windows PowerShell Workflow enables, IT
pros and developers alike, to author sequences of multi-computer management activities
— that are either long-running, repeatable, frequent, parallelizable, interruptible,
stoppable, or restartable — as workflows. By design, workflows can be resumed from an
intentional or accidental suspension or interruption, such as a network outage, a reboot
or power loss.
Download the Getting Started guide here: http://bit.ly/sF5FEK
17. Microsoft Script Explorer
• Script Explorer helps scripters find Windows
PowerShell scripts and how-to guidance in
online repositories such as the TechNet Script
Center Script Repository, PoshCode, and the
local file system.
• Can run both standalone and as an Add-on to
PowerShell ISE
18. Microsoft Script Explorer Features
• Search for Windows PowerShell scripts, and get details about Windows PowerShell
scripts from online repositories and the local file system.
• Search for Windows PowerShell snippets from local file system.
• Search for how-to guidance from online repositories.
• Select available repositories to refine search.
• Filter based on technology or product.
• See item details, including rating, author, script code, and source information.
• Copy script or snippet code to the Clipboard, and insert it in the Windows
PowerShell ISE editor.
• Save script or snippet code to the local file system.
• Browse scripts that are organized following a categorized topology.
• Explore community resources for getting started on Windows PowerShell.
The above listing is copied from the Microsoft Script Explorer
Readme document.
19. Microsoft Script Explorer Availability
• Currently in private beta/CTP
• No release time information available
• More information:
Jeremy Kelly from Microsoft announced the Script
Explorer on the PowerScripting podcast last year:
http://powerscripting.wordpress.com/2011/06/27/episode-151-jeremy-kelly-
announces-script-explorer
21. Review
Overview of previous versions
Windows Management Framework
New features in PowerShell v3
Walkthrough
Demo
Sneak peak at PowerShell in «Windows
Server 8»
Microsoft Script Explorer
January 22, 2012 NIC 2012
22. Call to action
• Download Windows Management Framework
3.0 - Community Technology Preview (CTP) #2
23. Call to action
If not already using PowerShell, start using it
(quickest way to start: stop using cmd.exe)
Use the PowerShell community to Get-Help
24. Resources
TechNet Wiki
Windows PowerShell Survival Guide
http://social.technet.microsoft.com/wiki/contents/articles/windows-powershell-survival-guide.aspx
PowerShell V3 Featured Articles
http://social.technet.microsoft.com/wiki/contents/articles/powershell-v3-featured-articles.aspx
PowerShell V3 Tips and Tricks
http://social.technet.microsoft.com/wiki/contents/articles/4788.aspx
25. Microsoft Technology User Group Script Club
Part of the Microsoft Technology User Group in Oslo
Regular workshops exploring various topics around
automation and scripting with a focus on PowerShell.
Meetings is announced at www.mtug.no
If you want to find or create a PowerShell usergroup or script
club in your area, check out http://powershellgroup.org
Some of the new features in Windows PowerShell 3.0 include: Workflows Workflows that run long-running activities (in sequence or in parallel) to perform complex, larger management tasks, such as multi-machine application provisioning. Using the Windows Workflow Foundation at the command line, Windows PowerShell workflows are repeatable, parallelizable, interruptible, and recoverable. Robust Sessions Robust sessions that automatically recover from network failures and interruptions and allow you to disconnect from the session, shut down the computer, and reconnect from a different computer without interrupting the task. Scheduled Jobs Scheduled jobs that run regularly or in response to an event. Delegated Administration Commands that can be executed with a delegated set of credentials so users with limited permissions can run critical jobs Simplified Language Syntax Simplified language syntax that make commands and scripts look a lot less like code and a lot more like natural language. Cmdlet Discovery Improved cmdlet discovery and automatic module loading that make it easier to find and run any of the cmdlets installed on your computer. Show-Command Show-Command, a cmdlet and ISE Add-On that helps users find the right cmdlet, view its parameters in a dialog box, and run it.
A new provider development model This new model brings down the cost of provider development and removes the dependency on COM. A new MI Client API to perform standard CIM operations. The API can be used to interact with any standard WsMan + CIMOM implementation, allowing management applications on Windows to manage non-Windows computers. The ability to write Windows PowerShell cmdlets in native code The new WMI Provider APIs supports an extended Windows PowerShell semantics API allowing you to provide rich Windows PowerShell semantics. e.g., Verbose, Error, Warning, WhatIf, Confirm, Progress
With Windows Management Framework 3.0: Connections are more robust Session disconnect and reconnect, with or without client session reconstruction, allows long-running tasks to continue even when the session in which they were started is closed and the client computer is shut down. This feature also allows administrators to reconnect from different computers to check the status of remote running tasks and get results. Connections are more resilient In Windows PowerShell 3.0, connections can survive short-term network failures; the client-server connection is not severed at the first sign of trouble. If network problems persist, the client is safely disconnected and can reconnect by using the Connect-PSSession or Receive-PSSessioncmdlets.