r/PowerShell • • Feb 15 '24

Question Is it too late to start learning PowerShell?

I am almost 18 years into my career with IT support and services. I have tried learning PS in the past but never really managed to continue it for long, always something interrupted it. I understand how PS scripting makes automation so easy. Is it too late to get started to learn PS scripting now? Will it be of any help by the time I even get a hang of it?

75 Upvotes

195 comments sorted by

252

u/[deleted] Feb 15 '24

Yes, it takes 63 years to learn PowerShell. You have to start from birth. You get to write one good script in your life, and then you have to die afterward.

25

u/Accomplished-Dog4533 Feb 15 '24

That was encouraging :)

71

u/[deleted] Feb 15 '24

Seriously man, I write PowerShell every day for my job. I tried to "learn" PowerShell for years and couldn't get a handle on it and felt like a hack fraud. Now I'm great at it. It turns out you learn things that you actually use. If you can find a way to use PowerShell at work you will learn it. If you just try to learn it from a book or by writing 1 thing in PowerShell a year you're probably not going to learn.

A great place to start is with automating user creation in active directory. You will learn a ton just trying to get that off the ground. It's a great excersise because it will cover a lot of areas, you'll have to customize it to be specific to you, and there's no one right way to do it.

13

u/Accomplished-Dog4533 Feb 15 '24

Yup, i suppose that has been the case with me. I try to learn by the book and when I need to use it for my work environment, I have no clue how to even get started. Thanks for the suggestion. I guess I will try and pick some small projects at work and take it from there. Thanks again bud. Cheers!

34

u/ARASquad Feb 15 '24

Here is how I use Powershell in the work environment. “Setting up new users is getting tedious, let’s try to make it easier with Powershell”

Next, I’d Google, “how to create AD users with Powershell”

Then, I’d likely be like, “okay cool, but I need to have them be assigned to the appropriate group” So, I’d Google, “how to assign AD user to a group in Powershell”

Then I might need to put the user in an appropriate OU within AD. So guess what, I’d then Google how I put an AD user into an OU with Powershell.

This process will go on and on. In this example, you may at first think that all you’re going to learn is how to create an AD user, but in reality you’re going to learn a fuck ton about managing AD and GPO’s with Powershell in general.

So, pick a task you want to start using Powershell for, and Google away my friend

→ More replies (17)
→ More replies (1)
→ More replies (9)

32

u/funkmaster322 Feb 15 '24

This is is the right answer. No one really "learns" Powershell. You're either born with it or you aren't ...

6

u/Common_Classic_3339 Feb 16 '24

Like DragonBorn. But ..Powershell...born

6

u/Shinigami66- Feb 16 '24

You will need to end your social life and speak with your computer than an actual person

→ More replies (2)

4

u/Medium-Comfortable Feb 15 '24

So I will reach peak PowerShell in about three years. Nice.

3

u/MeanFold5715 Feb 15 '24

Meh, I managed to speedrun the process in 34 years, but yeah the dying afterwards part kinda sucks.

→ More replies (3)

20

u/huajiaoyou Feb 15 '24

When I was first trying to learn it, I got the usual book (MOL) and started working my way through it. I didn't get far because I just didn't have the motivation.

Not long after, I tried again, but this time I tried to learn by seeing if I could use PowerShell for anything during my day to day tasks. Once I started using it for little things, I quickly found myself picking it up and using it for bigger things. It was fun, and it didn't feel like studying, I just picked things up.

The nice thing is that it doesn't take long to start getting productive with it, the return can be pretty quick. I found that helped to keep me motivated. I recommend going for it, no matter how many years in.

4

u/Accomplished-Dog4533 Feb 15 '24

Thanks for the kind and encouraging words. Will surely try and pick it up with usual activities I perform.

→ More replies (6)

6

u/yashaswiu Feb 15 '24

Ensuring a consistent approach to task execution is pivotal. Strategic planning, coupled with the automation of daily activities, fosters a sense of confidence and achievement. It's never too late to start.. all the best..

3

u/Accomplished-Dog4533 Feb 15 '24

Thanks for encouraging words. I hope I can get my head wrapped around this one and get started soon 🙏🏼

5

u/Round-Dragonfruit-86 Feb 15 '24

I’m also around 7 years into my career and nearly 2 years in IT services and I always try doing things with Powershell from last 1 and half year even if it is a simplest thing, I Google a lot, take help from Reddit community and other sources as well. If you get stuck then we always have a great Powershell community here and trust me once you use it for even a simple task on a frequent basis then there will be no going backwards. I just have one thing to tell you start using Powershell in your work and even if it is a simple task that you can do with a simple click and run try doing it with Powershell and search for new ways of doing that in Powershell and then see yourself in 2-3 months time.

3

u/Accomplished-Dog4533 Feb 15 '24

