PowerShell Jumpstart Series

Full Playlist:

https://www.youtube.com/watch?v=1r80mddOpok&list=PL-CiBNPRVIA2KhV94GXuIv2_nQGvyrkJs

Hi! This course is aimed at desktop support analysts or sysadmins looking to learn PowerShell. If you have no idea where to start, this is for you.

The series runs across 7 episodes, 1 hour of content in total. My suggestion is to watch an episode per week, practice the concepts, get curious and experiment (sensibly!).

This is not meant to be in-depth, but rather a starter catalyst to help you grasp basic concepts and start reading, understanding and building scripts. After completion, you should be able to know what to search for to build something useful until you make the time for an in-depth course. Think of it as piano lessons, you don't need to be Rachmaninoff, you can start by jamming along pop songs to keep you motivated during your learning and improvement path 😉 , just remember Uncle Ben's advice: "With great power, comes great electric bills…" …or something like that, I'm sure he learned a lot from selling rice food products.

In the last episode (Episode 7), we will take (mostly) everything we've covered and build a simple script to practice, after you're done, I'd like to challenge yourself and build an improved version. There's plenty of room, be it features, layout or best practices. If you are wondering how to achieve this, here are some suggestions off the top of my head:

  • Use dot sourcing (.\) or $PSScriptRoot
  • Use variables or functions for repetitive tasks
  • Use cmdlet binding and parameters for the functions "[cmdletbinding()] param()"
  • Use alternatives to Write-Host: e.g. Write-Progress to display a progress bar
  • Output the file with Export-CSV instead of a text file etc
  • Add parallel processing

Useful resources:

https://www.howtogeek.com/141495/geek-school-writing-your-first-full-powershell-script/
https://www.windowscentral.com/how-create-and-run-your-first-powershell-script-file-windows-10
https://practical365.com/exchange-server/walk-building-new-powershell-script/
https://martin77s.wordpress.com/2014/06/17/powershell-scripting-best-practices/
http://powershell-guru.com/

Remember it's not only about adding or replacing features, I strongly suggest you also have a look at the best practices to improve this script.
Don't be afraid to break it, play around with it and see what you come up with. Happy learning!

DISCLAIMERS:
*No puppies were harmed during the use of "Write Host"
*"Write-Host" was used for educational purposes only

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.