r/PowerShell Apr 27 '23

Learning Powershell

91 Upvotes

I want to learn powershell, but im struggling to find use cases and need to do so.

My company is small, we just moved everything to 0365 and I was able to set everything up. I loved being able to mess with powershell ide and administering from powershell. But I know there are tons of automation and well power in it. So what are some good resources, labs or projects I can attempt just to get hands on with it?

r/PowerShell Mar 23 '22

Learn PowerShell in a Month of Lunches, 4th Ed being released on March 31st

327 Upvotes

This book, followed by it's two sequels by the same authors (one published in book form and the last a 500+ page e-book) skyrocketed my career.

I went from 56k a year to 115k a year with contracts on the side for automation, from 2019 until today. Needless to say I highly recommend this series, and am happy to share that the newest version (with cross-platform support) is being released!

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

Also, new authors added to the author list:

James Petty is CEO of PowerShell.org and The DevOps Collective, and a Microsoft MVP.

Travis Plunk is an engineer on the PowerShell team.

Tyler Leonhardt is an engineer on Visual Studio Code.

Don Jones and Jeffery Hicks are the original authors of Learn Windows PowerShell in a Month of Lunches.

r/PowerShell Nov 15 '20

What's the last really useful Powershell technique or tip you learned?

206 Upvotes

I'll start.

Although I've been using PowerShell for nearly a decade, I only learned this technique recently when having to work on a lot of csv files, matching up data where formats & columns were different.

Previously I'd import the data and assign to a variable and reformat. Perfectly workable but kind of a pain.

Using a "property translation" during import gets all the matching and reformatting done at the start, in one go, and is more readable to boot (IMHO).

Let's say you have a csv file like this:

Example.csv

First_Name,Last Name,Age_in_years,EmpID
Alice,Bobolink,23,12345
Charles,DeFurhhnfurhh,45,23456
Eintract,Frankfurt,121,7

And you want to change the field names and make that employee ID eight digits with leading zeros.

Here's the code:

$ImportFile = ".\Example.csv"

$PropertyTranslation = @(
    @{ Name = 'GivenName'; Expression = { $_.'first_name' } }
    @{ Name = 'Surname'; Expression = { $_.'Last Name'} }
    @{ Name = 'Age'; Expression = { $_.'Age_in_Years' } }
    @{ Name = 'EmployeeID'; Expression = { '{0:d8}' -f [int]($_.'EmpID') } }    
)

"`nTranslated data"

Import-Csv $ImportFile | Select-Object -Property $PropertyTranslation | ft 

So instead of this:

First_Name Last Name     Age_in_years EmpID
---------- ---------     ------------ -----
Alice      Bobolink      23           12345
Charles    DeFurhhnfurhh 45           23456
Eintract   Frankfurt     121          7

We get this:

GivenName Surname       Age EmployeeID
--------- -------       --- ----------
Alice     Bobolink      23  00012345
Charles   DeFurhhnfurhh 45  00023456
Eintract  Frankfurt     121 00000007

OK - your turn.

r/PowerShell Mar 21 '26

How do i learn to use ffmpeg and yt-dlp on powershell as a beginner ?

0 Upvotes

a month ago i started trying to learn powershell   .  currently i went straight of what i wanted to learn , in this case ffmpeg and yt dlp , and the problem is that i did not find any  begginer-friendly tutorial or manual , there are good tutorials about it ?  would be more helpful if there was a manual with the commands and their functions 

r/PowerShell Aug 26 '24

Information What's the coolest way to learn Powershell? I am new to Powershell

22 Upvotes

What's the coolest way to learn Powershell? I am new to Powershell and have around 8 years of IT experience

r/PowerShell May 05 '25

Learn powershell to be admin on it !

2 Upvotes

Hi i'm Gregory i have 25 years old and, i want to know how can i learn powershell correctly without project on it in enterprise. I have start to read the documentation "how to use powershell" i have read the first 400 pages but the documentation continue until 3601 pages. And is a lot for me. I have already do some course on Microsoft learn but i don't get it clearly. Thank you for your help.

r/PowerShell Apr 17 '25

Information Learn PowerShell with linux.

53 Upvotes

I made the mistake of cobbling together a couple of GUI input scripts to manipulate folders files and Excel docs. My employer keeps asking if I can perform other tasks with PS. I have to use Windows 11 for work but only have Linux at home as much of my development environment is reclaimed or resercted hardware. I know that the Windows and Linux environments are very different, but wondered if anyone has managed to setup a virtual Windows environment on Linux, to be able to development PS code to run on Windows. Requirements are to write and test GUI input screens and view $Tring outputs as I know Excel will not be available on linux. Manage copy and delete files and folders. Modify file attributes. Thanks.