Thanks, will give that a try. Starting tomorrow 🙏🏼

4

u/runCMDfoo Feb 15 '24

I relied on someone else to write my power shell, scripts until one day they told me no. I asked him is my idea for a script not really good? And they said they are very good but you need to write it. Despite hours of training and watching online videos, it wasn’t until someone told me no that I started to see the value of the skill

I learned out of need - and frustration.

3

u/Accomplished-Dog4533 Feb 15 '24

I am exactly in that situation right now. But unfortunately that PS-guru has been kind enough to just write scripts for anything I ask for. Guess i should get started before its too late :)

6

u/13159daysold Feb 15 '24

You know why he does it?

It's great to be challenged, and hard to think of reasons for new scripts.

→ More replies (1)
→ More replies (1)

3

u/buenology Feb 15 '24

I’m in my late 40’s and I am now learning powershell, but I am still in the beta stages, lol. It’s ever to late to learn. Best of luck!

2

u/Accomplished-Dog4533 Feb 15 '24

Thanks, this sounds promising. I’ll join the bandwagon too!

3

u/Jmoste Feb 15 '24

Never to late.  In all honesty,  powershell will show you things that a gui cannot.  With powershell ive seen properties that aren't available to the average user.  I've also seen ghost accounts in exchange permissions that I was able to delete.   Functions are really great.  Because you get to make your own cmdlet. Think about a disabled computer.  Do you need to move out first then enable it in AD? Why not make a function that does that at the same time.   Scripting needs a purpose. So find a purpose and learn how to get the information you want first.  Then practice changing one thing manually.  Then add changing that one thing manual with the script.  After that,  learn how too change many things at the same time.   Powershell has a wonderful community of knowledge.  Steal ideas not scripts.  If you just Steal someone's script you're not learning  but of apply some of their ideas you become a better script maker. 

1

u/Accomplished-Dog4533 Feb 15 '24

That is something I definitely learnt soon. Never copy an entire script off the internet. We never know what we will be introducing to our environment. I try to read all of it and take parts of scripts that is needed. Hopefully i’ll be able to write them by myself someday 🤞🏼

→ More replies (1)

2

u/schnauzerdad Feb 15 '24

I’m kind of in the same boat, I can do some scripting but I’m not very proficient. I have recently started looking at some Udemy courses in powershell to improve.

The odd thing is I can look at script, read it and understand what it’s doing.

Also AI is your friend and can write most of the script for you, it’s not 100% accurate all the time but if you know basics and understand what you are trying to accomplish it can definitely get you over the finish line.

1

u/Accomplished-Dog4533 Feb 15 '24

Thanks! I’m on the same boat as well. I can read and understand most of the PS scripts I see around but I can never write one by own.

I have been surviving with the help of internet and some decent google searches. Never copied an entire script, always just needed parts of it. Sadly, i have a folder where-in I have saved these common used scripts I have formed after picking it from places.

I have never tried AI as yet, difficult to explain my requirements to it :)

→ More replies (1)

2

u/TheM365Admin Feb 15 '24

As you grow into your career, assuming it's tech related, mastering PS will be an invaluable tool and make you indespensible.

I wish I started learning it at 18.

2

u/Accomplished-Dog4533 Feb 15 '24

I wish I did that too when I started my career. But then, when young, everything else around mattered more than this :)

2

u/ZuQa-Tech Feb 15 '24

I'm in the same boat. I've tried to make a start, but never got far enough to say i know powershell. Creating your own little work prjects is a good idea.

1

u/Accomplished-Dog4533 Feb 15 '24

Thanks bud. I have started many a times but never stayed on or continued it for long enough. But all the comments in here has been encouraging enough to get me started.

2

u/SK-Incognito Feb 16 '24

Just learn the absolute basics and then use ChatGPT or copilot. Scripting from scratch is kinda dead, it's just so easy with AI.

1

u/Accomplished-Dog4533 Feb 16 '24

Thanks for the suggestion. Will get started with learning the basics. Have tried it a few times before, hopefully I manage to continue it this time🤞🏼

2

u/gordonv Feb 16 '24

You may need a more structured way to learn the basics of programming.

Try r/cs50. It's in a familiar classroom format.

1

u/Accomplished-Dog4533 Feb 16 '24

Thanks, will have a look at it.

33

u/Mathayas Feb 15 '24

As long as you can automate 1 task which you have to perform daily or fetch data which would have taken some time, learning powershell is worth it and you made good use of it.

→ More replies (1)

25

u/Namelock Feb 15 '24

You need to have a good use-case. Start with the most mundane repetitive clicking & typing thing you got. Good chance powershell can automate it.

I worked in a SOC and had a really fucking tedious investigation; copy/pasting from a CSV to format nicely in an email. Took 18 mins speed running it and normally another one would be in the queue by the time I finished.

