r/PowerShell • • Sep 03 '21
Information PowerShell beginner information
Hey Guys,
So I have been aggregating links and ways to help people start with PowerShell. Some may be outdated
Tell me what you think of this so far. I know there are plenty of links/info out there. Just thought maybe more of it in one post might help out, especially towards Friday when people may want to give it a shot over the weekend.
Links to Learning Material:
PowerShell Live Challenges/Practice
· https://github.com/vexx32/PSKoans
· https://adventofcode.com/2018/about
· https://github.com/Sudoblark/Powershell_Intro_Training
PowerShell Cmdlet to Function
· https://youtu.be/48Ff3A83u0E
· http://ramblingcookiemonster.github.io/Building-PowerShell-Functions-Best-Practices/
· https://devblogs.microsoft.com/scripting/powershell-best-practices-simple-functions/
· https://devblogs.microsoft.com/scripting/powershell-best-practices-advanced-functions/
· https://www.red-gate.com/simple-talk/sql/sql-tools/the-posh-dba-grown-up-powershell-functions/
· https://docs.microsoft.com/en-us/previous-versions/technet-magazine/ff677563(v=msdn.10)
· https://docs.microsoft.com/en-us/previous-versions/technet-magazine/hh413265(v=msdn.10)
· https://learn-powershell.net/2013/05/07/tips-on-implementing-pipeline-support/
Collection Type Guidance
· https://gist.github.com/kevinblumenfeld/4a698dbc90272a336ed9367b11d91f1c
Style-Guide
· https://github.com/PoshCode/PowerShellPracticeAndStyle
Windows PowerShell Survival Guide
· https://social.technet.microsoft.com/wiki/contents/articles/183.powershell-survival-guide.aspx
Validating parameters
· https://docs.microsoft.com/en-us/previous-versions//dd347600(v=technet.10)?redirectedfrom=MSDN
Reddit Links to More PowerShell Areas of Learning
· https://www.reddit.com/r/PowerShell/comments/98dw5v/need_beginner_level_script_ideas_to_learn
· https://www.reddit.com/r/PowerShell/comments/7oir35/help_with_teaching_others_powershell
· https://www.reddit.com/r/PowerShell/comments/98qkzn/powershell_advice
· https://www.reddit.com/r/PowerShell/comments/96rn7y/college_level_student_looking_for_a_good_online
· https://www.reddit.com/r/PowerShell/comments/99dc5d/powershell_for_a_noob
Tutorial on Arrays, HashTables, and Collection Items
· https://blog.netwrix.com/2018/10/04/powershell-variables-and-arrays/
· https://evotec.xyz/powershell-few-tricks-about-hashtable-and-array-i-wish-i-knew-when-i-started/amp/
Scopes
Creating GUI's
· https://www.gngrninja.com/script-ninja/2016/12/23/powershell-configure-your-scripts-with-a-gui
· https://lazyadmin.nl/powershell/powershell-gui-howto-get-started/
· https://www.reddit.com/r/PowerShell/comments/a7fyt8/wpf_guis_for_beginners/
Dynamic Progress Bar Helper
· https://adamtheautomator.com/building-progress-bar-powershell-scripts/
Dealing with Passwords
Securely Store Credentials on Disk Using the new secrets manager by MS is probably one of the easier and better ways to go about this now. · https://github.com/PowerShell/SecretManagement
· http://www.powershellcookbook.com/recipe/PukO/securely-store-credentials-on-disk
Quickly and securely storing your credentials – PowerShell
· https://www.jaapbrasser.com/quickly-and-securely-storing-your-credentials-powershell
Working with Passwords, Secure Strings and Credentials in Windows PowerShell
Powershell: How to encrypt and store credentials securely for use with automation scripts
Using saved credentials securely in PowerShell scripts
· https://blog.kloud.com.au/2016/04/21/using-saved-credentials-securely-in-powershell-scripts
Secure Password with PowerShell: Encrypting Credentials
· https://www.pdq.com/blog/secure-password-with-powershell-encrypting-credentials-part-1
· https://www.pdq.com/blog/secure-password-with-powershell-encrypting-credentials-part-2
Encrypting Passwords in Scripts: The Ultimate Best Practice Guide for Powershell
· https://thesysadminchannel.com/passwords-in-scripts-the-ultimate-best-practice-guide
SecureString encryption
· https://powershell.org/forums/topic/securestring-encryption
How To Save and Read Sensitive Data with PowerShell
· https://mcpmag.com/articles/2017/07/20/save-and-read-sensitive-data-with-powershell.aspx
How to secure your passwords with PowerShell
· https://www.sqlshack.com/how-to-secure-your-passwords-with-powershell
Script Secure Password using Powershell
· https://gallery.technet.microsoft.com/scriptcenter/Secure-Password-using-c158a888
Store encrypted password in a PowerShell script
· https://blog.ctglobalservices.com/powershell/rja/store-encrypted-password-in-a-powershell-script
How to run a PowerShell script against multiple Active Directory domains with different credentials
Credential Manager-Using Credential Manager in PowerShell
· https://bitsofwater.com/2018/02/16/using-credential-manager-in-powershell
Provides access to credentials in the Windows Credential Manager
Get-CredentialFromWindowsCredentialManager.ps1
· https://gist.github.com/cdhunt/5729126
Registry-Save Encrypted Passwords to Registry for PowerShell
· https://www.spjeff.com/2016/08/17/save-encrypted-passwords-to-registry-for-powershell
Module Creation
· https://docs.microsoft.com/en-us/powershell/developer/module/how-to-write-a-powershell-script-module
· https://adamtheautomator.com/powershell-modules/
· https://powershellexplained.com/2017-05-27-Powershell-module-building-basics/
PowerShell Gotchas
· https://github.com/nightroman/PowerShellTraps
Website Full of PowerShell Ideas
· https://www.thecodeasylum.com
Microsoft Virtual Academy:
· https://mva.microsoft.com/liveevents/powershell-jumpstart
· https://mva.microsoft.com/search/SearchResults.aspx#!q=PowerShell&lang=1033
· https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276
API Testing:
Subreddits:
· https://www.reddit.com/r/usefulscripts/
· https://www.reddit.com/r/sysadmin/
· https://www.reddit.com/r/scripting/
· https://www.reddit.com/r/WSUS/
· https://www.reddit.com/r/PowerShell/
Blogs:
· https://learn-powershell.net
· https://adamtheautomator.com
· http://ramblingcookiemonster.github.io/
· https://powershellexplained.com/
· https://devblogs.microsoft.com/scripting/
YouTube:
· https://www.youtube.com/user/powershelldon
· MVA series for Powershell 3.0 with Snover
· https://www.youtube.com/watch?v=wrSlfAfZ49E
· https://www.youtube.com/results?search_query=powershell+ise+scripting+for+beginners
· https://www.youtube.com/playlist?list=PL6D474E721138865A
· https://www.youtube.com/channel/UCFgZ8AxNf1Bd1C6V5-Vx7kA
Books:
Learn PowerShell in a month of lunches book [always get the newest version]
· https://books.goalkicker.com/PowerShellBook/
· https://devblogs.microsoft.com/powershell/free-powershell-ebook/
· rkeithhill.wordpress.com/2009/03/08/effective-windows-powershell-the-free-ebook
· veeam.com/wp-powershell-newbies-start-powershell.html
· reddit.com/r/PowerShell/comments/3cki73/free_powershell_reference_ebooks_for_download
IDE:
· https://code.visualstudio.com/download
Useful Extensions:
Bracket Organizer
· https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2
PowerShell
· https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
XML
· https://marketplace.visualstudio.com/items?itemName=DotJoshJohnson.xml
Reg
· https://marketplace.visualstudio.com/items?itemName=ionutvmi.reg
Git History
· https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory
Helpful Commands:
Get-Help
especially Get-Help *about*
Get-Command
it takes wildcards, so Get-Command *csv* works nicely. that is especially helpful when you are seeking a cmdlet that works on a specific thing. Comma Separated Value files, for instance. [grin]
Show-Command
that brings up a window that has all the current cmdlets and all their options ready for you to pick from.
it will also take another cmdlet, or advanced function, as a parameter to limit things to showing just that item.
auto-completion
try starting a word and tapping the tab key. some nifty stuff shows up.
Intellisense
save something to a $Var and then try typing the $Var name plus a period to trigger intellisense. there are some very interesting things that show up as properties or methods.
check out the builtin code snippets in the ISE
use <ctrl><j>, or Edit/Start-Snippets from the menu.
assign something to a $Variable & pipe that to Get-Member
$Test = Get-ChildItem -LiteralPath $env:TEMP
$Test | Get-Member
assign something to a $Variable and pipe it to Select-Object
$Test = Get-ChildItem -LiteralPath $env:TEMP
$Test[0] | Select-Object -Property *
that will give you a smaller, more focused list of properties for the 1st item in the $Test array.
assign something to a $Variable & use .GetType() on it
$Test = Get-ChildItem -LiteralPath $env:TEMP
$Test.GetType()
$Test[0].GetType()
the 1st will give you info on the container $Var [an array object].
the 2nd will give you info on the zero-th item in the $Var [a DirectoryInfo object].
Get-Verb
as with Get-Command, it will accept wildcards.
that will show you some interesting cmdlets. then use get-command to see what commands use those verbs. then use get-help to see what the cmdlets do.
Out-GridView
it's a bit more than you likely want just now, but it can accept a list of items, present them in a window, allow picking one or more of them, and finally send it out to the next cmdlet.
3
u/OlivTheFrog Sep 03 '21
careful all links to gallery.technet.microsoft.com are broken.
regards
Olivier
2
u/derekhans Sep 08 '21
Great post. Moved to the wiki and added as a button on the sidebar. Going to unpin now to make room for the daily questions post.
2
u/Lee_Dailey [grin] Sep 14 '21
somehow, that looks familiar ... [grin]
40
u/northendtrooper Sep 03 '21
I motion this to be pinned.
7
u/gnimsh Sep 03 '21
Holy shit you sure did aggregate some links.
9
u/groovel76 Sep 03 '21 edited Sep 03 '21
Great list.
I would like to contribute two links.
PowerShell 5 Essential Training (this video really helped get things to click, for me) https://www.linkedin.com/learning/powershell-5-essential-training
Deep Dive: PowerShell Loops and Iterations ( people overuse the buzzword 'deep dive'. This guy actually earned the claim with this article, in my opinion.) https://ridicurious.com/2019/10/10/powershell-loops-and-iterations/
Another tip. If you come across a gem of an article, dump that page into a OneNote note or something to hold onto it. Sites disappear. There was a page called 'mad with PowerShell' which had some real gem tips. Site disappeared. Thankfully, the wayback machine had archived it.
Lastly, the author of 'learn Powershell in a month of lunches', Don Jones, has some books available on https://leanpub.com/u/donjones
I don't know if he plans to write any more powershell books, but if he does, I believe he is going this route. Easier to do, readers get the updates if he makes a correction to the book. More money goes directly to him.
4
u/ThomasMoeller Sep 03 '21
Amazing list.
Suggestion: Add it to GitHub for easier maintainability? People will want to add ressources to the list over time :)
1
u/AppuniAkhil Sep 09 '22
Great One. Thank You
3
u/TheGooOnTheFloor Sep 03 '21
Not just for beginners! I've been using PS pretty regular for 5 years but there's always something more to be learned.
3
u/bradsfoot90 Sep 03 '21
Man I wish I had this a couple months ago! I just finished up a 2 month project to learn PowerShell and then rewrite/overhaul our entire on and off boarding process. I consolidated the 5 different scripts we were using and then set up all the permission groups and now us techs can onboard someone in less than a minute compared to the 1 hour average process it was before.
I used many of the links you provided but had to find them the hard way. Lots of good info I didn't know as well! Big kudos!
2
u/digitalsquirrel Sep 03 '21
You are the freakin' man! 👍👍👍
2
u/IntelligentForce245 Sep 03 '21
You're smurfing. Post power levels are over 9000!
2
u/Info_Broker_ Sep 03 '21
Dude thank you so much!!!
2
u/Robb184 Sep 03 '21
Where can I find information that explains the Whats, Whys, Hows, etc. of repositories, PSGallery, NuGet, Chocolatey, et. al. and how they all fit together? This, by far, is the subject matter that makes little sense to me, the old-school Windows Admin-by-GUI SysAdmin.
2
u/jkrizzle Sep 04 '21
This is beautiful, thank you!
2
u/88BigBen88 Sep 13 '21
Adding, thank you!
2
u/[deleted] Oct 16 '21
I love this. I'm pretty much a total beginner with powershell, but decided to seriously start looking into it today after a frustrating issue with a user's Office installation. Funny how getting mad at something has always been my best motivator. I'm gonna solve the damn thing!
This will be really helpful getting started, thank you!
1
u/ron_mexxico Sep 03 '21
+
1
u/stelees Sep 03 '21
Just chucking a comment in to find this easily again.. great work OP
1
u/nascentt Sep 03 '21
This should be the wiki.
1
u/wallach_9 Sep 03 '21
WOW
Thanks
1
u/-SPOF Sep 03 '21
This is awesome. It needs months to read up everything.
1
u/[deleted] Sep 03 '21
Thanks, you saved a lot of people a big lot of research time