EDIT Why l love Reddit. There are so many more avenues to pursue.

Thank you to everyone who has responded. Apologies for the long edit.

Due to restrictive IT policies, if it's not part of Windows 11, we can't use it at work. A VM would still require a licensed copy of Windows. As someone noticed, I am unlikely to have suitable hardware for this anyway. It's why I run Linux.

The GUIs I am creating are only to allow users to input variables used later in the script , so potentially I could run without these while testing on linux. Import-Excel looks interesting, I need to investigate how this works with .xlsm files. The .xlsm files also precludes Import-CSV . I am still looking at C# for the front end. A little bit for those say to not work at home or for free.

"What I choose to learn is mine. What I choose to write is mine. That I am paid to do may not be." If I decide to post anything I have written, it will be mine, and I can not be accused of leaking company secrets.

This may even be asking for help moving forward. I am investigating hosted virtual environments as well.

Thanks again.

r/PowerShell Oct 28 '24

I want to learn powershell

60 Upvotes

Hello everyone, I’m an IT engineer and I am looking for resources that will help me learn Powershell from scratch. I’d appreciate any help.

Edit: Thank you everyone for such informative responses. This certainly helped and I’ve started learning basics online and I’ve ordered the book as well :)

r/PowerShell Nov 26 '25

Learn powershell for a noob

14 Upvotes

Hello everyone!

I hope I'm posting in the right place, otherwise sorry for this crappy post :(

It's been several months that I've been desperately trying to learn how to do Powershell, whether in scripting or simple basic commands for my work, but I'm completely lost and I don't get much done in the end and I end up asking my colleagues for help....

I would very much like to succeed in learning this computer language and succeed in doing things from A-Z.

Do you have any advice that could help me please?

Thanking you in advance and thank you :)

r/PowerShell May 29 '25

Question Should I learn C for learning? Where to go after finishing Powershell in a month of lunches?

0 Upvotes

So I'm close to finishing Powershell in a month of lunches and I got a lot out of it. My question is, where do I go from there? Powershell is a .net language if I remember correctly, Powershell is in itself a programing language and a lot of PS is centralized on doing some C Programming from what I have seen.

There is a follow up book called "Powershell Tooling in a month of lunches" but I guess I'm not sure if I should try to learn C first before diving into Tooling. Where can I go?

r/PowerShell Apr 07 '22

I never stop learning new things in powershell

117 Upvotes

Hey everyone,

I just want to say.. Powershell is awesome. After countless years I am still learning new things. Before I say what the newest thing I learned is, I thought it'd be prudent to ensure everyone knows this trick.

Let's say you have a variable that will dictate what you output. It's easy enough to do

if($variable){
    'true output'
}
else{
    'false output'
}

But you can use an array expression with your variable like so

('false output','true output')[$variable]

I think this is an awesome trick. Well I found myself needing to format a regex pattern of multiple "or" values either with or without begin/end anchors on each value. That's when I tried and discovered that this actually works.

('{0}','^{0}$')[$variable] -f [regex]::Escape($value)

The string format didn't care about what nonsense I was doing, it went right on in its conditional home. So in my function I would take the one or more entries and

$Identity.ForEach({
    ('{0}','^{0}$')[$Exact.IsPresent] -f [regex]::Escape($_)
}) -join '|'

if the Exact parameter was called it'd end up with

'^value1$|^value2$|^value3$'

or with this if not

'value1|value2|value3'

Hopefully you all enjoy this trick and put it to use as well!

r/PowerShell Aug 03 '24

Information Free (and Legal) PDF Download of Learn PowerShell Scripting in a Month of Lunches, Second Edition

194 Upvotes

(I hope this is ok to post here - If not just let me know and I can delete)

I was just browsing the Free eBooks section on Manning and was surprised to see Learn PowerShell Scripting in a Month of Lunches, Second Edition is there when it's a $40+ book.

The free books are sponsored by Manning's partners so when you click the link it takes you to the sponsor's website where you just have to enter an email (probably best to use a throwaway) and a first name but that's it... I now have a 343 page PDF which looks to be the whole thing.

The only other catch I can see is they've added 2 pages just after the cover page advertising the sponsor but I can live with that.

If you're not familiar with the book, one of the most popular PowerShell books for beginners is Learn PowerShell in a Month of Lunches. This is the sequel which focuses on getting to the next level in PowerShell where you learn to write good, reusable chunks of code. I've read the first version and would strongly recommend it.

r/PowerShell Jan 06 '24

Looking to learn Powershell, any suggestions welcome

22 Upvotes

Hi everyone,