PowerShell loves CSVs and with some Google'ing you can interface directly with Outlook (desktop app) and create an HTML Email preloaded with everything you need.

Suddenly my repetitive, 18min task was condensed to 1min. Life changer.

4

u/banana99999999999 Feb 15 '24

You mean like your script sends email via outlook?

6

u/Namelock Feb 15 '24

You could either send the email OR have it preload a detailed template.

I preferred the template so I could make adjustments.

Made emails from the SOC so much easier since I could pull the sender's name, and preload "Hi <first name>, thanks for contacting the SOC. The email you reported is..." and have TO, CC, BCC fields already filled out

→ More replies (2)

3

u/jupit3rle0 Feb 15 '24

Interesting. I'm trying to figure out a way for Powershell to pull string data out of Outlook emails, and paste them into a csv for a number of scripts I run against my org.

5

u/Namelock Feb 15 '24

Once you can interface with outlook (com object, select mailbox and folder, select item based on flag/color/first or last) it's down to

| Select-String

Or throw the email text/html blob into a Switch with RegEx Patternsthat make variables populated with data.

Then it's a matter of building the table how you like. Wish I still had examples on hand, sorry!

→ More replies (1)

11

u/uptimefordays Feb 15 '24

Never too late to learn! Picking up books like PowerShell in a Month of Lunches will help you avoid a lot of trial and error though.

6

u/jrodsf Feb 15 '24

This. Learn Powershell in a Month of Lunches makes the initial entry into Powershell incredibly easy.

→ More replies (1)

2

u/thingandstuff Feb 15 '24

MoL is fine but there's nothing in it that isn't online in abundance and there is no way forward except trial and error anyway.

The key is simply to start doing something with Powershell.

→ More replies (1)

2

u/Siddd- Feb 16 '24

Seconded! Started with Learn PowerShell 3.0 in a month of lunches yeaaaars ago, got hungry, bought PowerShell in depth second edition, read it from start to finish.

IMHO.. start reading PowerShell in a month of lunches, get the basics right, understand what objects are and how you can inspect them. This will save you a massive amount of time later on. PowerShell isn’t that hard if you know the basic stuff.

You’ll likely find yourself trying to go deeper and deeper once you get the basics.

I went down the rabbit hole, still haven’t reached the bottom lol. PowerShell is awesome.

Good luck!

→ More replies (3)

2

u/Icy_Apple_5632 Aug 21 '24

Thank you for this recommendation. I'm already reading it and I love how things are being explained here

→ More replies (2)

7

u/[deleted] Feb 15 '24

Ah, go for it. I started a new job 2 months ago and had never used PowerShell before. Now I’m hammering out automations and object oriented programming like a champ. It definitely helps to build things that benefit the job.

4

u/[deleted] Feb 15 '24

Tomorrow is too late, yesterday is over but now is exactly the right moment !

4

u/ZaphodUB40 Feb 15 '24

I work off the notion that there is no code that hasn’t been written yet…and I started dabbling with code cutting in the mid 90’s. Just a case of working out what you need for the parts list, then go and find them, put them together and see what happens. You WILL write shite code, it will be inefficient, it will break badly if not run in exactly the right way..but you will learn and get better. Over time you instinctively remember the basics, structure and syntax, arrays, data types (always tripping me up!!). I mean, I only recently learned that a double space after a full stop was made redundant..like..2 decades ago!! 🤣. Bloody hard habit to break. My biggest issue is remembering what language I’m using at the time and not mixin’ me languages together. 🤪

Go forth and build.

4

u/hippity_bop_bop Feb 15 '24

Powershell Fast Track: Hacks For Non Coders is a great supplement to Month of Lunches. It's 148 pages of quick solutions like how to add logging to your script, format dates, etc

3

u/[deleted] Feb 15 '24

Don’t even worry about “automation” at first. Start by figuring out how to do your daily work in powershell. Stop using command prompt and force yourself to use powershell. Once you understand the syntax and piping, start building scripts. Once you understand scripts, then learn how to have actions trigger those scripts. It’s a crawl-walk-run process, but you have to start somewhere.

As far as “how to learn”, pick up Poweshell in a Month of Lunches. You’ll pick up commands that you can start using immediately. Also, the help command is your best friend.

You’ll never learn a tool that you never use.

3

u/Odmin Feb 15 '24

I was 15 years into my IT career, when i had to start using PS. Now, 6 years later, I prefer query AD or Exchange from PS than from GUI, i write simple automating scripts with ease (with help of stackoverflow sometimes). So no it's never late to learn.

3

u/Latinprince6591 Feb 15 '24

Powershell 7.4.1 stable allows you to understand Windows the .net frame work .I retired from IT in 2013 got 40 years learn Powershell when XP 64 bit was around now with that learning curve I now learning C# csharp on windows 11 Pro 64 bit discovery is bliss

