what’s new in powershell v3 and introducing script explorer

20
What’s New in PowerShell v3 Disclaimer: All of this is pre-release functionality and is subject to change @jonob le

Upload: jonathan-noble

Post on 07-Nov-2014

5.417 views

Category:

Technology


1 download

DESCRIPTION

Presentation to NEBytes user group on 18th January 2012. Audience was mixed IT pro/developer; 1/4 people who have used PowerShell to some degree; 2/3 had at least some awareness. The aim of the presentation was to show existing PowerShell users some of the exciting new features/directions, and persuade the rest that PowerShell has come of age and is a technology that they should be exploring.

TRANSCRIPT

Page 1: What’s New in PowerShell v3 and Introducing Script Explorer

What’s New in PowerShell v3

Disclaimer:All of this is pre-release

functionality and is subject to change

@jonoble

Page 2: What’s New in PowerShell v3 and Introducing Script Explorer

Automating all management operations for servers within an organization increases the quality and reliability of the operations and lowers the total cost of ownership. Windows PowerShell scripting is the Microsoft standard for automation. Windows PowerShell enables IT pros to automate operations such as deployment, configuration, life cycle management, data management, security management, and diagnostics. Microsoft server products provide high-level, task-oriented Windows PowerShell cmdlets and optional namespace providers. Microsoft Common Engineering Criteria

Page 3: What’s New in PowerShell v3 and Introducing Script Explorer

Masses of ModulesAppLocker 

BestPractices BitsTransfer

BranchCache ClusterAwareUpdating 

DirectAccessClientComponentsDnsConfig DnsLookup

FailoverClustersFileServer 

iSCSI MsDtc

NetAdapter NetQos

NetSwitchTeamNetTCPIP 

NetworkConnectivityStatus NetworkSecurity 

PKIClientPrintManagement PSScheduledJob

PSWorkflow RDManagement ScheduledTasks 

SecureBootServerManager 

SmbShare SmbWitness

Storage TelemetryManagementTroubleshootingPack 

TrustedPlatformModuleUserAccessLogging

…and more!

Page 4: What’s New in PowerShell v3 and Introducing Script Explorer

Feature Specific Modulesor added with RSAT

ActiveDirectoryADDSDeployment

ADRMSAdminDhcpServerDnsServer

GroupPolicyNetworkLoadBalancingClusters

RemoteAccess

Page 5: What’s New in PowerShell v3 and Introducing Script Explorer

Active Directory

• 76 cmdlets on Server 2008 R2• 134 on Server 8

support for managing…Active Directory replication, sites, site links,

subnets

Central Access Policies, Rules, Claims

• ADDSDeployment module contains cmdlets to replace dcpromo

• ADDS Installation Wizard and ADAC expose the PowerShell they use in the background

Page 6: What’s New in PowerShell v3 and Introducing Script Explorer

Remoting

• Enabled on Server 8 by default

• Server Manager allows management of multiple machines using PowerShell Remoting and WMI

• Add Roles/Features wizards can act against multiple targets

Page 7: What’s New in PowerShell v3 and Introducing Script Explorer

Remoting Improvements

• New configuration optionsSharedHostsRunasUserAutoRestartServerBufferingMode

• Disconnected sessions• Resilient sessions

• New cmdlets that make creation of restricted sessions easier

Page 8: What’s New in PowerShell v3 and Introducing Script Explorer

Workflow

• Based on Windows Workflow Foundation

• Run complex, large, multi-machine management tasksRepeatableParallelizableInterruptibleRecoverable

• Resume after reboot, network/power loss

• RunBook automation

Page 9: What’s New in PowerShell v3 and Introducing Script Explorer

Workflow

• Look a lot like functions• Runs on top of PowerShell job engine• Use *-Job cmdlets• Parallel and Sequence blocks• Can be nested

• Check out the PDF with WMF3 CTP2

Page 10: What’s New in PowerShell v3 and Introducing Script Explorer

Workflow Language Differences

• Adds Workflow specific parallel ForEach statement and Parallel keyword

• You can’t use these within WorkflowSwitch statements (except basic string comparisons)Begin, Process and EndIn loops: Break, Continue, variable modifying conditionsSub expressionsMultiple assignmentsDynamic parametersDot-sourcing or the invocation operatorPositional parameters

Page 11: What’s New in PowerShell v3 and Introducing Script Explorer

Simplified Syntax(try saying that ten times quickly after a few drinks!)

• Where-Object {$_.<propertyname>}• Where-Object <propertyname>

Get-CASMailbox | Where {$_.IMAPEnabled}becomes

Get-CASMailbox | Where IMAPEnabled

• Now works like Sort-Object, Group-Object

Page 12: What’s New in PowerShell v3 and Introducing Script Explorer

Other New Stuff

• Export-Csv now has an –Append switchRequires matching headings in the fileUnless you use –Force

• Get-ChildItem has new filter parameters-Directory, -File, -Attributes [<FileAttributes>]

• New operators-in and –notinLike –contains and –notcontains in reverse

Page 13: What’s New in PowerShell v3 and Introducing Script Explorer

Other New Stuff

• PowerShell Jobs can be scheduledOn a timescaleIn response to an event

• Automatic module loading makes cmdlet discovery easierBe careful about duplicate cmdlets

Set your PSModulePath

• Show-Command

• Updatable help

Page 14: What’s New in PowerShell v3 and Introducing Script Explorer

Other New Stuff

• Restart-Computer has new parameters-Wait-For <Wmi|WinRM|PowerShell>

• Invoke-RestMethod• ConvertFrom/To-Json

• Better control passing arguments to exes--% to dumb-down parser

Page 15: What’s New in PowerShell v3 and Introducing Script Explorer

DLR

POWERSHELL IS NOW BASED ON THE DYNAMIC LANGUAGE RUNTIME!!!

Page 16: What’s New in PowerShell v3 and Introducing Script Explorer

ISE Enhancements

• F8• Better IntelliSense• Add-ons

Horizontal/vertical tool pane

• XML File highlighting• Script region folding• Code snippets• Auto-save• Recent file list

• PowerShell Magazine articlehttp://www.powershellmagazine.com/2011/09/28/powershell-v3-ise-and-ise-scripting-model-changes-improvements/

Page 17: What’s New in PowerShell v3 and Introducing Script Explorer

PowerShell Web Access

• Gives a remote console in a browser

• Runs on IIS, over SSL• Just add feature & run a script to

configure

• Blog post by Jan Egil Ringhttp://blog.powershell.no/2011/09/14/windows-powershell-web-access/

Page 18: What’s New in PowerShell v3 and Introducing Script Explorer

Introducing Script Explorer

…or to be preciseMicrosoft Script Explorer for

Windows PowerShell

Page 19: What’s New in PowerShell v3 and Introducing Script Explorer

• Standalone or ISE add-on

• Online repositories• Local file system and network shares

• Search or browse• Scripts, snippets or how-to

• Save to local file or copy to ISE editor

• Explore community resources

Page 20: What’s New in PowerShell v3 and Introducing Script Explorer

• Any questions?

• NE PowerShell Script Club, anyone?