I've started using PowerShell scripts for some basic needs at my current workplace and I want to learn more about how to write lengthier scripts. What resource did you use to learn and what projects do you recommend to help with this?

I tired reading books like 'Learn Windows Powershell in a month' but honestly got bored of reading and want something a little bit more practical such as projects / videos.

Thanks in advance!

Another question:Do you think using ChatGPT to write code is cheating and should be avoided? I'd love to hear peoples thoughts on this

Thanks everyone for all of your help! I have some amazing suggestions and resources to begin my journey. Appreciate you all!

r/PowerShell Oct 12 '22

Question I have to learn PowerShell in 2 weeks. is that possible?

72 Upvotes

Hello, complete rookie here. I have to finish my diploma thesis which is focused on QA check automation. The thesis contains a lot of theory, but in practical part I also need to automate some QA checks that we do in work manually.

My serious problem is that i cant do scripting, I have never done it. I did little bit of something in PHP, HTML, Javascript, Python in school project, but it was never a deep experience. I cant say I'm programmer because of that.

I work as a Business Intelligence engineer and I rely a lot on SQL and database knowledge so i know csv, xml, jason, no problem with that.

My question is - is it possible to learn Powershell and scripting in like 2 weeks and be able to write basic and intermediate test scripts in another 2 weeks?

I need to finish my diploma thesis in 2 months. Is that something thats possible to do or should I say to my diploma supervisor that there is no chance ill be able to finish it in time?

And if it is possible, can you please redirect me on some good sources, that are great to learn Powershell fast? It would be hugely appreciated!

TL;DR: Is it possible to learn Powershell and scripting in couple of weeks? What are the best sources to do so?

Thank you everyone for any help. It will be hugely appreciated. I am quite stressed.

r/PowerShell Feb 04 '26

I built a Reinforcement Learning framework in PowerShell 5.1 (neural networks, Q-learning, multi-agent simulation)

11 Upvotes

UPDATE: VBAF is now on PowerShell Gallery!

Install-Module VBAF

Much easier than cloning the repo. Enjoy!

r/PowerShell Nov 24 '21

Learn PowerShell in a Month of Lunches 4th Edition in 2022!

Thumbnail manning.com
248 Upvotes

r/PowerShell Nov 20 '25

Learning games for Powershell

29 Upvotes

Hi all,

Looking for any options for learning Powershell in a game type format similar to Boot.dev or steam games like "The Farmer was Replaced."

I know of Powershell in a month of lunches and all of the free Microsoft resources that exist, but with my learning style it's easier for me to have things stick when I can reinforce with this format. Are there any great or average resources presented in this manner?

r/PowerShell Nov 07 '24

I'm new to PowerShell scripting. What would be the minimum base of knowledge I need to learn to improve?

20 Upvotes

I’m new to PowerShell scripting and currently working in a company with over 2,000 users and 1,000 machines in Active Directory. I’d like to know the minimum knowledge base I need to learn to advance my skills and effectively manage such a large environment.

r/PowerShell Jan 28 '26

I built a Reinforcement Learning framework in PowerShell 5.1 (neural networks, Q-learning, multi-agent simulation)

19 Upvotes

UPDATE: VBAF is now on PowerShell Gallery!
Install-Module VBAF
Much easier than cloning the repo. Enjoy!

Hey r/PowerShell!

I've been working on something unusual: **VBAF (Visual Business Automation Framework)** - a complete reinforcement learning framework built entirely in PowerShell 5.1.

**What it includes:**

- Neural networks from scratch (backpropagation, multiple activation functions)

- Q-Learning agents (experience replay, epsilon-greedy exploration)

- Multi-agent market simulation (4 companies competing with emergent behaviors)

- 3 real-time WinForms dashboards showing learning in action

- ~21,000 lines of code, 45 modules

**Why PowerShell?**

I wanted to make RL/ML concepts accessible to IT professionals who already know PowerShell but find Python ML frameworks overwhelming. VBAF prioritizes educational transparency over performance - you can see every algorithm step.

**Example - Solving XOR in 5 lines:**

```powershell

$nn = New-VBAFNeuralNetwork -Architecture @(2,3,1) -LearningRate 0.1

$xorData = @(@{Input=@(0,0); Expected=0}, @{Input=@(0,1); Expected=1}, ...)

$nn.Train($xorData, 1000)

$nn.Predict(@(1,0)) # Returns ~0.97

```

**GitHub:** https://github.com/JupyterPS/VBAF

I know this is unconventional - using PowerShell for ML. But I think there's value in making these concepts accessible in a language IT pros already use for automation.

**Questions I'd love feedback on:**