3

u/_wjaf Feb 15 '24

I'm 32 years into my career and have been doing PowerShell for the last 12 or so. It's never too late, learning graph PowerShell now.

3

u/NorsePagan95 Feb 15 '24

Iirc, power shell is C# so learning C# will help

3

u/pliskinito Feb 15 '24

Every time someone asks "its to late to X" 99% of the time, if you re not dead, the answer is NO.

3

u/OutsidePrior2020 Feb 15 '24

I'm in a somewhat similar situation, 5 years in IT and I'm just now starting my journey to learn PS scripting.

3

u/c3141rd Feb 15 '24

It's never too late to learn PowerShell. It sure beats navigating the maze of slow web GUIs that Microsoft has for managing Microsoft 365 and that constantly get rearranged every six months because some hip designer somewhere has to justify their salary.

3

u/faulkkev Feb 15 '24

Never to late. Just takes time and repetition you have to write often for various needs that will lead to new code issues and upon solving them you level up your understanding of powershell or coding. I started back in vbscript script days and it took 2-3 years for me to get good at it. Powershell I think is much easier once you get past the basic coding principals that all languages share.

→ More replies (2)

3

u/SkyHighGhostMy Feb 15 '24

It is never late to learn. But final question is "will you use it"? If you plan to use it, learn it. It does have some things that simplify your system administration.

3

u/adrenaline_X Feb 15 '24

Look at it this way.

If something will take you a long time to do manually, then spend that time sorting out how to do it in powershell.

You will learn from it and when the next task comes up you can copy and modify your new script to do what your want.

I started only a couple of years ago and use vs code to do this and keep all the scripts to do everything I needed to so far.

It can be very frustrating initially as you have to learn how to use each command / syntax as you go but you quickly build on that.

ChatGPT/co-pilot can be really helpful to get you on the right track and there are lots of Reddit posts and forums to get help and probably someone has already done what you are trying to do or very similar that you can use and modify to fit your needs.

3

u/netmc Feb 15 '24

I started working with PowerShell in December 2018 after 20 years in IT. My very first script was identifying the Windows version and then installing the correct Windows Management Framework update so we could use PowerShell 5.1 on all our managed devices. The worst part of this is that it has to be written in PowerShell 2 as that is the out of box version that ships with Windows 7. The other rough part of the script is that the Windows 7 package was a zip file instead of a .msu as the other updates. I couldn't get the unzip functions in PS2 to work with variables, and I couldn't hard code a path and filename. I ended up bootstrapping dot net 4 via environment variable and launching a new PowerShell process so I could leverage the unzip functionality in dot net 4 with PowerShell 2. This required loading the DLLs with reflexion. I think it took me 3 months to get that script written (and lots and lots of Google searches). The end result though is that all of our managed devices get automatically updated and we can use PowerShell 5.1 for all our other scripts which is much easier to use. The code is ugly and not well written by any means, but it works. As long as you can make functional code that solves the problem, that is all that matters. Finesse will come with time.

Good luck!

2

u/cynkronyz Feb 15 '24

Definitely not too late, you'll find endless ways PS can help you - ways that you may not even realise yet. This has been my experience at least. I'd say 100% at least give it a good go.

I had to learn PS as part of my job when I was offered the chance to join a new team (about 18y into my career, same company, completely different type of software project than I was used to). I've always enjoyed programming in general, but I was never a fan of scripting (unix). I had heard of PS a few years before that, figured it was just another scripting tool so didn't give it much notice. In hindsight I wish I had, as the more I used PS, the more I realised its potential.

2

u/nealfive Feb 15 '24

Nah not too late

2

u/SysAdminDennyBob Feb 15 '24

I write a huge volume of scripts. Most are 3 whole lines. You can do a lot of automation with 3 line scripts. PS is incredibly easy to pick up and use. It's not coding, it's scripting.

2

u/BeenStork Feb 15 '24

Never too late. It’s a great skill set and does make life easier. It can be a lot of fun too :)

Start small, and build up. Create small scripts or sets of commands that make you day to day activities easier. Play with pulling information out for reports, ie computer specifics using wmi/cmi, etc., health metrics, user details from AD etc.

Use ChatGPT to help when stuck. Ask it for hints on how to do a specific task, or how to improve upon what you have. It can be a great mentor (but don’t use it as a crutch). You can even ask it to set challenges or learning activities.

Build a module of your most frequent activities, user set up, server deployment tasks etc.

If you are totally unfamiliar, these may be of benefit… Remember = is set and -eq is equals. That seems to catch most out when learning.

Also, if you copy and paste from Internet resources check any ‘, “, and -. This can save you grief as the rich text versions can sneak in which will kill the command/script.

PowerShell in a month of lunches may help too:

