Learn Windows PowerShell in a Month of Lunches

Author: Donald W. Jones, Jeffrey Hicks
This Month Reddit 2


by aberugg   2021-12-10

https://labgopher.com/ - Get an old server from there if you can bring something like this home and run it occasionally.

https://www.microsoft.com/en-us/evalcenter/ - Setup a domain, and all that stuff, to simulate roughly the layout of your work, all in VM's.

https://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160/ - Use this and do the examples multiple times.

Within the 30-day mark you should know a good amount to get you started.

Download VSCode, use Powershell IDE, also get the preview version of powershell to stay ahead, find out how to do GUI's for powershell for end users, automate things where you have to enumerate and analyze large information, like folders and all their permissions to audit permissions overall. Make scripts that remove unnecessary win10 components via GPO to workstations. Etc...

by Ziggistawork   2021-12-10

Just note that is the 2nd edition linked. I believe there is a third edition out.


by tomkatt   2019-11-17

It completely depends on what you plan on supporting with it. If you're gonna learn Python, pick up bash and learn how Linux works. You won't see much use for Python in a Windows environment (unless you're a developer or doing BI or something, but this is sysadmin so I'm making the assumption).

If you're heavily invested in Windows environments, learn Powershell. It'll be your bread and butter.

For resources:

  • bash - The Linux Command Line
  • Python - Automate the Boring Stuff
  • Powershell - Learn Powershell in a Month of Lunches

Also, keep an eye on Humble Bundle. They're mostly gaming stuff, but they've had multiple solid programming/scripting/developer book and video bundles in the past.

by firefox15   2019-11-17

Learn Windows PowerShell in a Month of Lunches

by --RedDawg--   2019-11-17

No Problem, but if you are not already set in your ways, stop using cmd line or bat files. For most people it is a crutch, but for you it will almost be an intentional handicap. Use Powershell. Check out this book:


by philmph   2019-08-24



All you need to start

by Syspk   2019-08-24




by ITforreal   2019-08-24

The book "Learn PowerShell in a month of lunches" is a great first read!


by BitteringAgent   2019-07-21


This is how I learned the basics. My boss gave this to me within my first few months of working IT. He saw some potential and I took it and ran. Seriously, just do one module a day and learn it well.

by xsdc   2019-07-21

It's cliche, but Month of Lunches is great if you're looking for a book. Honestly my advice is to solve problems with powershell. Learn to lean heavily on "Get-Command" and "Get-Help". When someone comes to you with something you would normally use the gui for, just figure out how to powershell it (advice - avoid device drivers)

A key piece of Systems Administration is driving yourself. In many situations you are the bottleneck to other people accomplishing their project or to fixing an issue - this means you need to understand that everyone is going to tell you their thing is high priority because they can't do anything til you're done. As you grow, you'll figure out how to get out of that position (automating pieces is a major part of that) but right now, focus on communicating clearly and honestly. Learn to set expectations - that's more important then any technical skill you can focus on.

by sharjeelsayed   2019-07-21


Learn Windows PowerShell in a Month of Lunches 3rd Edition https://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160



Learn Python 3 the Hard Way https://learnpythonthehardway.org/python3 http://www.informit.com/promotions/book-registration-learn-python-3-the-hard-way-141409 (Videos)

Automate the Boring Stuff with Python https://automatetheboringstuff.com

The Python Tutorial http://docs.python.org/py3k/tutorial/index.html

A Gentle Introduction to Programming Using Python https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2011

More at http://Learn.SharjeelSayed.com

by ApprehensiveEdge6   2019-07-21

"how can I learn to script powershell without having the basics for syntaxes"

honestly, i think if you try going this route, you're going to wind up very frustrated. you really ought to start with the basics. you can't just jump straight to the "knowing" part -- have to go through the process of learning before you get there. crawl before you can walk, and all that.

i bought myself a copy of "Learn Powershell in a Month of Lunches" (amazon link: https://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160/) and i like it. many people here on /r/sysadmin recommend it, as well. i would start there to build a good foundation. one of the earliest things the book teaches you is how to use powershell's built-in help and how to read error messages and such, which will become extremely helpful when you do get to the point where you start writing scripts.

buy that book, and/or ask your supervisor to buy you a license to a training site like CBT Nuggets or PluralSight. some people prefer videos and narration over books, but find what works for you, and remember to start with the basics and move up from there.

by kenfury   2019-07-21




by replicaJunction   2019-07-21

The best way to learn anything depends on your learning style. Some people learn better by reading, some by watching videos, and some by doing. It's important to know how you learn effectively.

That said, my recommendation is to find a routine task you do regularly and figure out how to do it automatically with PowerShell. Do you archive old report files to a specific directory structure? Learn about Copy-Item. Do you manage Exchange, SCCM, O365, anything like that? They all have automation support with PowerShell. There are even community modules that support a lot of third-party products - for example, the JiraPS project allows you to manage JIRA items with PowerShell, including creating new issues, commenting on existing ones, and closing them out.

If you prefer reading, the book Learn PowerShell in a Month of Lunches is often recommended - but it's very important that you actually follow along with the exercises in the book. Type them and run them on a live computer whenever possible.

If you prefer videos, I suggest the Microsoft Virtual Academy series on PowerShell. These are a bit long, but they do a great job of teaching you both concepts and practical knowledge.

Hope that helps!

by anonymous   2018-08-06

First let me say I agree stack is not a code generation site. It goes a long way if you have a little bit of code to show as to what you have tried. Even if it is TERRIBLE others in the community will feel compassion and empathy towards you versus negativity. Second please go to amazon and buy the book "Learn Powershell in a Month of Lunches" This will help you a ton and get your fundamentals down. Real easy read.


Ok now off my soapbox. So I have created a csv called updatetelphones.csv and placed it in my C:\temp folder on my desktop. It has two columns one called SamAccountName and a second Called TelephoneNumber. Notice no spaces. With powershell we want to import that into a variable then iterate through each item and set the phone number for the user.

$UsersToUpdate = import-csv -Path "C:\temp\updatetelephones.csv"

foreach($User in $UsersToUpdate)
    Set-ADUser -Identity $User.SamAccountName -OfficePhone $User.TelephoneNumber -WhatIf    

Above is the powershell code. Now look carefully at the end of my set-aduser command I have a -whatif. ANYTIME you are making changes to AD I recommend you test your script with the -whatif first. That simulates the changes but doesn't make any so you can confirm it is accurate. So use this to test on your side. Once you validate remove the "-whatif" and run to actually make the changes. Peace and Happy powershell learning!!

by artvandelay440   2017-08-19

Powershell in a Month of Lunches: https://toptalkedbooks.com/amzn/1617294160

Learn Powershell Toolmaking in a Month of Lunches: https://toptalkedbooks.com/amzn/1617291161

I'd recommend those to someone new to PoSH. :)

by Dragonspear   2017-08-19

Many people (myself included) would recommend getting:


If you have any interest for getting into powershell. It's a great resource.