r/PowerShell • u/orT93 • Apr 28 '26
Question im new to powershell
Hey guys :)
after 3 years as a help desk tier 1 without getting any cool and important acces (only got to do pass resets and unlocks on AD) ON THAT LEVEL OF JOB
I started a new job as a IT support
I have a good manager that knows my background and skills , but he wants me to progress so now he wants me to learn powershell
and im a better learner in videos
so my questions are :
- whats the differ between powershell versions
- do i need vscode ? if yes, why ?
- any good video to learn powershell
- last one i promise , what actually i can do with powershell
thanks guys :)
15
Upvotes
24
u/Dragennd1 Apr 28 '26
A lot of people recommend PowerShell in a month of lunches to get you started. I've never read it but I hear its a great resource.
As for VS Code, no, you don't have to use it. You can code in notepad for all it matters, but VS Code does have support to help color code your syntax and make suggestions to correct errors, among other things.
Now all that being said, my best recommendation to you would be to do your own research. I don't mean this to be sarcastic in any way, but the ability to do google searches is a great tool to have in your tool belt. There are thousands of cmdlets just available from Microsoft alone, not to mention ones made by third parties who have shared their code on Github and other platforms, and trying to explain all of them to you would require a novel worth of words.
Microsoft's documentation for PowerShell is also a great resource and as you start to learn what you can do with the language you'll find all of the official cmdlets are broken down quite nicely to help understand how to use them.
13
u/justaguyonthebus Apr 28 '26
6
u/Nitricta Apr 28 '26
Create a simple PowerShell script that you can run when someone calls. (There is a trillion guides online, since PS is so popular.)
This script shows if they are locked, last password change day, last login, or something like this.
The script then checks if the user is locked, and if locked, asks if you want to unlock. If the user is not locked, ask if you want to change the user's password.
That's how I started. Think, can I do this job easier and faster?
4
u/DeltaOmegaX Apr 28 '26
I was using ISE until I started Python development alongside it. Now I use vscode for both. Learning to make use of vscode with the Powershell extension is not a bad idea, as other workflows will require it in your career eventually. It can also manage your subversions of scripts if you publish them to a repository.
4
u/Jddf08089 Apr 28 '26
This might be wildly unpopular but for people just starting out I'd use the ISE. VS Code is amazing, but the auto-code / AI features make it harder for beginners to make a mistake and then learn from said mistake.
2
u/hoh-boy Apr 28 '26
It might help to interpret the request to learn PowerShell less broadly. Scope what you need to learn down to what it’s needed for.
I am near illiterate in PowerShell but I hate being on the phone with people and pissing away my own time. If I get a request, the first question I ask myself is how the fuck can I do this without having to work with a user or every user or having front end access. And through this approach, I’ve gathered enough PowerShell skills to be useful in my role/scope/sector.
Of course, by all means, learn PowerShell. Take courses, challenge yourself. But a quick way to get exposure is to take a responsibility of yours and see if it can be scripted.
2
u/Vietnamst2 Apr 28 '26
2
u/bladeguitar274 Apr 29 '26
Vs code is stupidly helpful and I use it when working larger scripts. But notepad and powershell ide are fine as well. Honestly i usually end up just using nano or micro for small changes since im in the cli already. Ps 5 vs 7 can be thought of simply (but not quite accurately as win 7/10 vs 11. There are some commands and modules that only work with 5 but 7 does open up a lot more doors.
As for the best way to learn, that depends on you. Personally I learn best by doing so I find a problem or process I need to solve/improve, figure out a way to do it through powershell, and then move to the next. Eventually you become the guy that answers most problems with "i have a script for that"
1
u/oiler_head Apr 28 '26
I've been bumping my way through PowerShell for years. I am no better a programmer than I was when I started but I am a huge advocate of anyone learning and understanding what they can to have PowerShell help them in their day-to-day tech job. There are going to be way better answers than mine but here is my .02 cents...
In my experience, PS doesn't replace the UI, it is another tool to go along with the UI. I find it easier to quickly understand and troubleshoot an issue using the UI or to do one off tasks. I use PowerShell to either link together a series of tasks that operate on one object (create users, create group, add users to group).
Good luck
1
u/IT_fisher Apr 28 '26
A lot of great answers here, I realize that videos is the best way to learn for you, but I do not have any recommendations beyond what's already mentioned.
What I have told colleagues over the years in your position is take a simple ticket generator, Let's use password resets for an example and automate it. (use a test account)
At that point you have learned how to:
1
u/dathar Apr 28 '26
1
u/TKInstinct Apr 28 '26
1 The various versions are : PWSH aka Powershell Core which is the cross platform varsion, Powershell 5 which is legacy and Powershell 7 which is modern and supports things like Graph API.
2 You don't need VSCode but it helps. You can use Powershell ISE which does the same thing but is older and has been deprecated, VSCode is the modern equivilant and supports more languages than just Powershell.
3 Jacked Programmer is good, the creators of the book "Powershell in a month of lunches" did a good series but it is very old.
4 It's a scripting / programming language so think of something you do that is repetitive or would take less clicks to perform and work on that.
1
u/brandon03333 Apr 28 '26
Get VS code, it makes life easier. Still sad they stopped supporting ISE.
Start with simple stuff to automate then work your way up. I had to have a DEV help me along the way due to me being an idiot at programming, they taught me and things took off. I got servers auto patching on a schedule emailing results and tons of cloud stuff automated. Just know MG graph documentation sucks.
I have not hit a brick wall yet with what you can’t do with powershell. Have remediation scripts going in Intune, onboard is automated along with someone leaving.
1
u/arslearsle Apr 29 '26
Try to solve some easy problems at first…why did it fail?
Red text is your friend, it says what you did wrong.
Programming is not for everyone…
1
u/g3n3 Apr 29 '26
You need more direction. “Manager what are your business pain points? Why am I learning? How do we gauge I learned it?”. Learn powershell isn’t actionable.
1
u/zerokool000 Apr 29 '26
Definitely use VSC, because it integrates with GitHub, and python and all other languages, and also, since it is from MS, it integrates with all their products. I use it exclusively and use it with GitHub and GitHub Copilot. Also use WSL, that terminal is awesome, you can install Ubuntu and work between the two. Plus it all integrates together.
1
u/SalamanderDismal2155 Apr 30 '26
Hit me up privately - I have some PowerShell docs that you will benefit from (and some Python ones as well)
1
u/SomethingUnique141 Apr 30 '26
Use it a lot! I would focus on the MsGraph, AD , and EXO powershell modules at first, especially as IT support (assuming youre a MS shop). Learn those first and then learn how to script it. Those will help you most immediately in the job youre in.
1
u/M365Expert Apr 30 '26
1
u/Alarming_Pride_8512 Apr 30 '26
As someone who's been learning ps for the past couple months, yes get vs code, it makes life easier, or use POWESHELL ISE to get a similar editor+terminal combo.
Read learn poweshell in a month of lunches. It really does give you a great understanding of how useful and powerful powershell is for administrating computers.
1
u/Hefty-Possibility625 Apr 30 '26
If you are working with Windows, then it is ideal for automating routine tasks, applying settings to systems remotely and at scale, and generally anything you might want to do with a MS product. There are PowerShell cmdlets and modules that allow you to manage local firewall rules, Windows Update, Processes, Services and a whole lot more.
I've used it to configure iSCSI initiators so that servers could use SAN storage.
For everyday things, it's GREAT at working with REST APIs. We had our ticketing systems call PowerShell scripts for certain requests like creating Certificates and handling some routine tasks. That allowed us to create requests that the help desk could approve that would kick off scripts to perform select actions that normally require admin rights.
We also automated some of our documentation. Query each managed Server for inventory details, do some data cleanup, then create a Confluence Page for each server with appropriate tagging to make it searchable and filterable with the Page Properties Report macro. That gave us current valid documentation in our knowledge base and we could simply [[servername]] to link to any known server in our documentation.
1
u/Nefariousnesslong556 May 02 '26
I use vscode with ai (copilot). Saves me hours of work when I need to make PowerShell scripts
1
u/jeffrey_f May 02 '26
When the most routine thing I did was unlocks and password resets, I created a script that would ask for the userID. The next step in the code was 1 for unlock and 2 for password reset.
Reset, changed the password to "Password123" and unlocked the account and unlock just unlocked the account. Worked much faster than the AD Tool; About 3 seconds compared to looking up the user and all that mouse stuff.
I was going to expand the program to check and display the user info, but never did.
1
u/Metalcastr May 05 '26
It's ok to start simple. Try commands in PowerShell that are equivalent to using AD. Try searching for users in PowerShell instead of AD. Try changing one property of a user, such as Enable/Disable, or unlocking their account.
Once you try it and get a feel for how PowerShell works, you can make more advanced things. Most of what I do are single-line commands piped to others to get information from AD.
1
u/BlackV Apr 28 '26
As per the previous reply
All of your questions have been asked and answered in here already (recently even)
Go have a look, then of you have specific follow up questions were happy to answer those
1
u/AdeelAutomates Apr 28 '26
The questions have been answered but let me reinforce why PowerShell is awesome and why you should learn it.
So everything you do in IT, right now you are probably going to do by hand. Chances are in school or whatever you learnt IT from. You did a whole bunch of things by hand. By hand I mean use service x by using the gui/portal/browser etc and clicking/typing away.
While that is great and you use the visual queues to learn and understand. The real power of IT is taking it to code. Why? because you get god like abilities.
Lets say you wanted to paint a house. Paint this room this color, that room that color, etc. You could go in there and just paint sure. You grind it out and finish and then the next day you have another house to do the same. Or next day you are asked to do something completely different. Wouldn't be it be better if you could make a whole bunch of robots that would take your instructions and do the job exactly how you designed them?
Thats what we can do right now! We can't do it in the physical realm as robotics isn't there yet but digitally as in on platforms like Windows Servers, Computers, Azure Cloud, etc... You can build these robots to do tasks.
All of the sudden you go from some one who just grinds out all kinds of tasks by hand to some one who builds things that will then do the work. Isn't that so much more powerful? Like playing an strategy game where you instruct your minions rather than first person game where you run around to do stuff.
And a great language for this is PowerShell. It has tools built in for all these platforms and computer science to build any functionality to.
By the way, Its amazing that your manager even as a HD level 1 is asking you to explore PowerShell this early. PowerShell is what changed IT as a job to IT as a career for me.
Since you asked for video.... Just youtube and find tutorials. There is a video by the creator of PowerShell himself that is a great starting point: https://www.youtube.com/watch?v=UVUd9_k9C6A
That's what started me many years ago and even if the video is dated, it still applies today as the fundamentals have not changed.
0
u/FuggaDucker Apr 28 '26
On top of everything else, you can wrap c# in code blocks and call it making it very powerful.
VSCode is a nice IDE for DEBUGGING powershell as well as authoring it.
Debugging is key.
Real programmers debug their code with a debugger.
If you see someone who has used a language for years but don't know how to properly debug it.. their skills are sus.
2
u/[deleted] Apr 28 '26
[removed] — view removed comment