https://www.manning.com/books/learn-powershell-in-a-month-of-lunches#:~:text=about%20the%20book-,Learn%20PowerShell%20in%20a%20Month%20of%20Lunches%2C%20Fourth%20Edition%20is,Windows%2C%20Linux%2C%20and%20macOS.

3

u/Flannakis Feb 15 '24

Be careful with Chat gpt, if you asking it to solve issues with powershell it will be fine and you can keep going but….. you still aren’t learning the fundamentals. I learnt pshell from scratch all ok before chat gpt. Now I am playing around with Django/JavaScript/dbs and guess what, easy to create a functional website with many prompts but I got to a point where I need to tackle some trickier points in my scripts and I don’t have the knowledge to understand what it is doing, so I need to learn the fundamentals and take a step back

→ More replies (2)

2

u/ollivierre Feb 15 '24

Never. Using my years of PS experience, I felt humbled by the acceleration that GPT brought to the table and made me write more scripts than even before knowing that I'm still a domain expert and know how to prompt and ask the right questions.

2

u/tindalos Feb 15 '24

Easier than ever with stuff like chatgpt. I think there’s even a powershell terminal on GitHub with AI integration - powershell is mostly about getting the syntax right so it should be one of the easiest languages to put to work with copilot or chatgpt.

2

u/Imdoody Feb 15 '24

Learn something that will benefit you and your company, automate yourself out of a job, then move up. Keep all of your scripts, they'll benefit you I. The long run.

2

u/blooping_blooper Feb 15 '24

You can totally learn at any time. The best way to start is to just try.

There's loads of admin tasks that are easy to get done in PowerShell, and automation can be a huge time saver.

Next time you have a task that you think could be done in PowerShell, just go to google and search 'how to do x task in powershell', and try it out.

2

u/[deleted] Feb 15 '24

It's never too late to start learning.

2

u/DefJeff702 Feb 15 '24

I would argue this is the best time to start tinkering. Pick up a copilot license for VSCode and go to town!

2

u/Kinsiinoo Feb 15 '24

It is never too late to learn new skills, and PowerShell is a must to have. There are plenty of video series, online tutorials, and good books about it with a really good explanation.

2

u/Chryses3 Feb 15 '24

I started at age 22. Two years later ish I’m pretty confident in the syntax and work with PowerShell for my daily tasks.

I started with doing things in PowerShell rather than GUI when I still worked support, and moved on to trying AD tasks and automating them (pw resets etc). You can do it, just never stop being curious. Oh, and Get-Help -Examples is your friend, always

2

u/Medium-Comfortable Feb 15 '24

It’s never too late to start learning PowerShell. Start using it for your real needs. Not everyone needs to add .net or whatnot. Most often the simple gathering of information from a lot of machines, users, mailboxes, you name it, are the first goals. Then the first careful manipulation of said. Learn to walk before you run.

2

u/System32Keep Feb 15 '24

The way i learned powershell was taking on projects that required it.

From there you research, ask questions, stay in the community and learn.

2

u/[deleted] Feb 15 '24

I learned PS in 2 months with the book „A month of lunches..“ working full time as a sysad, what’s your excuse?

Later down in my career I realized that Powershell is not really efficient or needed when it comes to DevOps practices so I learned bash & python instead.

2

u/Cerealkilla19 Feb 15 '24

Never too late 😀

2

u/marcabru Feb 15 '24 edited Feb 15 '24

Unlike Python or Java, which are programming languages and have a steeper learning curve, or Bash/CMD.exe, serving as shells in the first place, but not really ideal for complex scripts, Powershell has the advantage to provide an easy, accessible path to incorporate it to your daily workflow starting from using it as a shell and then leveraging it for advanced toolmaking:

  1. You can start with simple commands

  2. These can be combined into one-liners which you can store in a Notepad or OneNote for reuse

  3. Then a script can be built for a single purpose

  4. The script can be turned into a tool, with documented parameters, error handling, etc. A tool is something you can give to your colleague without worring that your colleague can do damage with it.

  5. And finally, more complex workflows can be built, with multiple scripts, modules, tied together.

(And that's probably the limit of the language, of course, you can develop an application in PS, with database, GUI, whatnot, but it's not really its forte, there are better languages for that)

If you just reach level 2, you still learnt something valuable.

2

u/Thin_Ad936 Feb 15 '24

I started learning PowerShell when I was 30, and am still learning new stuff almost every day!

It's never too late to start learning to be fair. Find yourself a problem and see if you can fix it with PowerShell!

2

u/havens1515 Feb 15 '24

As others have said, I would start with trying to do something small with PowerShell and moving on from there. If you need help, simply Google "how do I (do x) in PowerShell". You'll likely find an answer, or come to a place like this for the answer if you don't find it.