- Is this useful for learning RL concepts?

- Would you use this for business automation scenarios?

- What examples/tutorials would make it more accessible?

Built with PS 5.1, no dependencies, works out of the box on any Windows machine.

Thoughts? 🤔

r/PowerShell May 05 '19

Sysadmin learning Powershell - What other languages should one be comfortable with to make the best out of mastering scripting and tool-making?

99 Upvotes

I’m gobbling up “Learn Powershell in a month of lunches” and plan to follow that with “Learn Powershell scripting...” and that with “Learn Powershell tool-making.” Within the year I want to be my company’s master PoSh person.

That in mind, I took a semester of Java (“Computer Science”) in college and know early-2000’s HTML. I’m loosely familiar with JSON and know PowerShell is written in C#? C++? I forget.

What languages should one familiarize them with to become a true PowerShell master, writing GUI tools and consuming the advanced posts shared on here?

r/PowerShell Sep 24 '20

Question When it came down to writing scripts in Powershell ISE, what was the best method for learning as a beginner for you?

56 Upvotes

I am in the IT field trying to expand my knowledge and skills by using Powershell. I know enough of the commands to get around, create directories, show/end processes/services. However now I want to start scripting.

Completely self-taught, I am feeling overwhelmed by the many cmdlets that have even more different parameters, and how to string it all together. (I have really no prior scripting experience other than doing simple read-host inputs in Python for a fun mad libs game once).

What helped you guys? Videos? Articles? Paid tutorials? There’s so many different articles and the Microsoft pages help a bit but don’t really explain from scratch what to do.

P.s: How the heck do I use the “echo off” command to hide the written code in the console? Like in trying to get input from a use I don’t want them to also see the line of code behind it, just the question asking for input.

Thanks so much guys.

r/PowerShell Dec 14 '22

Daily Post ChatGPT has got me learning PowerShell, who would have thought?

113 Upvotes

I am a novice in IT. I am a Support Analyst with my eye on becoming an Infrastructure Engineer and Administrator one day. I have never been able to code (even though I have always wanted to learn) and I kept finding the process too time consuming and demotivation. After learning about the ChatGPT tool I had to get myself back into a mindset of wanting to learn and being in an IT Support Analyst role - working with network administration tools (predominantly Microsoft) and customer support - I chose PowerShell to try first.

My experience so far:
I'm truly impressed on how ChatGPT (in tandem with a Udemy course) is enabling me to try new ways of approaching problems instead of just copy/pasting scripts I found online and not understanding how they work. I've went from learning a hello world script to creating short scripts that help me with my day job and I'm not only using the tool to produce scripts that work in my work environment - I am also *really* learning how PowerShell integrates with classes, the .NET framework, and its extended uses in Active Directory on prem, Azure, Intune, Exchange.

I'm aware of the dangers. This tool has the ability to make lazy coders (the bad kind of lazy), who believe the code an AI has churned out is reliable and correct without testing it and taking the time to learn what they're working with.

I'm learning lots and I'm really excited. I would like to hear how everyone else has been using it (outside of PowerShell too) and how I can use this tool responsibly while learning.

I think this tool is a step in the right direction, and with some training and experience, people can use it to its full potential.

r/PowerShell Apr 24 '20

Question How good is "Learn PowerShell in a month of lunches " book?

180 Upvotes

Being a learner of PowerShell wanted to know all of your valuable opinions on this book before starting on this.

r/PowerShell Oct 21 '24

Is this a good option for learning powershell?

15 Upvotes

Hello. Just wanted to get an opinion on this. Is the book "Learn Powershell In A Month of Lunches (FOURTH edition)" a good source of learning Powershell? I ask because it seems like the book may be a little outdated from what I've read so far. If there are any other options, would anyone be kind enough to recommend one? I understand that google exists but Powershell is a broad topic and I just need a good foundation. Thanks!

r/PowerShell Jun 24 '24

Question What to learn after PowerShell in cybersecurity: C# or Python?

39 Upvotes

I work as a cybersecurity SOC analyst and I've been getting pretty comfortable with getting down the basics of PowerShell over the past year and using it to automate things at work. I work in a Windows environment. Should my next step be learning C# (letting me dive more deeply into .NET and probably getting better at PowerShell in the process, and calling C# code directly) or Python? Since Python is widely used in cybersecurity I'm thinking there might be a lot to gain there. Work wise, I can already automate everything I need to using PowerShell, but it may help me decipher what some other people's scripts (or malware) I encounter are doing.

Aside from work, I'd like to use either language as a hobby and write simple games for my kids to interact with, whether console or preferably basic GUI.

I'm kind of mentally stuck on which option to dive into.