Successfully reported this slideshow.

Meet Windows PowerShell

1,108 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Meet Windows PowerShell

  1. 1. Meet windows powershell!<br />(no matter who you are)<br />
  2. 2. This slide deck was used in one of our many conference presentations. We hope you enjoy it, and invite you to use it within your own organization however you like.<br />For more information on our company, including information on private classes and upcoming conference appearances, please visit our Web site, www.ConcentratedTech.com. <br />For links to newly-posted decks, follow us on Twitter:@concentrateddon or @concentratdgreg<br />This work is copyright ©Concentrated Technology, LLC<br />
  3. 3. introductions<br />Don Jones<br />Senior Partner and Principal Technologist, Concentrated Technologywww.ConcentratedTech.com<br />Windows PowerShell MVP Award Recipient<br />Blogger at WindowsITPro.com<br />Columnist for Microsoft TechNet Magazine and Redmond Magazinewww.TechNetMagazine.com • www.RedmondMag.com<br />Windows PowerShell instructor and enthusiast<br />
  4. 4. Learn Windows PowerShell in a Month of Lunches<br />Also available: Companion DVD and Web siteMoreLunches.com<br />Get the book!<br />You can order an autographed version when we’re done today, and it’ll be shipped right to you in about a week<br />
  5. 5. Memes we’ll cover<br />What is PowerShell, and Why Should You Care?<br />PowerShell: Command-Line Interface or Scripting Language?<br />PowerShell Patterns and Practices(Learn these and you’ll never need another class)<br />Turning Commands into Reusable Tools<br />
  6. 6. Our goal<br />To expose you to many of PowerShell’s core patterns and practices<br />With this information, you can start to “figure out” PowerShell largely on your own!<br />This is definitely a “crash course,” so prepare your airbags for rapid deployment<br />We will be covering a good amount of material very quickly – the goal is to give you an idea of what PowerShell does and how it does it, not to make you an expert<br />If you’d like a somewhat slower-paced, methodical introduction… Learn Windows PowerShell in a Month of Lunches!Or consider an instructor-led class (MOC 10325A or have me on-site)<br />
  7. 7. Before we get started…<br />Ask Questions!<br />Challenge Assumptions!<br />Share Your Experiences!<br />This is going to mostly involve demos, not slides. You can get a recorded full-day workshop on DVD from http://ConcentratedTech.com/DVDGoPack.php if you miss anything or need a reminder<br />If you lose any of the URLs, just visit ShellHub.com – I have them all listed there<br />This deck is downloadable at ConcentratedTech.com/download<br />
  8. 8. What is Windows PowerShell, and Why Should You Care?<br />
  9. 9. The strategic outlook<br />Microsoft produced PowerShell because of customer demand for better administrative automation capabilities.<br />In other words, management cares about efficiency. Who knew?<br />Learn PowerShell = Be Efficient = Keep Job<br />Ignore PowerShell = Keep Clicking Through Dialog Boxes = Fries With That?<br />
  10. 10. System requirements<br />Windows 7 / Windows Server 2008 R2 (incl Core): Installed by default<br />Windows Vista / Windows Server 2008: Has v1; Needs v2<br />Windows XP / Windows Server 2003: Has nothing, Needs v2<br />Requires .NET Framework v2 (v3.51 is better; can live side by side with v4)<br />To get PowerShell v2: Search for “Download Management Framework Core”<br />
  11. 11. Caution / gotcha alert<br />On 64-bit operating systems, you get four PowerShells:<br /><ul><li>Console and ISE in 64-bit form
  12. 12. Console and ISE in 32-bit form - window says “(x86”)</li></ul>Shell extensions can only run in a matching architecture (e.g., 32-bit extension runs in x86 shell). Don’t mess this up.<br />Also make sure window title bar says “Administrator,” or you aren’t administrator.<br />
  13. 13. Is it a CLI?<br />Or a Scripting Language?<br />Hint: If you can run Dir | More,you can use PowerShell.<br />
  14. 14. Really, it’s this easy<br />Get-Mailbox | Sort Size –descending | Select –first 100 | Move-Mailbox –Server FOO<br />Ok, that isn’t the 100% syntax… but it’s close, and it gives you an idea of what PowerShell is. Sure, you can treat it like a VBScript replacement… but isn’t this much more cool?<br />The tricky bit is that different audiences tend to approach PowerShell in different ways. Scripters use it to write scripts. Devs use it like “C# lite.” Admins shouldn’t be distracted by those approaches if they’re not appropriate – use it like a shell.<br />
  15. 15. Let the demos begin<br />Enough with the slides. Let’s do this.<br />Start thinking: What would you like to be able to do in Windows PowerShell?Ask me how – I’ll at least tell you, and if I can, I’ll show you. Right now.<br />
  16. 16. Patterns and practices<br />Finding commands by using Help and Get-Command<br />Loading new commands (extending the shell)<br />Cmdlet naming conventions<br />Why (almost) everything is a disk drive<br />Parameters and Interpreting the Help<br />Core cmdlets: Sorting, Filtering, Selecting, and More<br />Pipeline Parameter Binding (ByValue and ByPropertyName)<br />Working with Windows Management Instrumentation<br />Adding custom columns (properties)<br />Ways of feeding computer names to a –computerName parameter<br />
  17. 17. Building reusable tools<br />While cmdlets are written in C# or Visual Basic…<br />…you can do something awfully close in an advanced function using PowerShell’s scripting language<br />Let’s take a fairly simple pair of commands and turn them into the ultimate re-usable tool, all from scratch. We’ll inventory OS, service back, and BIOS information from multiple computers<br />Then we’ll do it with a command that clears the application log on one or more computers – and implements some more PowerShell patterns and best practices<br />
  18. 18. summary<br />Start learning PowerShell. Find a task to automate and dive right in.<br />Focus on patterns and practices to teach yourself.<br />We really did cover a lot of stuff, didn’t we?<br />
  19. 19. Thank you!<br />Thanks to all the local folks who helped make this seminar happen…<br />…and thanks to Microsoft IT Pro Evangelist Harold Wong, who had the idea!<br />Remember, you can get this deck at ConcentratedTech.com/download<br />Any last questions????<br />
  20. 20. Learn Windows PowerShell in a Month of Lunches<br />Also available: Companion DVD and Web siteMoreLunches.com<br />Remember!<br />You can order an autographed version today, and it’ll be shipped right to you in about a week!<br />
  21. 21. My contact information<br />Q&A: http://connect.ConcentratedTech.com<br />Twitter: @concentrateddon<br />LinkedIn: http://linkedin.com/in/concentratedDon<br />Or send a text message containing DONJ to 50500 – you’ll get a reply with my contact info and a vCard link<br />Private On-Site Training Available – contact sales@concentratedtech.com.Flat-rate pricing includes travel expenses (3-5 day classes)<br />Get this deck from ConcentratedTech.com/download<br />Look for “Jones-2011WestCoastTour.zip”<br />
  22. 22. Go forth and shell!<br />(before v3 comes out and adds a bunch of stuff)<br />
  23. 23. This slide deck was used in one of our many conference presentations. We hope you enjoy it, and invite you to use it within your own organization however you like.<br />For more information on our company, including information on private classes and upcoming conference appearances, please visit our Web site, www.ConcentratedTech.com. <br />For links to newly-posted decks, follow us on Twitter:@concentrateddon or @concentratdgreg<br />This work is copyright ©Concentrated Technology, LLC<br />

×