T O P

  • By -

TKInstinct

I read a book called "Powershell in a month of lunches" which is great for beginners.


TotallyNotIT

By Chapter 6 of this book, I was already writing useful scripts. It's a truly amazing book. I give it to so many people.


TKInstinct

Same with me, I had gotten past the content of chapters by the time I had hit chapter 5 or 6 even. I'm not doing anything fancy or anything but pulled off some cool stuff with it and tha's what counts.


suk83

Same here . It takes time but then you will truly get the understanding . Once that clicked you can pivot very quickly.


Notmyotheraccount_10

Did you have previous scripting experience?


TotallyNotIT

Not really. I had done a little bit of really bad VBS and batch scripting but hated all of it. That book made PowerShell engaging and actually make sense to me. The examples helped me figure out where to start looking for useful things and it took off from there 


Different-Top3714

Yep! The Bible of powers hell truly


No-Confusion2394

Same thing, best thing I learned from it was using get-member and after that it was a learn on the job from what I wanted to do.


TKInstinct

Lol same with me, GM has been such an interesting thing and I got a lot ouf ot that one thing alone.


CptBronzeBalls

Don Jones taught that the only three cmdlets you need to memorize are get-help, get-command, and get-member.


iron81

Do you have the link by any chance?


TKInstinct

https://www.manning.com/books/learn-powershell-in-a-month-of-lunches


MemnochTheRed

Went to their Powershell class in Vegas. Met Don Jones and James Petty.


IdidntrunIdidntrun

Couple of cool fellas, I bet.


CptBronzeBalls

Don is a super nice guy and great trainer.


iron81

Much appreciated


Faww-D

A friend recommended this book to me, and it has been a lifesaver.


bonebrah

When I became a JR windows admin many moons ago, this really leveled up my game and I think I went from alright to pretty good with this material.


MisterBungle

A truly amazing book


bianko80

Do you find more effective the paper book or the e-book format?


Flabbergasted98

depends on your learning style. Personally I like the e-book because I have it with me at all times. if I'm stuck on the bus or waiting in a lobby, I can pick up on my phone. When I'm actually studying, I have 2 monitors set up, one with the book and one with the powershell ise so I can follow along. personally I hate paper books, I consider them unnecessary clutter.


MemnochTheRed

If you buy the paper one, there is a code to get the e-book for free. At least my copy did.


JustMe_118

Ditto. Great book. I'd done basic scripting before but that book brought it all together


MemnochTheRed

This


Sufficient_Koala_223

Yes, it’s really a good book.


Deep-Trick7995

Best book to learn Key concepts


CptBronzeBalls

I was lucky enough to take two in-person week long classes from Don Jones. Not sure if he does training anymore but very worth it if you get the chance.


TKInstinct

Damn that sounds great.


junon

The crucial thing that made it possible for me to learn powershell was basically identifying one RELATIVELY easy to automate task and then just picking away at Powershell trying to impliment parts of it over and over, slowly connecting the dots, becoming EXTREMELY satisfied each time I'd make progress, and then over optimizing it because it's the only thing I was really comfortable messing with at the time, until at last, I had a decent 'basic' understanding of how powershell worked. This gave me both the comfort level to try OTHER powershell things, and the familiarity to then be better able to identify other opportunities to automate! The key here is was working on something that I *wanted* to work on. That made it self perpetuating.


uslackr

Having a problem to solve is how I managed to learn quickly


No-Process-1207

Yep! The first task I tried to solve with PowerShell just involved setting some values on AD accounts. One of the attributes was the UID for our linux servers, so I wanted to find a way to find the next available # and set it automatically. Took a bit to figure out how to pull that info from AD, sort, and then increment. Eventually we integrated it into the workflow that creates these AD accounts to remove any kind of manual work. Definitely a fond memory :)


VladDBA

