SlideShare una empresa de Scribd logo
1 de 20
@jonoble




What’s New in PowerShell v3

                 Disclaimer:
  All of this is pre-release functionality
         and is subject to change
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
Masses of Modules
          AppLocker                    PKIClient
        BestPractices             PrintManagement
         BitsTransfer             PSScheduledJob
        BranchCache                  PSWorkflow
    ClusterAwareUpdating           RDManagement
DirectAccessClientComponents       ScheduledTasks
          DnsConfig                  SecureBoot
          DnsLookup                ServerManager
       FailoverClusters               SmbShare
          FileServer                 SmbWitness
             iSCSI                     Storage
             MsDtc             TelemetryManagement
         NetAdapter             TroubleshootingPack
            NetQos             TrustedPlatformModule
        NetSwitchTeam            UserAccessLogging
          NetTCPIP                   …and more!
  NetworkConnectivityStatus
       NetworkSecurity
Feature Specific Modules
      or added with RSAT


       ActiveDirectory
     ADDSDeployment
       ADRMSAdmin
        DhcpServer
         DnsServer
        GroupPolicy
NetworkLoadBalancingClusters
       RemoteAccess
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
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
Remoting Improvements
• New configuration options
  SharedHosts
  RunasUser
  AutoRestart
  ServerBufferingMode


• Disconnected sessions
• Resilient sessions

• New cmdlets that make creation of restricted
  sessions easier
Workflow
• Based on Windows Workflow Foundation
• Run complex, large, multi-machine
  management tasks
  Repeatable
  Parallelizable
  Interruptible
  Recoverable
• Resume after reboot, network/power loss
• RunBook automation
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
Workflow Language Differences
• Adds Workflow specific parallel ForEach
  statement and Parallel keyword

• You can’t use these within Workflow
  Switch statements (except basic string comparisons)
  Begin, Process and End
  In loops: Break, Continue, variable modifying conditions
  Sub expressions
  Multiple assignments
  Dynamic parameters
  Dot-sourcing or the invocation operator
  Positional parameters
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
Other New Stuff
• Export-Csv now has an –Append switch
  Requires matching headings in the file
  Unless you use –Force

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

• New operators
  -in and –notin
  Like –contains and –notcontains in reverse
Other New Stuff
• PowerShell Jobs can be scheduled
  On a timescale
  In response to an event

• Automatic module loading makes cmdlet
  discovery easier
  Be careful about duplicate cmdlets
     Set your PSModulePath

• Show-Command

• Updatable help
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
DLR


POWERSHELL IS NOW BASED ON
THE DYNAMIC LANGUAGE
RUNTIME!!!
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 article
    http://www.powershellmagazine.com/2011/09/28/powershell-v3-ise-and-ise-
    scripting-model-changes-improvements/
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 Ring
  http://blog.powershell.no/2011/09/14/windows-powershell-web-access/
Introducing Script Explorer

        …or to be precise
   Microsoft Script Explorer for
      Windows PowerShell
• 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
• Any questions?

• NE PowerShell Script Club, anyone?

Más contenido relacionado

Destacado (9)

Heros
HerosHeros
Heros
 
7 Habits
7 Habits7 Habits
7 Habits
 
What is DevOps?
What is DevOps?What is DevOps?
What is DevOps?
 
Kerja pelaksanaan gizi di puskesmas
Kerja pelaksanaan gizi di puskesmasKerja pelaksanaan gizi di puskesmas
Kerja pelaksanaan gizi di puskesmas
 
Test plan
Test planTest plan
Test plan
 
pengertian peta dan komponen peta
pengertian peta dan komponen petapengertian peta dan komponen peta
pengertian peta dan komponen peta
 
Peadiatric protocol malaysia 3rd edition
Peadiatric protocol malaysia 3rd editionPeadiatric protocol malaysia 3rd edition
Peadiatric protocol malaysia 3rd edition
 
Food poisoning
Food poisoningFood poisoning
Food poisoning
 
Thinking of Documentation as Code [YUIConf 2013]
Thinking of Documentation as Code [YUIConf 2013]Thinking of Documentation as Code [YUIConf 2013]
Thinking of Documentation as Code [YUIConf 2013]
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

What’s New in PowerShell v3 and Introducing Script Explorer

  • 1. @jonoble What’s New in PowerShell v3 Disclaimer: All of this is pre-release functionality and is subject to change
  • 2. 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
  • 3. Masses of Modules AppLocker PKIClient BestPractices PrintManagement BitsTransfer PSScheduledJob BranchCache PSWorkflow ClusterAwareUpdating RDManagement DirectAccessClientComponents ScheduledTasks DnsConfig SecureBoot DnsLookup ServerManager FailoverClusters SmbShare FileServer SmbWitness iSCSI Storage MsDtc TelemetryManagement NetAdapter TroubleshootingPack NetQos TrustedPlatformModule NetSwitchTeam UserAccessLogging NetTCPIP …and more! NetworkConnectivityStatus NetworkSecurity
  • 4. Feature Specific Modules or added with RSAT ActiveDirectory ADDSDeployment ADRMSAdmin DhcpServer DnsServer GroupPolicy NetworkLoadBalancingClusters RemoteAccess
  • 5. 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
  • 6. 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
  • 7. Remoting Improvements • New configuration options SharedHosts RunasUser AutoRestart ServerBufferingMode • Disconnected sessions • Resilient sessions • New cmdlets that make creation of restricted sessions easier
  • 8. Workflow • Based on Windows Workflow Foundation • Run complex, large, multi-machine management tasks Repeatable Parallelizable Interruptible Recoverable • Resume after reboot, network/power loss • RunBook automation
  • 9. 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
  • 10. Workflow Language Differences • Adds Workflow specific parallel ForEach statement and Parallel keyword • You can’t use these within Workflow Switch statements (except basic string comparisons) Begin, Process and End In loops: Break, Continue, variable modifying conditions Sub expressions Multiple assignments Dynamic parameters Dot-sourcing or the invocation operator Positional parameters
  • 11. 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
  • 12. Other New Stuff • Export-Csv now has an –Append switch Requires matching headings in the file Unless you use –Force • Get-ChildItem has new filter parameters -Directory, -File, -Attributes [<FileAttributes>] • New operators -in and –notin Like –contains and –notcontains in reverse
  • 13. Other New Stuff • PowerShell Jobs can be scheduled On a timescale In response to an event • Automatic module loading makes cmdlet discovery easier Be careful about duplicate cmdlets Set your PSModulePath • Show-Command • Updatable help
  • 14. 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
  • 15. DLR POWERSHELL IS NOW BASED ON THE DYNAMIC LANGUAGE RUNTIME!!!
  • 16. 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 article http://www.powershellmagazine.com/2011/09/28/powershell-v3-ise-and-ise- scripting-model-changes-improvements/
  • 17. 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 Ring http://blog.powershell.no/2011/09/14/windows-powershell-web-access/
  • 18. Introducing Script Explorer …or to be precise Microsoft Script Explorer for Windows PowerShell
  • 19. • 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
  • 20. • Any questions? • NE PowerShell Script Club, anyone?