Start small and build. Many people fail at learning this kind of thing because they want to go from 0 knowledge to knowing everything, super quickly. Life doesn't work that way. It's a journey. Learn what you need in order to perform the task you want to perform, and then move on for the day. There will be more to learn tomorrow.

2

u/malice8691 Feb 15 '24

Not too late. Is it worth it? Yes.

2

u/LegitimateCloud8739 Feb 15 '24

IMO learning a programming language is the false thought. You have to learn the concepts from variables, to loops up till Object orientation, then all languages are just different syntax with minor differences when it comes to the language/framework.

2

u/madgeystardust Feb 15 '24

Never too late!

If you know other languages it’ll be easy enough to pick up. It’s just finding the alternate commands and syntax.

2

u/Conscious_Report1439 Feb 15 '24

Lookup Powershell in a month of lunches on youtube.

I used this as a resource in addition to doing work projects over the years. It will be life altering for you!

2

u/Conscious_Report1439 Feb 15 '24

Side not, dont be lazy and use alias too frequently in scripts you share. Much harder to read for others. Use aliases for single use commands or in scripts you do not intend to share.

2

u/MeanFold5715 Feb 15 '24

Yes. It'll be completely obsolete by the end of the week because everyone is switching over to Bash on account of Microsoft going out of business.

2

u/RexTheCapt Feb 15 '24

I can use powershell to manage all our users, devices and AD remotely from my own computer. As an IT guy I really recommend using powershell.

If you do a tall 1 or more times, try to powershell it.

2

u/sublimegeek Feb 15 '24

It’s never too late to start learning something useful. I learned Docker in 2020, Powershell in 2022, and k8s in 2023

2

u/TheGooOnTheFloor Feb 15 '24

No. Next week is too late, but today is still good.

2

u/robert5974 Feb 15 '24

One of the best quotable I've heard lately definitely applies to this :"Day one is better than one day"

2

u/tech_mikey Feb 15 '24

Never to late to learn.

2

u/[deleted] Feb 15 '24

I'm a basic bitch when it comes to PowerShell.. But I look like a Hero, who needs a Hero? ;-)

TCP ping?.. Looky there.. It's not responding. Need a firewall rule? I got ya.. You think that user service account isn't the issue? Run this script on your AD and tell me when it last logged in.

All that kind of stuff. You don't need to be elaborate.

2

u/Creative_Progress803 Feb 15 '24

It's never too late dude, I used to script in batch and one day my manager asked me a script in powershell that would be usable by anyone in the company.

First I shat my pants like I've never touched any powershell in my life. Then I started to work on the project, alone, and even managed to make it work as a GUI for the end users. I ran into many problems but also learned a lot.
If you're not sure what to do, just think of a tool your IT departement would, something small but useful, like, I don't know, a GUI that would have to fields, one with SID, the other being the result account made readable to a human via a clickable button, just with this you'll learn a lot, then go for something stronger.

I've been using powershell for eight years now and I still need documents and examples but in the end it's quite interesting. Just give it a try ;-)

2

u/badbob001 Feb 15 '24

I was all about windows batch scripts until I started working with Azure and was "forced" into using powershell since some Azure tasks could not be done from the portal.

For me, getting into powershell is not that hard since google can usually help you find example powershell code that fits your need. Having some prior coding experience helps to create more advanced scripts. But now I try to use powershell for most things despite there are likely faster and more efficient alternatives. Interesting note is that I hate excel formulas but using powershell to create the spreadsheet helps bypass most of that.

2

u/[deleted] Feb 15 '24

Get-tab tab tab -noun red paint

"Dang it"

PowerShells great. Like anything, practice practice practice.

I believe it's admin center in active directory will give you outputs of actions made on the GUI. Might be wrong on which interface.

Well worth it to learn PowerShell.

-whatif is a good command while learning.

2

u/jstar77 Feb 15 '24

All you need are some fundamentals and a problem to fix. For me atleast, it's really hard to learn if I don't have a practical application or project that would benefit from using a specific tool.

2

u/rpzag Feb 15 '24

This is first step towards Imposter Syndrome - thinking you're too late, too old, or missed out on learning a fundamental skill.

Don't try to be an expert. That may be hard to accept, but just try to learn the basics enough that you know how to use simple commands and can write simple scripts. Remember, you can use Powershell to manage your machine, Active Directory, Entra ID, Azure, M365, VMWare, etc., so you'll have plenty of opportunity to find simple ways to use it. Once you learn the basics, use chatgpt/copilot/etc to help you solve specific issues. The more you use it the more things will click and the more confidence you'll build.

If your go-to learning style is books - I like Learn Powershell in a Month of Lunches. If your style is videos, there's several on Udemy that are under 10hrs and $15.

One more comment. I'm pretty darn good in Powershell and use it all the time. But I also use Python and Bash, and when I go back to Powershell, I still need to refresh my brain on verbs and syntax - and I STILL use chatgp/copilot.

