This document discusses the top 10 new features in PowerShell version 3, which ships with Windows 8 and Server 2012. It begins with some background on the development of PowerShell. The top features discussed include PowerShell Web Access, module auto-loading, robust remoting, updatable help files, simplified syntax, improvements to the Integrated Scripting Environment including IntelliSense, the addition of workflows, new modules and cmdlets, and the inclusion of PowerShell in Server Core installations by default. The document encourages upgrading operating systems that support PowerShell v3 and getting training to learn about the new features.
3. The Journey to PowerShell 3
• PowerShell v3 has been a long journey
• Monad Manifesto in 2002
• V1 with Windows Vista/Server 2008/Exchange 2007
• V2 with Windows 8 and Server 2008 R2
• V3 ships with Windows 8 and Server 2012
• Key themes
• Improving the usability
• Increasing the surface area
• Providing plumbing for more, more, more
4. My Top-10 List
• PowerShell v3 is vast
• There are hundreds of new features
• This list is arbitrarily
• But things I like
• The order is arbitrary
• But all 10 are cool!
5. 10 – PowerShell Web Access
≥ Enabled you to access PowerShell via IIS
≥ A bit like Terminal Services Gateway
10. 9 - Module Auto-load
• Modules added to PowerShell in v2
• No modules in v1
• In v2, modules had to be loaded manually
• In v3, if modules are in standard module
locations (i.e. defined in $env:PSmodulePath),
Powershell can find the module the cmdlet is
defined in and then load it auto-magically
12. 8 - Robust Remoting
• Remoting added in v2
• But was not robust
• Remoting broke at the first sign of trouble
• Once broken, often stayed broken
• Could be hard to fix
• Under the covers – v3 has benefited from lots of work
• Simple errors no longer become fatal
• Remoting a highly key part of Server 2012
• Remoting + Workflow are the basis for the new server
manager tool
14. 7 - Updatable Help
• Help a key feature of PowerShell since V1
• Both on line and in the box
• Great writing team
• Fix bugs
• All components shipped with Windows Server 2012 can only
be updated via normal update mechanism
• Is it important enough to raise a critical fix for?
• Is it important enough to raise a recommended hot fix?
• Is it important enough to be fixed in a Service Pack
• Solution
• No help „in the box‟ – but…
• Update-Help to fix that
16. 6 – Simplified Syntax
≥ PowerShell had a scripting „wall‟
Get-Process
Get-Process| Sort CPU
Get-Process| Sort CPU| Select Name, Cpu
≥ But what about where
Get-Process| Where {$_.name –match "power"}
$_, {}, OH MY!
≥ In v3 – for SINGLE expressions
Get-Process | Where name –match “power”
17. 6 - More Simplified Syntax
≥ Calling an object method in a pipeline meant
using Foreach in v2
Get-Process | where {…} | foreach {$+_.kill()}
≥ Now, really simple
Get-Process | where {…} | kill # NOTE NO ()!
≥ And how about this:
Dir –AD
Dir +Hidden
19. Break for Breath
≥ 10 through 6 so far
10 - PowerShell Web Service
9 - Module auto-load
8 - Robust Remoting
7 - Updatable Help
6 - Simplified Syntax for Where/Get-ChildItem
≥ These all make life easier for the IT Pro
Simplify what you type
Get better help
More reliable/robust features
Extend PowerShell access via the DMZ
20. 5 – ISE Enhancements
≥ In v2 – the ISE was functional
The minimum upgrade from Notepad for unicode users
You still wanted 3rd party tools
ISE could be extended ($PsIse variable)
≥ In v3 – ISE is now nearly at a feature parity with 3rd party
tools
≥ Some key new features
2-pane design (in V2 there were 3 panes)
Intellisense
Wrapping of regions
Script Explorer
21. ISE Script Explorer
≥ Free add-on tool
≥ Created by Microsoft
≥ Allows you to explore for scripts
≥ A great starting point
24. 3 - Workflows
≥ Remoting added in v2
But was not robust
Remoting broke at the first sign of trouble
Once broken, often stayed broken
Could be hard to fix
≥ Under the covers – v3 has benefited from lots of work
Simple errors no longer become fatal
≥ Remoting a highly key part of Server 2012
Remoting + Workflow are the basis for the new server
manager tool
25. More about Workflows
≥ A workflow is effectively a rich, long-running script that
can survive reboots
≥ PowerShell workflow based on Windows Workflow
Foundation
In effect, Powershell scripts become workflows
≥ Workflows are used, under the covers, with remote
uses of Server Manger
≥ Workflows are complex and require an entire session
(a day?) on their own.
26. Workflows
≥ Workflows similar to PowerShell functions
Many restrictions owing to work flow
architecture
≥ Complex to create, especially multi-machine
work flows
≥ Demo left as an exercise for the reader
27. 2 – Lots of new Modules/Cmdlets
≥ Lots of new modules added!
Win 8
Server 2012
≥ Lots of CIM cmdlets
You can create cmdlets from XML and CIM
29. 1 – PowerShell in Server Core
≥ In Server 2008, Server Core did not support
PowerShell
≥ In Server 2008 R2, you could add PowerShell
and .NET to Server Core
Use Sconfig 42 to install
≥ In Server 2012, PowerShell installed by
default
Serve Core starts by defaul in CMD.EXE
You need to do registry hack to start PowerShell
31. Adding / Removing The GUI
≥ In Server 2012, you can add/remove the
GUI
Turn Server Core into full GUI and back
≥ Just a simple PowerShell command
But beware of sources
32. Summary
≥ Lots and lots of new features
This list barley scratches the surface
≥ Windows 8 and Server 2012 not have
PowerShell V3 by default
You can download v3 for Server 2008/R2 and
Win 7
33. Call To Action
≥ Upgrade where possible to latest Operating
Systems
Server 2012/Windows 8
Possibly using Windows 7 as a client
≥ With Downlevel clients – upgrade to
PowerShell V3
≥ Get PowerShell training
Attend the PowerShell PowerCamp event
See Http://tfl09.blogspot.com for details
34. Call To Action - 2
≥ Evaluate the following expression
• “Learn PowerShell Version 3” -OR
• “Learn to smile and say: „Want fries
with that?‟”