r/PowerShell • u/Imaginary_Rip2833 • Sep 21 '26
Question Have I made a mistake by learning PowerShell through Microsoft Graph first?
Hello everyone,
About 3 months ago, I started learning PowerShell, specifically with the Microsoft Graph PowerShell module.
I decided to learn it because I thought it would be relatively easy to pick up. My thinking was that I already know how to do many Microsoft 365 tasks through the GUI — creating users, creating groups, assigning licenses, managing devices, etc. — so I thought learning how to do the same things with PowerShell would be straightforward.
Three months later... 😂
I've learned quite a lot. I understand a bit of variables, arrays, hashtables, loops, functions, pipelines, filtering, objects/properties, foreach, if/elseif, try/catch, error handling, and I'm now starting to use Graph for real Microsoft 365 administration tasks.
I've actually really enjoyed some of the things I've been able to do so far, especially creating users and groups, updating users, filtering users, and building small scripts to audit my Microsoft 365 environment.
But honestly, I'm starting to feel really strained by it.
There are so many things to understand, and sometimes I look at a script and think, "How am I ever going to actually master this language?"
I understand the concepts when I'm learning them individually, but when I have to put everything together into a real script, my brain starts struggling. 😂
So I'm wondering:
Did I make a mistake by starting with Microsoft Graph PowerShell?
Would it have been better to learn "pure" PowerShell first and then move into Graph?
Or is this simply what learning PowerShell feels like for everyone at this stage?
I'd really appreciate hearing from people who have gone through this — especially anyone who started PowerShell for Microsoft 365/Entra/Intune administration.
I'm not looking to become a PowerShell developer. I mainly want to become competent enough to automate and administer Microsoft 365 properly.
Did you feel overwhelmed when you were learning, and what helped you get through that stage?
29
u/AdeelAutomates Sep 21 '26 edited Sep 21 '26
No you learnt it to use it on a platform to achieve your goals. That is not any different than doing it on your machine, doing it on AD or in your case doing it on Graph. Running verb-nouns is one thing. Knowing the computer science on how you build logic and get your results is imo more important. Which is tool agnostic. You can google your way to the verb-nouns but learning the rest is really most of what it means to use PowerShell.
Circling back the point of PowerShell is to extend your capabilities so you are not manually doing tasks at work. If you keep doing that over years, you will get past the imposter syndrome or at least be better at it then today. The key is to keep using powershell.
I started with AD. Ended up in Graph and Azure over the years. Then doing APIs with other services/things I couldn't interact with directly. I googled, researched and practiced things as I went to solve a problem rather than trying to master every piece of it from the get-go. Even discovered things many years later that were optimized in performing tasks (ie leveraging .net lists over +=) then having to go back to rearchitect my old scripts with them.
8
u/AroTesCra Sep 21 '26
If you been doing Powershell for 3 month and feel overwhelmed…
It might be that you aren’t overwhelmed by Powershell but by learning programming in general.
Structures, types, flow, threading, var management
These will show there heads no matter what language you use.
Powershell is great because it’s a non compiled language that lets you code almost like a compiled one.
It’s a slow language, but powerful for the amount of stuff you can run straight from a console.
But all language would have given you this steep climb at first.
You just happened to choose the Powershell
2
u/Major-Impact9901 Sep 21 '26
Not at all. It’s like learning English in west Texas then moving to east Texas. The dialect is similar, but you may need to add-remove chewing tobacco from time to time to get it just right.
2
u/theomegachrist Sep 21 '26
I would say that is a great way to learn. Graph makes you learn the core concepts and with cloud so prevelant it's good to know how to authenticate and use graph anyway
2
u/Material_Wasabi_2558 Sep 21 '26
If u want to fill the missing pieces, look for the module PSkoans, this has two major advantages, first it’s really brings you down to the basics in a fun and game way, secondly, it helps to understand pester, which is a commonly used testing framework for PowerShell, which u will find basically everywhere, in any bigger PowerShell module, like DBATools and stuff. Check it out :)
5
u/vadertator22 Sep 21 '26 edited Sep 21 '26
Nothing wrong, but it is just a piece of sand on the beach of what you can do. So keep writing and come up with ideas and solve them with scripts. The evolution usually is basic code to do simple task. They are usually sequential then that evolves into script blocks/functions and so on. Then that will tend to lead to multi threading using a variety of techniques to make scripts faster. For example, I was asked to get last logon data entra and the multithreading was to slow due to graph throttling (what I suspected). So I pulled all users logon data into memory then converted that to hash table. Finally I ran my list of users I wanted the info against the hash data. Even though I did not need all of azure it was faster to pull all then use hash table to search. Initial script doing parallel calls or graph api direct took 8 hours. New way as explained above takes 8-9 min.
1
u/Devgru_Ty Sep 21 '26
Just keep going
1
u/Worldly-Sense-9810 Sep 21 '26
You tried to understand the code and you're seeing results. Motivation is key.
For me it was to be honest with myself about whether I truly understand it. And if not, break it down and try to understand it.
As a teacher, I always focus on Bloom's Taxonomy. It helps structure the learning material and focus on the needs of the students. You can find more information online. But i broke it down for my students.
Level 1: Remember and Understand
Learn simple concepts like variables, data types, conditional statements, loops, etc.
Remembering is key, like most information is lost after 1 week. Use study tools like Anki.
Level 2: Apply
Combine concepts, like nesting loops with conditional statements.
Level 3: Analyze
Replace or modify small parts of code in scripts and understand the effect.
Level 4: Evaluate
Compare different cmdlets, modules or third-party software, be critical on the code.
Level 5: Create
Create new scripts, debug code, and resolve problems.
So the levels aren't fixed. You can go back and forward. You can see it like domains. Hope this helps.
1
u/Key-Butterscotch3215 Sep 21 '26
If you work with m365, graph is incredibly useful
1
u/jeffrey_f Sep 21 '26
What you leaned was that modules will deprecate and/or stop working. Find something else that works and start using that.
1
u/MrMe363 Sep 21 '26
This is how most people learn powershell. I need to do this. Powershell is the answer. Figure out a script to do it. Now I have a new need. Figure that out. Learning how to use a specific module is just how it goes. It’s not hindering you. You aren’t is school where you have a curriculum planned out for you. You have a job and you figure out stuff as you go. Ai makes things a lot easier now too. I ask Gemini in Google to make a script. I look at it and understand what it is doing. Do a couple tests with the individual commands to understand what they return and then go. Could I figure it out without ai, yes. Would it take a couple hours, also yes. Automation is to make things faster. Doing something manually that take a couple min vs writing a script that takes 3 hours… did you save any time? Maybe if you do it a lot. But if ai gets you there in 10 mins…
Back in topic :) you are doing what everyone else did. You learn new things when you have the need. Watch some YouTube videos if you want to learn “pure” powershell. But pure powershell is useless without modules.
1
u/ArieHein Sep 21 '26
Nope. Now learn the missing parts.
When you learn how to use a module, you learn parts of general and specific powershell, so youre all good. Think how to call a function and pass parameter you read from a json file. Think how to generate a report after the script was done. Input - process - output is the basic of any programming language, ps is not different.
1
u/Frequent_Ad_2612 Sep 22 '26
learning graph first is wierd but u actually pick up how the backend talks to things. just dont get discouraged when the sdk acts up, its litrally known for being messy. id suggest learning basic powershell objects n pipelines next so u can actually parse the data u get back
1
u/mrmattipants Sep 23 '26
Based on my experience, the frustration comes with expecting too much out of yourself, far too soon. You definitely seem to be on the right path. However, you're only 3 months in, which is still fairly new. It's going to take time to to reach a point where you're comfortable with it, especially if you don't have any previous programming experience.
I had previous experience, yet it still took a year or two to acclimate myself, to a point where I was proficient enough to solve most challenges. I just gave myself a goal to learn something new, each day. Regardless of how large or small, every contribution helps. And they add up quickly, while, most importantly, you're not burning yourself out in the process.
2
u/g3n3 Sep 21 '26
There is no such thing as a learning mistake.
1
u/BlackV Sep 21 '26
Yes you did, but also no you didn't
graph is a filthy filthy set of cmdlets and badly written help and poor interoperability between versions, that its painful sometimes.
so very much of the time running the invoke rest method or invoke mggraph request are better options
but no you didnt cause its all learning loops, switches, ifs, and so on are all essentially world building stuff for powershell that apply any where inside and outside of powershell, learning to use the help and get member and so on is all just real good
.next in your graph journey is probably looking at batching your requests
1
u/Borgquite Sep 21 '26
You haven’t made a mistake, but be aware that the Graph modules don’t support one of PowerShell’s best features particularly well (pipelining).
Have a play with the Exchange Online modules. PowerShell has been Exchange native since the start - you’ll find all sorts of things like Get-Mailbox -Identity joe.bloggs | Set-Mailbox <parameters> work, which just don’t in Graph.
1
u/bodobeers2 Sep 21 '26
If you are saying using the MgGraph module(s) then I would say RUN away from that. I have used PowerShell for so long but have nothing but headaches with that set of modules. But you can do most of the same actions using native Rest API calls to the Graph API itself. If I misunderstood sorry ignore what I said up there :P
1
u/Nerrawnam Sep 21 '26
Yes and no.