1 Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
2 Meet Jeffrey Distinguished Engineer & Lead Architect for Windows Server & System Center Division Inventor of Windows PowerShell Responsible for setting long term technical vision for these products and running the technology planning for the releases Over 30 years of industry experience Microsoft, Tivoli, NetView, DEC Held 8 patents prior to joining Microsoft, and has registered 30 since. Frequent speaker at industry and research conferences on a variety of management and language topics
3 Meet Jason Senior Technologist, Concentrated Technology Board member and CFO PowerShell.Org Author Learn Windows IIS in a Month of Lunches Contributingauthor PowerShellDeepDives 25 year IT veteran Speaker at a variety of industry conferences Teaches PowerShell for the IT pro to maximize management and automation Frequent contributor to TechNet Magazine and other industry publications
4 Course Topics Getting Started with PowerShell shellthefeardon t The pipeline : Deeper 02 The Help system 07 The Power in the Shell - Remoting 03 The pipeline : Getting connected 08 Getting prepared for automation 04 Extending the shell 09 Automation in scale - Remoting 05 Objects for the Admin 10 Introducing scripting and toolmaking
5 Setting Expectations Target Audience Tailored for the IT pro that needs to improve management and automation Fast paced for the real world Suggested Prerequisites/Supporting Material Experience working as a Windows IT pro/admin/help Desk Get answers in the forums at PowerShell.Org 3 PowerShellWindowsLearn outcheck by LunchesofMonthain Don Jones and Jeffery Hicks
6 Join the MVA Community! Microsoft Virtual Academy Free online learning tailored for IT Pros and Developers Over 1M registered users Up-to-date, relevant training on variety of Microsoft products! learnyouwhileearn Get 50 MVA Points for this event! Visit Enter this code: PowerJump1 (expires 8/15/2013)
7 01 shellthefeardon t Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
8 Module Overview The purpose for PowerShell Installing PowerShell Windows Management Framework Launching PowerShell for the administrator Customize the shell for comfort Getting familiar with the shell
9 The Purpose to PowerShell YOU THEM Improved management and automation Manage real-time Manage large scale
10 Installing PowerShell Windows Management Framework PowerShell V3 Windows 8 and Server 2012 PowerShell V2 Windows 7 and Server 2008 Download the Windows Management Framework 3.0 at Windows XP and Server 2003 can run V2
11 Launching PowerShell for the Administrator
12 Customize the shell for comfort
13 Getting familiar with the shell Cmdlets : Verb Noun Native commands work! Examples Ping, IPConfig, calc, notepad, mspaint cls - Clear-Host cd - Set-Location dir, ls - Get-Childitem type, cat - Get-Content Copy, cp - Copy-item
14 Questions or comments?
15 02 The Help system Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
16 Module Overview Why you need help Updatable Help Discoverability with the Help system Understanding Syntax Real-World using Help
17 Why you need help Vast resource at your finger tips to help make you successful memorizedon t Discover! Thousands of cmdlets all have help! Scripting resources and information Advanced PowerShell configuration information
18 Updatable Help Update to the latest version of Help Save-Help to save to a local location
19 Discoverability with the Help system Get-Help versus Help and Man Help <cmdlet> Help *partial* Help <verb/noun> Help <cmdlet> -Full Help <cmdlet> -Online Help <cmdlet> -ShowCommand Get-Help About_*
20 Understanding Syntax Parameter sets The meaning of Syntax - Indicates A Parameter <> Indicates Arguments  Argument Accepts Multiple Values [Param] is Positional [Param Arg] is Optional
21 Real-World using Help
22 Questions or comments?
23 03 The Pipeline : Getting Connected Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
24 Module Overview What s the pipeline and what does it do? Exporting/Importing CSV Exporting/Importing XML Other files and printers Displaying information in a GUI Making a webpage of information Cmdlets that kill
25 What s the pipeline and what does it do? Pipe character located above the Enter key Connects cmdlets to produce better results Can be broken into several lines to increase readability
33 04 Extending the Shell Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
34 Module Overview Like the MMC One Shell does it all Finding and adding Snap-ins Finding and adding Modules Discovering new commands The real world of cmdlets
35 Like the MMC - One Shell does it all
36 Finding & Adding Snap-ins
37 Finding & Adding Modules PowerShell V3 dynamically imports modules when you use the cmdlet
38 Discovering new commands
39 The real world of cmdlets
40 Questions or comments?
41 05 Object for the Admin Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
42 Module Overview Object across the pipeline Getting the information you need Sorting Objects Selecting Objects Custom Properties Filtering data Methods When no cmdlet exists
43 Object across the pipeline
44 Getting the information you need Get-Member (gm) TypeName is a unique Windows assigned name Displays the properties and methods of an object Properties are potential columns of information Methods are the potential actions that can be taken
45 Sorting Objects Sort-Object sorts properties. Use Get-Member to see a list of properties
46 Selecting Objects Select-Object selects properties. Use Get-Member to list properties to select from. -first and -last restrict list of rows displayed.
47 Custom Properties
48 Filter Object Out of the Pipeline
49 Comparison Operators Comparison returns boolean True or False Comparison can be casesensitive using c prefix For complete description, see About_Comparison
50 Methods When no cmdlet exists
51 Questions or comments?
52 06 The Pipeline : Deeper Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
53 Module Overview How the pipeline really works - The 4 step solution 1. ByValue 2. ByPropertyName 3. matchdoesn tpropertymyifwhat Customize it! 4. The Parenthetical when all else fails
54 How the pipeline really works - The 4 step solution
55 ByValue 1. Get-Service passes ServiceController objects to the pipeline 2. Does Stop-Service accept ServiceController Objects? 3. Help Stop-Service -Full displays a parameter that accepts ServiceController ByValue
57 ByPropertyName 1. Get-Process is passing a Process Object 2. Stop-Service does not support accepting Process objects ByValue, so PowerShell checks what can be accepted ByPropertyName. 3. -Name does accept strings ByPropertyName, and the objects in the pipeline are labeled as a Name property 4. Stop-Service attempts to use the objects for its - Name, in this example, fails
58 matchdoesn tpropertymyifwhat Customize it!
59 The Parenthetical when all else fails 1. I want to pass a list of computer names to Get- Service. Why does this fail? 2. -Name and -InputObject accept pipeline input ByValue, not - Computername. -Name accepts text, and then causes the failure. Parenthesis don t rely on binding and attach information directly to the desired
60 The Parenthetical when all else fails Returns a collection (table) of objects. Returns string contents
61 Questions or comments?
62 07 The Power in the Shell - Remoting Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
63 Module Overview Overview of Remoting Enable Remoting One-To-One One-To-Many Not the end yet!
64 Overview of Remoting
65 Enable Remoting PowerShell Remoting is already enabled in Server 2012 Computer Configuration/Policies/Administrative Templates/Windows Components/Windows Remote Management
66 One to One - Interactive
68 PowerShell Web Access PowerShell Anywhere, anytime, on any device! Install-WindowsFeature Name WindowsPowerShellWebAccess Get-Help *Pswa* Install-PswaWebApplication UseTestCertificate # Use the usetestcertificate for testing (Expires in 90 days) Add-PswaAuthorizationRule username <Domain\User Computer\user> -ComputerName <Computer> -ConfigurationName AdminsOnly
69 Not the end yet! More to come! Managing in scale and in real time! Automation and scripting! Great resource: Free! Secrets of PowerShell Remoting Don Jones and Tobias Weltner
70 Questions or comments?
71 08 Getting prepared for automation Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
72 Module Overview PowerShell security goals Execution Policy Variables : a place to store stuff Fun with Quotes Getting and displaying input Other output for scripts and automation
73 PowerShell security goals Secured by default Prevents mistakes by unintentional admins and users No Script Execution.Ps1 associated with notepad Must type path to execute a script
74 Execution Policy By default, PowerShell does not run scripts. Get/Set-ExecutionPolicy Restricted Unrestricted AllSigned RemoteSigned Bypass Undefined Can be set with Group Policy
75 Variables: A place to store stuff Use $ to create and use variables Can contain letters, numbers, spaces and underscores Don t persist after Shell exits New-Variable Set-Variable Get-Variable Clear-Variable Remove-Variable Can force a type [int]$var Note: The $ is not part of the variable name, it s a cue to access the contents of the variable
76 Fun with Quotes Double Quotes resolve all variables Can use Sub-Expressions Single Quotes prevent substitution Get-Help About_Quoting_Rules Back-tick/Grave-Accent prevents individual substitution
77 Getting and displaying input
78 Other output for scripts and automation Write-Warning Write-Verbose Write-Debug Write-Error $Preference variables to know Help about_preference_variables $DebugPreference=SilentlyContinue $ErrorActionPreference=Continue #VerbosePreference=SilentlyContinue
79 Questions or comments?
80 09 Automation in scale - Remoting Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
81 Module Overview Reusable Sessions Sessions with Invoke-Command Real-world deployment of a website Getting commands from anywhere
82 Reusable Sessions Can be disconnected and reconnected in PowerShell V3
83 Sessions with Invoke-Command
84 Real-world deployment of a website Demonstration
85 Getting commands from anywhere - Implicit Remoting
86 Questions or comments?
87 10 Introducing scripting and toolmaking Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology
88 Module Overview The new ISE Making commands repeatable Adding parameters to your script Documenting your script Turning your script into a tool for others Storing your tools in a module
89 The new ISE
90 Making commands repeatable
91 Adding parameters to your script
92 Documenting your script
93 Turning your script into a tool for others
94 Storing your tools in a module
95 Questions or comments?
96 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics 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.
Atempo, Inc. Booting Live Backup Disaster Recovery over the Network Using Windows Deployment Services to recover a Live Backup Client system over the network Date: March 2009 Author: Amy Gracer, Version:
RSA Authentication Manager 8.1 Help Desk Administrator s Guide Revision 1 Contact Information Go to the RSA corporate website for regional Customer Support telephone and fax numbers: www.emc.com/domains/rsa/index.htm
E-Mail Campaign Manager 2.0 Marketer's Guide Rev: 2014-06-11 E-Mail Campaign Manager 2.0 for Sitecore CMS 6.6 Marketer's Guide User guide for marketing analysts and business users Table of Contents Chapter
Departmental IT Staff (CatNet OU Admin) Guide to Exchange 2010 Submitted to: University of Arizona Prepared by: Table of Contents Active Directory... 4 Overview and Terminology... 4 CatNet Architecture...
Windows Firewall with Advanced Security Design Guide and Deployment Guide Microsoft Corporation Published: October 2008 Author: Dave Bishop Editor: Allyson Adley Reviewers: Bilal Aijazi, Boyd Benson, Shalaka
LogMeIn Backup Getting Started Guide Contents Getting Started with LogMeIn Backup...3 About LogMeIn Backup...3 How does LogMeIn Backup Work, at-a-glance?...3 About Security in LogMeIn Backup...3 LogMeIn
Basic System Administration ESX Server 3.0 and VirtualCenter 2.0 Basic System Administration Revision: 20090213 Item: VI-ENG-Q206-219 You can find the most up-to-date technical documentation at: http://www.vmware.com/support/pubs
SPSS Programming and Data Management, 3rd Edition A Guide for SPSS and SAS Users Raynald Levesque and SPSS Inc. For more information about SPSS software products, please visit our Web site at http://www.spss.com
VMware vcenter Update Manager Administration Guide vcenter Update Manager 4.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced
FileMaker Server 13 FileMaker Server Help 2010-2013 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and Bento are trademarks of FileMaker,
Ipswitch WhatsUp Professional and Premium Edition 2006 User s Guide Software Version 2 Ipswitch, Inc Ipswitch Inc. Web: HTTP://www.ipswitch.com 10 Maguire Rd, Suite 220 Phone: 781.676.5700 Lexington, MA
Dell NetVault Backup Plug-in for SQL Server 6.1 2014 Dell Inc. ALL RIGHTS RESERVED. This guide contains proprietary information protected by copyright. The software described in this guide is furnished
NetIQ AppManager for Cisco Intelligent Contact Management Management Guide February 2012 Legal Notice THIS DOCUMENT AND THE SOFTWARE DESCRIBED IN THIS DOCUMENT ARE FURNISHED UNDER AND ARE SUBJECT TO THE
Microsoft IT Academy E-Learning Central Getting Started Guide This guide provides an overview of the Microsoft IT Academy E-Learning Central site for Administrators, Instructors and Students 1 Table of
Pervasive PSQL v11 Advanced Operations Guide Procedures and References for Advanced Users Pervasive Software Inc. 12365 Riata Trace Parkway Building B Austin, TX 78727 USA Telephone: 512 231 6000 or 800
ESX Server 3.0 and VirtualCenter 2.0 Revision: 20060615 Item: VI-ENG-Q206-216 You can find the most up-to-date technical documentation at: http://www.vmware.com/support/pubs The VMware Web site also provides
NetVault : Backup Application Plugin Module (APM) for Exchange Server version 4.1 User s Guide MEG-101-4.1-EN-01 10/29/09 Copyrights NetVault: Backup APM for Exchange Server User s Guide Software Copyright
Windows Small Business Server 2003 Upgrade Best Practices Microsoft Corporation Published: May 2005 Version: 1 Abstract To ensure a successful upgrade from the Microsoft Windows Small Business Server 2003
by Rick Peterson Dale Weber Richard Odell Greg Leibfried AS/400 System Performance IBM Rochester Lab May 2000 Page 1 Table of Contents Introduction... Page 4 What is the Database Monitor for AS/400 tool?...
FileMaker Server 12 FileMaker Server Help 2010-2012 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker is a trademark of FileMaker, Inc.
Sugar Community Edition User Guide Version 5.2 Copyright Information Version 5.2, 2008 Copyright 2004-2008 SugarCRM Inc. www.sugarcrm.com This document is subject to change without notice 1. License This
About this document: Technical Support Usage Guide is written to educate and help customers in: Clarifying the extent of technical assistance extended to the customer in return for the Maintenance service
Product Overview for Windows Small Business Server 2011 December 2010 Abstract Microsoft offers Windows Small Business Servers as a business solution for small businesses by providing a simplified setup,