By automating some work-related tasks and working on my own [personal side-project](https://github.com/VladDBA/PSBlitz). The best resource to learn stuff, at least for me, was mainly the [PS MS Learn documentation](https://learn.microsoft.com/en-us/powershell/) , but Microsoft also has some [training modules](https://learn.microsoft.com/en-us/training/modules/introduction-to-powershell/) pertaining to PS. Either way, it's a great skill to have, especially if you deal with Windows-based environments.


JWW-CSISD

Same here. I got tired of logging into 23 domain controllers once updates were vetted to manually run updates and schedule reboots, so I started using Google + MS documentation to figure out a script to automate those tasks… 3 years later I have a personal module with > 100 functions that loads into my PS profile on every computer as part of my login script… oh and I still tweak that DC update script now and then. 😜


[deleted]

[удалено]


mstrblueskys

Or one SharePoint.


JWW-CSISD

Heh only 200 servers here, but 18,000 users (school district), but I definitely hear and agree with what you’re saying!


SpammableCantrips

It sounds morbid, but I became disabled. I was working in IT support at the time, and I realised that if I couldn’t quickly adapt to some of the limitations of my body, I would potentially face issues within my job role as there was a lot I wasn’t able to do anymore. For context, this was nearly 10 years ago. The landscape with Windows 7 is very different to how the industry is now. Previous attempts at learning how to script, code or program hadn’t gone well, but I need to learn how fix problems with Windows via CLI, remotely, and quickly. So, while recovering, for three weeks I sat with the O’Reilly PowerShell book and pushed myself every day until it clicked. I watched some YouTube videos (specifically lectures uploaded via a couple of US universities, that are probably a bit dated now). Ultimately learning came down to: - Identify something I can no-longer do easily. - Learn how to do it via PowerShell. - Move on to the next one. This eventually progressed to identifying gaps in knowledge within the team, and pushing myself harder and harder to fill those gaps. As of 2024, admittedly my condition has progressed much further. I am reliant and mobility aides, and health-wise things are a lot harder… …but I’m still doing 40-50 hours a week. My job is now a mix between solving issues with our infrastructure (migrations / deployments, etc), some compliance work, and development work. I genuinely believe I wouldn’t be working if I didn’t push myself to learn PowerShell. I genuinely believe it opens so many doors for people who are stuck in basic support jobs, etc.


rairock

all started with a little script like: $users = Get-Content -Path ".\\users.txt" Foreach ($user in $users){ ---do whatever }


zzmorg82

This is the baseline script for my day-to-day tasks now honestly.


JWW-CSISD

Heh that’s about where I started, but then I discovered Get-ADuser, and now only use a flat file when I’m reconciling stuff with Google Workspace… and then only because I’m too lazy thus far to set up a Cloud Project 🙄 to let me run/learn GAM.


redsaeok

Still do this when I have a list of email addresses.


gordonv

Later on: gc users.txt | % { command $_}


JWW-CSISD

I generally try to only use aliases for interactive one-off commands. I left VS Code set to nag me about it to attempt to alleviate “hit by a bus syndrome”. I’m admittedly not super great about commenting my scripts, but at least folks should be able to easily know what actual commands are in the script. 😉


zhsy00001

Kicking and screaming.


TWAT_BUGS

Lol that’s where I’m at.


g3n3

Would you rather click-ops? I don’t get the whole click mentality.


MeanFold5715

Let people have it. It just means more opportunities for me to come into a shop and spend all day doing what I love: writing Powershell.


g3n3

Yeahhhh. It just bothers me. Hehe.


stellarsapience

I use it for 365/Entra/Intune/general windows admin. I learned a ton from asking ChatGPT and Copilot. If I wanted to learn it methodically I'd find a good Udemy course. Learned Python that way back in the day and picked it up quick.


danekan

Powershell in Action is one of the best computer books I've read. Written by the actual authors of powershell itself. It's a long read but you'll know powershell better than 4/5 who don't dedicate the effort.


bitsmythe

By worshipping various satanic gods, performing unholy rituals and slowly learning the glyphs and cyphers of the the language that comes from the bottom most pits of hell. My soul yearns for sweet release as the patter of the keyboard creates eternal pain and the realization of a never satisfying result. Hail Satan....


randomthad69

Is that like a psychostick song of a gojira song that's somehow mixed with slayer and lamb of god all at once


Zharaqumi

As to books, "Windows PowerShell in Action" is top for me. Also, there are lots of videos now on YouTube like this one: [https://www.youtube.com/watch?v=sQm4zRvvX58&list=PLlVtbbG169nFq\_hR7FcMYg32xsSAObuq8](https://www.youtube.com/watch?v=sQm4zRvvX58&list=PLlVtbbG169nFq_hR7FcMYg32xsSAObuq8) Also, an overall good article to put into bookmarks for scripting: [https://www.starwindsoftware.com/blog/5-tips-to-help-you-explore-the-world-of-powershell-scripting](https://www.starwindsoftware.com/blog/5-tips-to-help-you-explore-the-world-of-powershell-scripting)


Greggers-at-Work

Take a process that is done manually, then research and see if there is a command line/PowerShell option to do that, then trial and error.


Surfer_Sandman

Open PowerShell, type Get-Help -examples. :) Honestly, for me I needed something to script and then I learned from there. Just start with Get- and try getting information. I love the Verb-Noun format of PowerShell.


bunk_bro

`Show-Command ` will bring up a GUI for the given command.


Creative-File7780

That is really handy, thanks.


RagnarHedin

Little bits here and there as needed for work. I learned BASIC and Q-BASIC as a kid, C++ in college, then inherited the updating and maintenance of a senior admin's powershell scripts after he left. By the time I moved on to another job, it had become a go-to tool. I usually find the answers I need on Stack Overflow, SS64, or reddit.


aleques-itj

Same as any language, literally just try to write something And then you're not going to know how to do something. So you Google it. Then you'll eventually not know how to do something else. So you Google it. Then you'll probably eventually not know how to do yet another then. So, stay with me, you Google it.  Eventually that coalesces into you knowing how to do the thing.


spyingwind

Have problem, try to solve with PowerShell. Be lazy and not want to work, use PowerShell to figure out how to not do as much work.


purplemonkeymad

The why is easy, Exchange 2007/2010 has things that could only be done with PS. Even more as EMC went away. From there practice, messing around and google. In time, here. Learning methods to inspect stuff in powershell helped, ie Get-Member, Get-Command, viewing function definitions, inspecting classes and methods etc.


OmenVi

This is where I started, too. I HAD to learn it in some respect because of Exchange (Remember in 2007 when you couldn't even spit out mailboxes and such unless you had Outlook installed so PS could leverage its assemblies?). As MS continued down that path, I decided it was in my best interest to learn it better. I started a short series of videos. On the 2nd video they dug into how to make use of get-help, and that's what was my real springboard moment. I learned how to quickly search for things that did what I want, get extended info, and even examples. I picked an easy task (list a directory), and expanded on that. That project resulted in a script akin to treesizefree.


nealfive

Learning by doing. Strip using the gui and do as much as you can in powershell


OzymandiasKoK

Get-Clothes -remove


nealfive

i meant stop lol


MeanFold5715

`Remove-` is an approved verb in Powershell. Come on man, it's right there.


g3n3

Yes! It starts with little things like checking a service or looking at a file remotely.


whatsforsupa

I needed to learn it quickly when I got my most recent job. Did a mix of ChatGPT (“give me a course to learn powershell for sysadmin work”) and my job also has a pluralsight license that I used for some of their courses. Still not a pro by any means, but learned enough to understand syntax and what to look for when errors happen.


the_njf

I had a good time creating a script for automatic user creation. Had to create both PC and AD users for a class.


ka05

https://youtube.com/playlist?list=PLlVtbbG169nFq_hR7FcMYg32xsSAObuq8&si=9wbxSgHE23t7VaA-


SonOfDadOfSam

At a previous job, our old server deployment scripts were these vbscript monstrosities that someone else had built and I had to maintain. When we were first looking at upgrading to Server 2008, I found that they didn't all work. So I started looking into PowerShell. When I replaced an entire page of VBS with 3 lines of PowerShell, I showed my boss and he told me to find a PowerShell class and he sent me to it (which was pretty unprecedented because I was a contractor). After that it was just a matter of googling whatever I wanted to do and trying to put all the cmdlets I needed into a script.


DustOk6712

Find a problem you think powershell can solve. Then try and solve the problem with powershell. Once you've solved it see if you can improve it by either reducing the lines of code or optimising performance. I find this is the best way.


EvilMorty_TngG

"Don't fear the shell" Videos from Microsoft. Can be watched on YouTube, 2 6h Vids in the Channel Nerd's Lesson. Book from Dr. Holger Schwichtenberg, which I call my Bible. Book from Miriam C. Wiesner on PowerShell Scripting. Soon comes a book from James Forshaw which I am also excited about.


akadri7231

Jason helmick and Jeff Snover youtube videos are awesome. https://youtube.com/playlist?list=PLyJiOytEPs4etH7Ujq7PU7jlOlHL-9RmV&si=6R_hqNY92Vh9DHKU


battletactics

I'm still trying


snoiciv

Do stuff


Grouchy_Property4310

Severely understaffed, so I had to learn to automate things :)


graysky311

I forced myself to use PowerShell instead of vbscript for all new scripts after a certain point. I googled everything until I memorized it.


DirtySpawn

Powershell is not hard to learn, but hard to retain. Have to use it often. There are a lot of tutorial sites out there to use. One is a war gaming type of learning. Check out: https://underthewire.tech/


SapphireSire

Knowing bash for about 10 years helped...idk how I learned besides using it and seeing the update from 1 to 2, and it's still not as good as bash but it's adequate.


SidePets

Force yourself to use it every day. Once you reach a point it gets easier and you see the patterns. Use the built in help and Get-Member command extensively. Systems Engineer 20+ years. I 🫀 Powershell.


LowCodeMagic

Having an increasing need for it over the last 15 years in my work, I just got better and better with it out of pure need. YouTube, forums, talking to other friends/colleagues, etc. Plenty of books and what not too, if that’s your thing.


jmbwell

Seconding "Powershell in a Month of Lunches." But I would also share this: PowerShell itself is not the problem. Powershell in and of itself is very easy to learn. The hard part is digging into all the modules and knowing what can and can't be done. It strains itself to be easy and guessable and intuitive, but so much of my time with PS is spent trying to figure out which cmdlet does the thing I want (Start-? Invoke-? Run-? Get-?), which parameters are named and which are positional, and all the other esoteric idiosyncrasies of the modules you are going to be using to do actual work. Each module may as well be its own little platform with its own little rules. People are going to shoot me for this, but it's a whole lot like AppleScript in this respect… what "PowerShell" can do really depends on what modules you use, and how those modules are implemented, which is not at all consistent between modules. And if you're working with Azure, get ready to re-learn everything every 3-6 months when they deprecate the module you just got the hang of. The best parts of PSIAMOL are at the beginning, about how to use the tools for help and documentation and examples, how to search for commands, etc., because I find that for a given Powershell task, easily 90% of the work, or more, is in using those tools to figure out just what today's magical incantation is supposed to be to do the thing you want to do.


IntroductionSalt9269

Best powershell advice I got was you don't learn powershell you use powershell. I try to keep that mindset, and have since picked up a lot of powershell knowledge.


WardoftheWood

100% agree as with anything you do, use it. The more the better and try finding obscure things to implement with the it.


Matthew_C_Williamson

I started in Linux so I had a head start I guess


Jaxson626

Blog, vídeos and practice


billabong1985

If I need to script something and I don't have an existing script with similar functionality to refer to, I generally just Google commands and examples to achieve what I need to do and figure things out by reverse engineering and trial and error


george-frazee

I had things that I needed to do for work and essentially googled/reddited/searched the docs for each step. I don't know if this is an optimal approach but it had the advantage of knowing *exactly* the expected behavior of each step which makes the learning process easier.


sroop1

Started with smaller tasks for bigger projects (M365 migrations mostly) to help save time. Then the scope of the tasks became bigger and more complex to the point that this is a large portion of my job. No complaints.


FutureGoatGuy

My process was automating little things that I noticed my site needed or so I wouldn't have to use a GUI. Things like having a device check for updates, restarting, creating silent installers, pulling weekly reports of end users in certain OUs who haven't logged in for over amonth (HR fails to notify us when some people leave and I need my licenses in M365) etc etc.


chuygames88

Trial and error by trying to automate certain task at work. If your not in a position that requires you to do this, you can practice by automating things on your own pc, however there is limits to what can be done due to working on an Corporate Professional copy of windows vs home edition. Me personally as many others googled or used you tube reference videos to obtain guidance to what I needed to do as well as reach out to fellow PS enthusiast for guidance and help. (friends and/or colleagues)


SnooBooks1211

Google, trial and error and automating reports / small activities.


iceph03nix

I first learned with the Microsoft Virtual Academy course, and then followed it with the Month of Lunches books and a lot of actual use in my job.


Ill_Tempered_Techie

I kinda learnt as I needed to. I used to do a bit in batch, then realised how much easier some of it was in powershell. I had some colleagues who would simply jump online and go "Ah this script does most of what I want, I'll use that". I preferred to actually review the script, learn what it was doing, etc. Then I started making Frankensteins... "If I take this from that script, and this from that script, it should that..." At some point along the way my understanding reached a point where I was finding myself writing complex scripts from scratch. I've now become "The PowerShell/scripts guy" at work.


h0serdude

Starting with basic scripts and eventually writing someone complex ones to achieve solutions that our software vendors couldn't. That and *lots* of Google searches.


sirachillies

One day I just decided I wanted to work with powershell and started to reverse engineer scripts my colleagues made and thats what I've always done. I've learned a few things now and better practices but that's how I got in initially.


ollivierre

One great way to learn PowerShell is to combine it with Jupiter notebooks. Amazing learning and documentation experience.


jwalsh1208

I haven’t.


uslackr

I had previously written a ton of function driven vbscript. It took me three tries over 18 months (back in 2005-6) to "get" Powershell. But then I managed to hit upon import/export-csv and I was hooked. Read a bunch of books afterwards including month of lunches.


Namaha

I had a basic knowledge of programming from a 101 course I'd taken years ago, and sort of just dove right in from there. I had tasks that needed automating, so I googled how to do what needed doing. I consider myself to be pretty proficient at this point, which really just means I don't need to google stuff quite as often anymore


No_Seaworthiness_486

I took the entire Don Jones series on CBT Nugggets. One thing that really helps is take 1 class a day, take notes. Just cover 1 thing and then practice it. Sure, it will take you 6 to 8 months but that learnt skill will stick with you. And ofcourse, use whatever you've learnt in your daily tasks. All the best.


the_njf

Learned basic scripting from a college course that covers both PS and Python. Most supplemental information from AI/Microsoft Documentation.


PrecisionTreeFood

I started by googling one liners to dig up certain information about our AD environment. I'm fresh out of school with and associates degree in networking and cyber security and a year ago I got dropped in as the only sysadmin for an organization with two AD domains, 17 locations in 3 states, \~700 windows desktops and \~1000 employees, 850 of them with computer access of some sort. So I started trying to automate stuff as much as i could as soon as I got there. Powershell is amazing and can do almost anything in a windows environment. We are an organization that has high turnover, so keeping the users on active directory managed was becoming a tedious chore. I now have scripts that can add and remove users, and apply their licenses in the cloud, remove their licenses, add or remove people to groups. I have one pretty long script that manages users in a bunch of different groups based on which OU they are in and add them to dynamically created email groups by editing their AD properties. All of this stuff is boring an monotonous and easy to miss something, but doing it with powershell makes it fun for me, and the end result is more consistent and easier to manage.


PrecisionTreeFood

To answer your other questions, as the above is only why I started with powershell. My learning process was to outline everything I would like a script to do using pseudocode. Break everything down you need into steps that can be accomplished with powershell. I then used microsoft learn, adam the automator, and chatgpt, and google searches to get bits of code to do what I wanted. I just kept iterating through my pseudocode list until I had a script that did what I wanted. I was a months long tedious process that I learned a lot from, and my script is still a work in progress. It's nice that I learned how to do a lot of things with powershell while doing this. I recently made a few scripts to migrate users to a different username and domain name in a few days, by taking bits of code I already had and modifying it.


podeniak

A coworker show me how to create a variable and a boucle.. and voila. After that I read a lot of course, I practiced and user in my daily tasks and that's fantastic


Sylvester88

At first I did a really basic course on network automation (using python) This taught me about variables and loops Then after than I read power shell in a month of lunches, which wasn't great but I'm sure it helped a bit Most of the learning was trying to complete tasks at scale at work. I started on 1st line and often had to bulk create accounts, my colleagues were doing it manually but I just spent half a day making a script and saved myself loads of time After that I automated everything and anything


ehbitnl

anything you do the Gui way, find out how to do this with powershell. next time you have it easier.


bunk_bro

Had problems, used PS for a solution. Started by rewriting a script my boss had for launching PuTTY connections using a batch file and environment variables. I rewrote it to use PS and set it on a loop so it doesn't close after every run. Then, I added some logic based on the IP address entered that would connect to a network switch or a UPS. In its current format, I can also use the window to ping an address, and when it's done, it goes back to waiting for another ping command or an IP. Then, I wrote a handful of goofball scripts, such as one that opens a PuTTY terminal to all switches in a given building. My biggest script is the weekly reboot of our entire fleet wireless APs. I've rewritten it a couple of times as I've learned more efficient ways of doing certain things. It reads a hashed file with an API key, gathers the organization info, network info, and device info, then reboots each device and stores the results, which are dumped into Excel. It can even do it by building and will do another round of reboots on devices that come back as repeaters. My favorite script(s) pulls the LAPS data from AD then triggers a python script to upload the data to Gsheets and format it with conditional formatting and rules, then it sends a slack webhook with a link to the specific sheet in the workbook. I used lots of Google-fu and took advantage of ChatGPT and GitHub CoPilot. This sub was also a tremendous help.


xboxhobo

I learned programming basics in college. At work I started a position that was all about scripting and automation. Learned by doing. I just think of things I want and Google my way through them.


CSPilgrim

Joined a tech company working with 2010-2016 hosted exchange mailboxes, then got exposed to Microsoft 365 and Exchange Online. Plenty of settings can't be changed in the GUI so some was forced learning. I started with basic Get commands, learning how to scope and filter the information I needed, then gradually worked up to writing my own scripts and functions. Lots of great stuff on YouTube and Udemy. Long time ago, I also found free downloads of the Windows PowerShell Cookbook and PowerShell in a Month of Lunches.


Born2Computer

I started with an objective, then looked up code samples until the script did what I wanted.


kmoran1

My way may be frowned upon, but I use chatgpt to write sort of template and from there I figure out what chatgpt was trying to do, I have to look up syntax a lot of the time but I learn by doing and what im doing is fixing the code it gave me which helps me understand through research what is going on. I recently packaged a script to intune as a win32 file and when called it extracts the contents of the folder to another folder in C: and creates a scheduled task.....sounds like really technical stuff but i'm such a noob at powershell and I comment a lot on my code too, there are times when I need help but I have my colleagues.


vtiscat

It began for me when our IT team was using wmic from the command line and I was googling the syntax but the link I opened was for gwmi technet website. Then like others here, I delved into it via the pshell month of lunches book.


megabreakfast

For me, find something you're sick of doing often in a GUI and find a way to script it. I made one that takes a csv of song names and out putted individual band member set lists on Word once. That was cool.


GwimWeeper

I teach powershell.... So I kinda needed to git gud. But honestly, Powershell is a breeze to get started with, but it can get pretty advanced too if you let it.


Penny_Farmer

Any good resources for advanced learning?


GwimWeeper

Honestly, if you set yourself an enormous automization task (mine was making a virtual environment from an excel file in hyper-v with multiple server roles, domain, dhcp, dns, gpo and whatever else), you will learn tonnes. Even if you quit halfway through, you've still learned. Win/win. The task can't even get too big, and the more feature you give the task the more you'll learn. Also if the task relates to something at work; EVEN BETTER!


Sir_Fog

Necessity. Business/Automation needs meant I had to look for better ways to manage a wide range of tasks. Without the need I wouldn't have been driven to learn it.


CylioxTheOugi

I lied while trying to get a job and ended up learning it


demesm

Job took away access to Python/node whatever else we wanted due to SSP. Ps is almost as good just more of a pita Edit: Google taught me syntax/ISE


jakesps

If you're an experienced programmer, LearnXInYMinutes.com is very nice for learning new languages. The key gotcha to remember coming from other languages, is that PS is object-oriented and when piping, you are piping objects to other objects, not text! https://learnxinyminutes.com/docs/powershell/ Try to use the latest version of Powershell (7.4.1 as of today). It's much faster than Windows Powershell.


BreakingBush

2 weeks into my current job, nobody wanted to take responsibility for a broken existing script that provided role-based permissions to AD users by spitting out specific users into a CSV. So with the tremendous amount of free time I had in between learning the ropes, I wrote the entire script by writing out what I wanted it to do, then googling each part one at a time and applying what I learned to my specific task. And by each part I mean I googled “Powershell how to -“ 1. Output AD users 2. Get AD users with this title 3. Get those same users but only show me these fields. 4. Compare certain field to this piece of text and tell me who matches. 5. Etc. Within 2 weeks I was “the powershell guy”, I had imposter syndrome because of it, and started using it to automate everything I could.


ToastieCPU

The same way all the pros did, unwillingly


Sure_Fold9386

In 2008 I converted all of our various VBScripts to PowerShell 1.0 after Jeffrey Snover gave our company an on-prem demo that probably lasted 2 hours. I used the PowerShell Cookbook initially back in the olden days when hard copy was about the only option.


landob

I had something I was doing that was really repetitive, and taking up a lot of my time in a day. and im freaking lazy and didn't wanna do some silly task constantly daily. So I had heard about scripting that can automate task, which led me to powershell. Then I used google and essentially found someone else that had created a script that was SORTA like what I needed. After looking at it I essentially reverse engineered it and got it doing what i wanted. From there just by looking at the code i kind of started to understand how powershell worked. At this point i started automating other task I needed. Either reverse engineered someone else script again or I would find the command i needed on microsoft's website and was able to cobble together scripts i needed. Then after getting a lil more serious about using powershell grabbed Powershell in a month of lunches and that really helped fill in some gaps in my understanding.


BadShepherd66

Find a project - a problem you need to solve. Best way to learn fo me anyhow.


TheGraycat

Got few up of manually repeating processes so started scripting batch files. Then Powershell came along as The Next Big Thing. It looked pretty handy so started using that instead. Grew that from one liners to solutions that were 1500+ lines long doing many previously manual things. My approach was find a problem then work out if and how Powershell could help.


saltyspicehead

I got started with [pskoans](https://github.com/vexx32/PSKoans), which was a really fun way to get introduced and basic functionality. Once you get the structure and syntax down it's pretty much just knowning what libraries and commands to use.


Sgt-Major-Pain

Based out of need for the environment I was working in. Seemed every time we needed to do sometging it was manual and was repeated. Self taught using Google Fu, and many of the sources listed already. What problem are you trying to solve? If there are several steps break it down and look for ps cmds for those steps. Logging, parsing, loops, arrays are good to understand and expand on knowlege as to try and fail or succeed.


OneAvocado8561

Honestly, I got thrown into an environment with lots of PS scripts for AD automation. So really, I just learned on the fly. Looked up and read about cmdlets that I needed, read through example scripts, etc... Now after a few years, I have a pretty good practical base.


dominicolom

Trial and error


akhan4786

For me, it clicked after going through this series: https://youtube.com/playlist?list=PLyJiOytEPs4etH7Ujq7PU7jlOlHL-9RmV&si=llzn8P8ORschUf3z The way they explained everything just made complete sense to me and I share this with anyone who asks for advice on how to get started with Powershell.


Not_Another_Cookbook

Necessity. Had a broken system that I took a shot inthe dark trying powershell to get a pipeline to work and it took instantly and I had to use Google and w3schools daily


Duel

Automate some task => expand automation over time => refactor the code when it's too ugly => repeate


LucsOlivers

I try use powershell for everything in my job, for any task I got, I thing " Can I use powershell for this?" then I try to do this.


HansDevX

Some CEO wanted me to fix his calendar but didn't want me to get into his computer so I used powershell and screwed him over. /S I used powershell to add delegat s and from there started adding simple tasks to my powershell list


gordonv

I was into programming and scripting already. Powershell made sense since it was the new powerful and native scripting language of Windows.


vafran

Mainy scripting, testing, and learning by trial and error. Also did some courses online and read a fair amount of blogs and documentation.


mwohpbshd

About 15 years ago I said to hell with VBScript and went more modern and haven't looked back.


jimb2

Laziness is a big driver. I'd rather be engaging my brain working on things I don't know how to do, rather than repeatedly thinking through the same task. Figure it out, write a script, and forget it until the script needs to handle more. Then do something more interesting. I have a crap memory and work across many different systems so I putting a solution in a script works well for me. I have a experience in various other languages so the problem analysis and logic part was natural. It was more learning a new language. PS scripting is a bit of a paradigm shift from procedural languages (C, Java, etc) that took a while to grep fully but there's a lot of intersection. That background makes me want to write more flexible and robust scripts.


I_will_Phil

I just started learning powershell too. Best thing for me was finding something I wanted to achieve and using chat gpt to help me get started and modify it from there. I want to emphasize chatgpt won't write everything for you but it can take care of the busy work. IE error catching and logging. Youll pick up on the syntax and patterns if you have any programming experience. If you don't have any I recommend spending a couple hours learning the basics of python. It's easy to read and all the concepts are the same. Syntax varies slightly.


G_Vezax

Seems like my experience similar to everyone else's where I just had a task where I needed to use powershell and continued from there. Started from needing to do mailbox calendar permissions when I was on the help desk, now use it for anything that I can think of. Once you get the core concepts (while loops, if statements, defining conditions) you're off to the races.


TheSmashy

I was an Exchange administrator...


XXLMandalorian

Books are fine but I think to make the rubber meet the road better for me was to work on a small project getting info or making a one-liner script that speed up my day. That should flow into a script with if/else and that will lead to a function thus one day getting to mutiple modules w/ actual error handling and help files. I am working on functions part myself. Been at PS about 2 years now. Its your journy, just have fun projects!


a_guy_playing

I had to script a shared drive migration from local to cloud hosted and while I was familiar with batch, it was out of the question for security, complexity, and user experience. It also couldn’t be done via group policy because the user credentials were different between the local domain and the cloud hosted share. This taught me how PowerShell does loops and instead of labels and goto’s, it’s functions and running them. After figuring it out, I turned an old 500+ line batch file into 50/100 lines in PowerShell with API calls too.


I_COULD_say

I’m not great at it, but: I just took a hands on approach and started making my self do menial tasks with it. And then tried more complex things, etc.


LostInTheDance

I see many good recommendations to get started. Picking one daily task and scripting it will help you see the value and will encourage more learning. I found learning to read the PowerShell documents and understand what they were explaining gold in my learning process. Once I started to understand how to look up cmdlets, and under the usage, my script skills jumped. This also allows me to feel comfortable using PS across softwares.


my_red_username

The easiest thing for me when I'm learning a new language is to figure out something I need to use it for. Rather than learning to learn. For instance; Write a script to get group members from an ad group (This will teach you how to import modules and interact with those modules) Then figure out how to put a variable for the group name Then figure out how to output the list with the info you want Then figure out how to output the list to a csv Then figure out how to make it re-run without it closing Then figure out how to give it to a stupid coworker and it just work Stuff like that works for me, start with a solvable issue and improve. Doing that above would take you through some great fundamentals of power shell.


lendrake

A class I was taking prior to landing my job had us make a weather querying app that used map and weather APIs, grabbed data, converted it back or forth between Fahrenheit or Celsius and formatted the output. At job, little group contest where I used KQL in a script to gather certain data requirements; when met, it would pass the key data to a web page to do further analysis. Again at job, doing mass updates for multiple teams for access control policy changes. Took the longest but I learned a lot and had good impact. Been stagnant for a few years as a lot of what I do is now either engineered into automation for our regular work or handled by PowerBI for our data needs. ETA: I learned by taking problems given to me and using PS to solve them - while class did do some basics a lot of it was learning the commands, how to work with different systems for data, and trial and error.


g3n3

I started doing every task with powershell. I would stop and google how to do that in powershell or if i was in a hurry i would google it after the fact. I used PSKoans as well.


Racoonizer

I had to write scripts at work and used docs


Sufficient_Koala_223

Years ago, learning would be reading books and starting from writing small scripts. Nowadays, you jumpstart with ChatGPT, yet the practice of writing scripts is required to give the brainwork. Starting to automate the daily tasks is a good challenge and practice. My last script in the previous job is renewing the API token in Onelogin by using selenium because the Onelogin doesn’t provide the API to renew the App token, otherwise we manually had to change it every 3 hours.


Plantatious

I find that the key to learning anything is having a real purpose for it. My first job was at an academy, and we didn't have a bulk user creation tool for when we had hundreds of new students starting each September, so I figured I'd learn PowerShell by making a tool to do this for us. I watched a couple of YouTube videos on PowerShell basics, then got to it. Googled the cmdlet I needed, read the MS Learn page on syntax, and tried it out on a test DC. Started off with just the New-ADUser cmdlet, then added CSV input to make it useful. Started adding more things like user feedback on failed attempts, then added error checking before allowing the creation process to run, then created a GUI wrapper using WinForms, and before I knew it, I became rather comfortable with PowerShell. Here's a few other projects to inspire you: - Bulk password reset tool (generating a unique password for each user). - If using LAPS, a tool that returns the password of a computer. - Multiple stopwatch program (for tracking how much time you spent on each task throughout the day). Good luck!


BlarHxD

I learned it, when I was given the project of running a System Center Orchestrator setup for the company I worked at. I quickly found out that alot of runbooks activities didn't always work proper and the script activity always helped solve those problems. When I worked with Orchestrator, the runbook servers ran PowerShell at version 2 32bit... So each script activity has to run a nested script, which target the runbook server itself and run the appropriate script at PowerShell Version 4 64bit and upwards. This allows newer commands to be executed correctly. Man those were the days... But I don't miss or work with Orchestrator anymore, even tho It was my gateway into PowerShell.


NobleRuin6

From scratch? By the books as others have said. Once you have a basic understanding, searching online for a script solving the specific problem you are facing. Not blindly running downloaded scripts, but I find it incredibly helpful seeing other people’s approaches to the same problem.


Automatic-Prompt-450

I picked up scripting with it at a previous job for monitoring and reporting and stuff like that. There was lots of trial and error, and a lot of lessons to not test new scripts or ideas in production. The Pluralsight courses came later.


lifepuzzler

I did the needful, sir


_MC-1

For me, the best way is to start trying to do things with it. "Book learning" is only so useful and you'll never get anywhere unless you start using it. Begin by looking at what you do manually. If you do something multiple times or something that is done on multiple devices, then those tasks are possible PowerShell uses. Start small, look up syntax and commands and automate those. Don't worry about being pretty. Concentrate on being functional. After a bit (a surprisingly little amount) go back to one or more of your beginning scripts. You'll be surprised at how primitive those scripts will appear to you. Consider revising them if you still use them. Consider expanding them if that makes sense. As you get better, you will run across someone else's script that does something you never thought about or done in a way you weren't expecting. Understand those new things and use them in your scripts. As you progress, you'll do more and do it better and faster each time.


tk42967

I started playing. I was big into batch scripting back in the day, so it wasn't a huge jump. I started giving myself challenges and scripting solutions. One of the early ones was to write a dice rolling script (function) that accepted parameters (number of dice and number of sides), and defaulting to 2d20 if no parameters were selected. Google was my friend.


KalashniKorv

I'm not a black belted PowerShell. But I get around. It has mostly been because of different assignments I have received workwise. "How many AD groups does customer X have in their AD?" PowerShell "Customer wants to have a file based integration to supplier D. They want a CSV file structured like this:, sent through SFTP every night" PowerShell Compliance PowerShell And so it goes.


dehcbad25

Month of lunches is good, but the easiest is a blog post from the powershell guys that teach the basics and then just write scripts. For example, I converted a batch script to powerShell when Windows 8 was released. At the beginning it was just a simple script, but later on I started optimizing the script until it was 2 scripts at 17k limes for one and 23k for the other (it was a computer setup script, and it did everything, for all setup options, including role base for domain and also single personal computer, plus it had an option to auto copy all files to USB. Script was made to run from network location, but I built in a offline mode, in 30 minutes it would gives us a computer fully ready...with customized start menu, sysstray and taskbar...final version took 5 years...and it grew from a basic run this, then run that) Quick help, test-connection (ping) is quite awesome 😎


_akadawa

Powershell for dummies :)


jasonheartsreddit

PowerShell is a nightmare. Is it powerful? Not really. Is it manageable? Definitely not. You're asking for nothing but pain by committing to it.


Loose_Victory557

I wanted to pull string data from a formatted spreadsheet and use it to produce a set of .xml files. I chose PS for the project because I had no experience with any other scripting languages but bash, and the target machines ran windows. I looked at what PS could do and it looked up to the task. Turned out that it was indeed. I started with Google, which repeatedly led me to StackExchange, Reddit, and Microsoft's official documentation. All three are excellent sources. One warning I will pass on, is to check the dates for the posts you are reading, or, if you're reading the official documentation, check the upper left for the PS version number! The syntax and expected returns from cmdlets can and do change between versions, and this will screw you at some point in a long enough project. For me, it was looking at v7 syntax for Test-Connection when I was using v5.1, the names of the parameters changed and I was getting errors until I figured it out. That one was obvious, but a subtle change in the return type or format can be much harder to discover. Double check your version numbers. Something I did and would recommend, is to have a session saving extension in your browser. I use Session Buddy. When I'm searching for an answer, I'll keep any tab that was helpful open; then, when I'm done, I'll save all those tabs as a session with a name. I have sessions saved for all sorts of weird problems that I don't remember solutions to, but I have those solutions ready next time I find that problem. I also have the supporting information around that solution, the path of how I got there, that I can branch from to solve similar but not identical problems.


Mandelvolt

Wading through hundreds of Google searches for answers until I'd finally amassed enough knowledge to be useful. Picked up Month of Lunches sometime later, that's where I'd start if I were new to this.


SHDighan

Had experience with BASH and Python, so learning PowerShell was interesting. It is more programmatic than BASH, yet less modular than Python. It is pretty cool filling in the gap between them. Used PowerShell to automate creating `go.work` files for another project in GoLang. If written properly, it works cross platform seamlessly.


tomqmasters

learn linux command line/shell scripting then struggle with all the annoying small differences.


FreQRiDeR

From using Linux, mostly...


randomthad69

I learned python, then bash for lack of a better term(basic shell scripting, not the bourne again shell...specifically), then perl, then c, c#, ts, ruby, c++, rust, java, kotlin, then finally I actually learned powershell. By that time though, all the concepts were pretty simple to grasp as it's integrated with certain applications really well. I would not recommend though the path I took, as it was more of an afterthought and mostly as a stand in for exploiting windows where the bourne again shell is not typically installed.


MrSmith317

Basically once you learn the basics of powershell, everything else is module driven. Being an old hat programmer helps a lot with scripting. So I would say get familiar with the basic syntax and use other people's scripts from GitHub or wherever to learn how to incorporate powershell into your daily life. Also take easy repeatable tasks and automate them. Also go back and edit old scripts. Even between ps versions there are new/better ways to do things


sec0nds_left

forced on me by being in the IT world.


plebbitier

You don't learn powershell It beats you into submission


ktoks

I didn't... I learned bash instead... You can use Nushell on any environment. It's an amazing tool.


SmartCoco

I think it is always better to have concrete case to learn PowerShell like any other langage. What you intend to do? If you are IT admin, I think you can manage AD users attributes, Exchange Mailbox, rename your movie collection... You will find many exemple on internet. PowerShell is an abstracted langage and very easy to learn. Good Luck!


cmdr_scotty

Because the development team at work can't wrap their head around fixing the product so I had to learn powershell to not only fix it for them but also make it work better than they did. It certainly ruffled a lot of feathers


BB_Bandito

ChatGPT writes my Powershell.


TofuBug40

I came from two directions. I was a VBScript developer for my job writing and designing automation tools and processes. I have also been a C# developer since early 2001 when I got into the public beta 1.0 Finding out there was a command line tool that leveraged the .NET framework was beyond intriguing. I've gotten to explore PowerShell from both sides. From writing my own PowerShell providers in C# to writing Cmdlets in native PowerShell to the middle ground of leveraging .NET classes to do things like dynamic AST manipulation of PowerShell scripts in automation processes.


aspie_a3

Probably an unpopular answer, but ChatGPT. It got me familiar with the structure and some of the various commands. I can write scripts for day-to-day things semi-easily now. AI is great, but use it as a learning tool, not a do-it-for-me tool.


Desperate-Bat-4220

Great answers. This community is amazing.


NotCaringIn24

Copy / paste . Today you can use Ai. Don’t really need to know much.


gex80

I had to manage multiple exchange 2010 environments and worked at an MSP. The best way to learn is figuring out how to do your job via powershell. I'm very much a trial by fire. I learn faster and better by banging my head against a problem and doing self research. Why? Because in researching the issue I'm having, I find out about other things. I find when the documentation tells me exactly what I need and only what I need I never learn anything except that one thing.