Presentation is loading. Please wait.

Presentation is loading. Please wait.

Windows PowerShell Crash Course

Similar presentations


Presentation on theme: "Windows PowerShell Crash Course"— Presentation transcript:

1 Windows PowerShell Crash Course
4/14/2019 9:40 PM WSV321_R Windows PowerShell Crash Course Don Jones • Concentrated Technology Jeffrey Snover • Microsoft © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

2 Welcome! We’re here to get you up and running with PowerShell – as quickly as possible. 99% of what you’ll see applies to v2 and v3; we’ll point out some specific v3 coolness as we go Please ask questions as we go, although we are on a tight schedule, so some stuff we may need to pick up at the end.

3 Quick Introductions Don Jones Jeffrey Snover
PowerShell MVP Award Recipient PowerShell columnist for TechNet Magazine Author, Learn Windows PowerShell in a Month of Lunches and PowerShell in Depth (forthcoming) Jeffrey Snover Distinguished Engineer in the Windows Server team Inventor of Windows PowerShell

4 Let’s Begin! PowerShell is a command-line interface (CLI)…
…that contains a rich, yet simplified scripting language for automating complex, multi-step tasks Built on the .NET Framework Extensible, so various products and technologies can be managed by “snapping in” tech-specific extensions Most importantly… it’s discoverable! It can teach you how to use itself!

5 Letting PowerShell Teach You How to Use PowerShell
The Help System, Modules, and More

6 The Pipeline PowerShell has an extremely powerful pipeline that works unlike anything that’s really been done before It carries the output of one command to the input of the next… but it does so in an amazingly flexible way If you can master the pipeline (and the help system helps!)

7 The PowerShell Pipeline
ByValue. ByPropertyName, and ByJoveThatsAmazing

8 Speaking of CIM… PowerShell remains the most effective way to access Windows Management Instrumentation, which provides a wealth of management information V2 and v3 both have the “WMI” cmdlets, which utilize the old-school DCOM/RPC protocol for communications V3 Introduces “CIM” cmdlets, which use the same WMI back-end info repository, but communicate over WS-MAN

9 (And why WS-MAN is your new best friend)
WMI and CIM (And why WS-MAN is your new best friend)

10 And oh, You WANT WS-MAN! First, it’s auto-enabled in Windows Server 2012 It’s also the basis for PowerShell’s awesome-est feature, Remoting We’ll do a quick Remoting demo, but Don has an entire “Remoting in Depth” session that you just gotta check out.

11 PowerShell Remoting and WS-MAN

12 Objects You may have heard that PowerShell is an object-oriented shell
People make a big deal of this because it enables a lot… but conceptually it’s pretty simple Ever see an Excel spreadsheet? It’s just a data structure, right? Well, that’s all objects are. Data structures, in memory. Every PowerShell command (well, most) produces objects… and PowerShell will even show you everything about them

13 Object-Oriented Shell
It’s all just data!

14 But You Know… Not every technology lends itself well to a static set of predefined commands Take IIS, or SQL Server, or anything else that’s extensible. How do you know what commands admins will need when you don’t even know everything that might be added into the product? The answer: Providers. PowerShell providers can make any storage – even configuration stores – look like a disk drive. You get to use familiar commands with them!

15 PSProviders and PSDrives
Adapting storage to look like a file system

16 Lots of Smarts PowerShell includes a full set of comparison operators that, combined with a filtering cmdlet, let you remove things from the pipeline. It’s what’s left at the end of the pipeline that gets displayed.

17 Comparing and Filtering
Help about_comparison_operators is your friend!

18 Hate Syntax? Yeah, it’s harder than clicking buttons in a GUI.
And in large part you can still use a GUI if you want to, even though it may just be running PowerShell commands under the hood. But think about where companies are headed… and think about your value to your organization.

19 Would You Rather be a Button Monkey… or a ToolMaker?
If you do something more than once… automate it. PowerShell finally gives us a way to do that.

20 Become a ToolMaker Not a Button Monkey!

21 More Fun Tips Why “cmdlet?” Formatting? Make it the last thing you do.
Neat tricks with double quotes. Why you should avoid Write-Host

22 Formatting, Quotes, and How to Really Write
Last Quick Tips Formatting, Quotes, and How to Really Write

23 Contact Info for Follow-Ups Don: @concentrateddon on Twitter for online Q&A Learn Windows PowerShell in a Month of Lunches – get it anywhere or in the TechEd Bookstore! Jeffrey: @jsnover on Twitter Blogs:

24 Related Content WCL404: Building Reusable CLI and GUI Tools in PowerShell WSV07-TLC: Windows Server 2012 Server Manager and PowerShell DBI331: The Dirty Dozen: PowerShell Scripts for the Busy DBA SIA404: Deep Dive on Windows Server Active Directory Shell Find Me Later At “The Scripting Guys” pod in the Expo Hall!

25 SIA, WSV, and VIR Track Resources
#TEWSV321 Talk to our Experts at the TLC Hands-On Labs DOWNLOAD Windows Server 2012 Release Candidate microsoft.com/windowsserver DOWNLOAD Microsoft System Center 2012 Evaluation microsoft.com/systemcenter

26 Resources Learning TechNet http://europe.msteched.com
Connect. Share. Discuss. Microsoft Certification & Training Resources TechNet Resources for IT Professionals Resources for Developers

27 Submit your evals online
4/14/2019 9:40 PM Evaluations Submit your evals online © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

28 4/14/2019 9:40 PM © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

29 4/14/2019 9:40 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.


Download ppt "Windows PowerShell Crash Course"

Similar presentations


Ads by Google