2

u/xs0apy Feb 15 '24

All the jokes aside, it’s NEVER too late! Learning PowerShell is life altering once it starts to click, and I am not talking like master level shit. Even once you start to grasp the basic stuff, you’ll most certainly see places and stuff that would be better executed with a script. Especially AD administration. Adjusting 500 proxyAddresses via the Windows GUI is traumatizing, and should be a felony class criminal offense.

2

u/bjornwahman Feb 15 '24

Yes it will, I learned it in a couple of months, I had a good mentor though. It will help you! I have colleges that dont use it and work on stuff for hours/days that a ps scripts does in seconds, they are always busy as a result 🙂

2

u/[deleted] Feb 15 '24

I hear chatgpt is handy…

2

u/[deleted] Feb 15 '24

Set your self a task.

Create a powershell script that will copy an ini file to a certain directory, run and exe silently, do some registry changes in the script.

Do that for starters.

2

u/empbob74 Feb 15 '24

It's never too late in a career to learn something new.

2

u/bartman2468 Feb 15 '24

Never too late to learn anything. That’s not an IT thing either, that’s just a life thing. If you want to do it just start, gain the experience, make mistakes and learn.

2

u/OkTrouble3195 Feb 15 '24

Copilot actually helped alot. I could ask it for examples or get it to check over my code. It picked up strings I'd forgotten to add to clean up. Also suggested better methods for certain actions, arrays for checking a column in CSV etc. I know it's advice needs to be taken with a grain of salt but talking it out and getting feedback really does help keep the ball rolling. Stopped me getting stuck in a research rut due to lack of examples or because I didn't know which command I needed to start with.

Have a goal in mind for what you want the script to do. That'll keep you focused. Then when it does what it's supposed to do, go back over it with copilot or with some best practices methods in mind to see if you can make it better.

2

u/wbedwards Feb 15 '24

Is it too late to get started to learn PS scripting now?

It's never too late to learn something new

Will it be of any help by the time I even get a hang of it?

PowerShell is the scripting language of choice if you're dealing with Windows, Azure, or anything Microsoft and I don't see it going away any time soon. It's available on Linux too if it ends up being your language of choice (don't hate me Linux people).

Also, because PowerShell can use .NET libraries, it's incredibly versatile and you can do just about anything you can think of in PowerShell. Might not be the BEST tool for every job, but it's a very capable tool for most jobs and if you could only ever learn one language in an IT support role, I would consider PowerShell to be a strong choice, maybe the strongest choice if you're working in a Windows dominated environment.

Learning PowerShell has been a huge difference maker in my career, and a huge part of what helped me jump from helpdesk -> system administration -> DevOps in an Azure shop (where I am now).

2

u/crewman4 Feb 15 '24

Get an AI like GitHub copilot. Ask natural questions and learn by examples , far faster than googling . It’ll explain all code as well

2

u/g3n3 Feb 15 '24

You have to use it every day and for every single system admin operation. No more mouse. No more click-ops. It’s all APIs and PS Remoting and ssh.

2

u/g3n3 Feb 15 '24

And you aren’t alone plenty of lesser sys admins never touch a powershell script and they have been doing click-ops for their whole career. They essentially have the same year of experience for 20 years.

2

u/Complete-Dot6690 Feb 16 '24

Best way to learn powershell is to have an active work project that needs a script. I learned it after 15 years of programming. Not having to compile is sort of nice also :)

2

u/chilldontkill Feb 16 '24

Bro sign up for chatgpt. Ask it to make you a simple powershell script. like mapping network drives. figure out why it works. try changing little things like the map drive letter. re-iterate over and over again. repeat with another problem. obviously test in a virtual environment or test lab.

2

u/Ch0pp0l Feb 16 '24

Well one of colleagues cannot script and all he does is ask ChatGPT to do his job. He even ask ChatGPT to write HLD and DD for him. 😂

2

u/Spirited-Ad2497 Feb 16 '24

What I find extremely useful - as soon as you're able to write your own PS scripts - is PS2EXE, a module that turns your .ps1 scripts into .exe files. It also has a gui - Win-PS2EXE. You can install it from psgallery for instance: https://www.powershellgallery.com/packages/ps2exe/1.0.13

Have fun!

2

u/iHavoc-101 Feb 16 '24

I work for a software vendor and we have been getting pushback from a lot of our customers from all over the world, that we cannot use PowerShell anymore. I have written several PowerShell tools to assist our product and they are getting phased out :(

The reasoning is lots of malware/ransomware leverage PowerShell using signed scripts. So it is no longer safe to enabled PowerShell even with remotely signed.

https://securityintelligence.com/articles/all-about-powershell-attacks/

The study revealed that PowerShell Command & Scripting Interpreter was the number one attack technique used by threat actors

I still like PowerShell and you should learn it, but I am seeing a trend against PowerShell.
Just wanted to share what I am seeing.

2

u/ChopCity927 Feb 16 '24

So i just started using PowerShell in the last few months for my job to automate a lot of the work i do. I started using ChatGPT to help me write scripts. It’s does a nice job at explaining everything for me and I’ve been able to learn a lot.

2

u/spokale Feb 16 '24

I'd recommend you take an online course about programming in general first. Once you understand the fundamentals (variables, loops, conditionals, functions, etc), picking up PowerShell is much simpler.

If you try to do automation in Powershell without at least a general understanding of programming concepts, it's 100x harder and the result will be poor.

2

u/mrelcee Feb 18 '24

Start small look focus on a couple small things that make your daily tasks easier.

Look at other people’s working examples and steal from those - tweak working code examples into what you need.

build with what you’ve learned. Before long you’ll be able to tackle bigger more complex jobs.

I find starting out within a new scripting language, if I can find one good ebook and have it around on a device to use as a reference - if i can express what I need to know/are looking for into a text search that can be invaluable. Usually it’s o’reilly books for me going back 30+ years. I have gotten good jump starts from the various “for dummies” books when something wasn’t coming to me naturally. Despite my distaste for those..

Even if you aren’t writing grand scripts - if the small simple ones starting out can save you seconds or minutes a day that’s pretty worth it over time

That pretty much sums up how I’ve learned 20 some odd scripting languages over the years. Some better than others.. knowing shell scripting in general is what took me from being competent to very confident and ultimately I work less and smarter when I do at any given task.. and the beauty is that scripting knowledge of some commonly installed shell can then be applied almost anywhere you find yourself working on tasks..

2

u/billr1965 Feb 19 '24

One of the things that I recommend to people new to programming - your first set of scripts should only read/report on values found somewhere. Until you become familiar with Powershell keep your scripts to read data only.

Once you have that under your belt then you can move onto scripts that make changes to your system.

2

u/RiverThen5895 Feb 20 '24

It's never too late to learn PowerShell. My advice would be not to try and learn it just for the sake of learning it, but instead find something you want to automate and learn how to do that using PowerShell

2

u/Careful-Quiet8684 Feb 22 '24

It’s going to be slower at first and take a lot of googling or asking chat gpt

But try doing any task you’ve got to do with powershell instead. Especially anything you do regularly.

Also Functions are useful.

2

u/Remarkable-Cut-981 Aug 26 '24

Bro it's never too late

Start now

1

u/[deleted] Feb 15 '24

Yes, you can only learn it if you have less than 16.2 years of experience. Maybe try Bash?

1

u/derleek Feb 16 '24

NEVER stop learning. It's never too late to augment your skills and learn new things.

1

u/RevolutionaryRing487 Feb 17 '24

It’s never too late. I used windows batch scripts and started the transition to posh a few years ago. It has helped my career and peace of mind to be able to automate tedious and advanced tasks. I can recommend ’Learning powershell in a month of lunches’. I have 20+ years of server/sys- admin.

1

u/kprocyszyn Feb 18 '24

If you like a video and learn by following along, check this free series I made: https://kamilpro.com/powershell-for-it-professionals-1-help/

It starts from assumption you never coded before.

As this was truly my beginning of the making videos, the post production gets better with each video...

1

u/TokenGrowNutes Feb 26 '24

No, it's too late. Go home.

I mean, ChatGPT can help formulate Powershell commands. What's the issue here?

0

u/Prior-Listen-1298 Feb 15 '24

I admit I have I don't even now what you mean. I write powershell scripts all the time (sadly, because I don't like it, it's verbose as and just had to be more clumsy than bash ;-) and I have never a) learned it or b) asked if I could, or should. It's a scripting tool that can do almost anything at all on a Windows machine, has layers of cumbersome security because of that and you learn what you need when you need it. I mean seriously, in 2024, you can as ChatGPT to write you whatever scriptlet you need then take the time to understand it and make sure you know how if works and test it from a basis of such garnered knowledge never run code you don't understand blind (if you do, you need a good shrink fast)

5

u/Egoignaxio Feb 15 '24

chatGPT is god awful at PowerShell in my experience

0

u/[deleted] Feb 16 '24

[deleted]

2

u/Accomplished-Dog4533 Feb 16 '24

I wish i was 18 year old again :)

0

u/[deleted] Feb 15 '24

[deleted]

5

u/ARASquad Feb 15 '24

OP is 18 years into his career, not 18 years old lol. They’re likely 40+. Regardless, it’s not too late.

1

u/hugodrax55 Feb 15 '24

Ah, lol, my reading compression at midnight is subpar.

2

u/Nobio22 Feb 15 '24

compression

1

u/ARASquad Feb 15 '24

Fair enough lol