I wanted to add that if you're brand new to PowerShell then you should take a look at <em>PowerShell in a Month of Lunches</em>.
Also, take a look at /r/PowerShell. There are fantastic people in there, and they're incredibly knowledgeable.
https://www.amazon.com/dp/1617294160/ref=cm_sw_r_cp_apa_fabc_r74aGb8T88YNW
That book helped me learn all the basics and then some that I needed, when I started learning powershell. I still use it as a reference for writing scripts even after reading it too. It is super helpful and gets you learning the shell, the syntax of the script, and how to find information in the shell to do what you need. I can't recommend this enough.
I'm not aware of a fourth edition. You want "Learn Windows Powershell in a Month of Lunches". This is the one I have but it's third edition: Learn Windows PowerShell in a Month of Lunches, Third Edition: Amazon.co.uk: Jones, Donald, Hicks, Jeffrey: 9781617294167: Books
There is also "Learn Powershell Scripting in a Month of Lunches" - This has a yellow cover and should be read after the above book. It goes into writing scripts you can reuse but you need to know the basics in the first book before you can really get into this.
There is also another called "Learn Powershell Tool Making in a Month of Lunches" - This is an older version of "Learn Powershell Scripting in a Month of Lunches". They renamed it in later versions.
https://www.amazon.com/dp/1617294160/ref=cm_sw_r_cp_apa_glt_fabc_WG7E0NR7WXYNM1H67Z28
That book is probably one of the best books I've ever read for learning a topic. Other than reading that book, I would suggest finding something you want to automate and then plugging that into Google. I think the first script I ever wrote was a mass reboot of all workstations in my domain. I just googled it until I found where someone else did it and then tweaked it for my use.
Not really fair to link to a PDF copy of the book. It's a fantastic book and worth purchasing and supporting the author.
Second this, it is pretty inexpensive on Amazon and full of good stuff. I had been working in Powershell for about a year or so off and on before I picked it up and have already filled in a lot of gaps in my knowledge from just the first few chapters.
I bought my print edition from Amazon and you also get a free LiveBook (online book where you can post questions, small community of people there too, seems active enough). Powershell in a month of lunches
​
Definitely a great book. There are others too, the one I pasted is primarily just for learning the basics of the Powershell CLI. There are others for really learning how to script and build with Powershell more in-depth.
Lots of folks recommend PowerShell in a month of lunches, but I never ended up reading it.. I mostly learned from search engine queries consisting of "powershell <cmdlet name> <two to three words describing what you're doing>" which usually results in links to stackexchange and coding blogs.
If you want some beginner reading material (I had these on a Kindle that I read during bus commutes), DM me and I'll send you a link to some PowerShell eBook PDFs. They're about a decade out of date (they describe PowerShell 2.0 and 3.0), but they're still good for an introduction to the language.
Powershell in a Month of Lunches. It will give a good foundation on how to do/discover things in Powershell. There is a new edition coming out in Feb, but the older, from 2016, is still fine. As the changes in Powershell versions that the newer edition would cover are not significant enough to warrant waiting when starting out.
> powershell I struggle with, how should I go about learning like using it?
/r/PowerShell
Learn Windows PowerShell in a Month of Lunches 3rd Edition
> Should I just sort of do random things?
What kinds of things would a business environment want you to do?
(ask in /r/powershell )
> I can piece together code well enough to get by, but couldn’t write from scratch
You should fix that gap at some point.
Yes! You can have a script create the user, push a delta sync to O365, then set attributes, assign licenses, create mailbox, set mailbox configuration, etc. You can also just have the script search for mailboxes or users with the same username, here is a snippet of what that may look like.
$NewUser = Read-Host 'Please enter the FIRST and LAST name of new user' $FName,$LName = $NewUser.Split(' ', 2) #split at the space and devide into 2 variables $User = $Fname[0]+$LName if(Get-ADUser -Filter {SamAccountName -eq $User}) { Write-Host 'User Already Exists' $User = Read-Host "Please enter $FName $LName's desired Username" }
In this snippet, you're prompted to put in the first and last name of the new user. The script will create the username of first initial and last name and then search the AD to make sure there is no other user object with that username.
I HIGHLY recommend learning PowerShell if you're going into a Windows Admin role. Check out Learn PowerShell in A Month of Lunches. Also, head over to /r/powershell if you have any questions.
I recommend spending some money on this book and learning to make some yourself. That's how I learned to make mine, plus it seriously boosts your resume.
It is actually fairly straightforward to do in Powershell if your source data is sound.
https://www.amazon.co.uk/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160/
Learning Powershell is a requirement for the job. There are third party tools for this task, but you need to learn PS anyway. It's not difficult and won't take long to learn the basics.
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 <u>Learn PowerShell in a Month of Lunches</u> 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!
https://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160
​
All you need to start
Learn Powershell in a Month of Lunches
Also, SS64 has a great Index/reference of PS commands.
Another good thing to do is to start searching the web for "how do I $taskName in Powershell."
PowerShell in a Month of Lunches is always the most recommended one:
https://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160
If you’re looking for resources that may be helpful, have you tried the “Learn PowerShell in a month of lunches” series by Don Jones? https://www.amazon.com/dp/1617294160/ref=cm_sw_r_cp_api_i_fJafCb1K1VSKQ
Also, Microsoft Virtual Academy has a good training course with Jeffrey Snover (https://mva.microsoft.com/en-US/training-courses/getting-started-with-microsoft-powershell-8276)
They’ve been a major help to me and I had no experience coding prior to them.
If you're fairly new, I think you should start something like Learn Windows PowerShell in a Month of Lunches. You'll find this recommendation everywhere and for good reason. I personally was an peer reviewer of the 3rd edition and read it page-for-page slowly and provided a lot of feedback. It's a good book to get started with.
After that then move into the advanced tool making books like Learn PowerShell Toolmaking in a Month of Lunches.
Of course this just help get you started. You'll need to get a lot of practice with realistic projects to become familiar with how to build tools. I would highly recommend becoming very familiar with Git. There are a TON of tutorials out there (both web pages and YouTube videos).
Honestly to become a good toolmaker you'll need a lot of practice, but in terms of material these are a good source to get you started. Be patient and try to find small projects that you can grab onto. I would also recommend Windows PowerShell in Action for a more under-the-hood kind of view of how things work.
Ticket: "I cannot change the order of my displays from control panel anymore"
Ticket Closed
Resolution: Git gud, scrub
Depends on your previous knowledge of scripting/programming but if little to none I'd recommend
Learn Powershell in a month of lunches: https://www.amazon.com/dp/1617294160/ref=cm_sw_r_cp_apa_glt_fabc_3H478HT6G3ZY175PXSHD
I got my copy off amazon - https://www.amazon.com.au/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160/ref=sr_1_1?crid=3E05CQGIIHRNB
No worries.
Learn Windows PowerShell in a Month of Lunches
These might help too:
[/r/ITCareerQuestions Wiki](/r/ITCareerQuestions/wiki/index) |
[/r/CSCareerQuestions Wiki](/r/cscareerquestions/wiki/index) |
[/r/Sysadmin Wiki](/r/sysadmin/wiki/index ) |
[/r/Networking Wiki](/r/networking/wiki/index) |
[/r/NetSec Wiki](/r/netsec/wiki/index) |
[/r/NetSecStudents Wiki](/r/netsecstudents/wiki/index) |
[/r/SecurityCareerAdvice/](/r/SecurityCareerAdvice/) |
[/r/CompTIA Wiki](/r/CompTIA/wiki/index) |
[/r/Linux4Noobs Wiki](/r/linux4noobs/wiki/index) |
Essential Blogs for Early-Career Technology Workers |
Krebs on Security: Thinking of a Cybersecurity Career? Read This |
Ivan Pepelnjak: SDN, Career Choices and Magic Graphs |
Packet Pushers: Does SDN Mean IT Will Be Able To Get Rid of Network People? |
https://www.amazon.ca/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160
Try this book first. Good first step.
Did you read "Learn Windows PowerShell" first or did you jump right to "Learn PowerShell Scripting"?
From Learn PowerShell in a Month of Lunches [Link]:
1.1. Why you can’t afford to ignore PowerShell Batch. KiXtart. VBScript. Let’s face it, Windows PowerShell isn’t exactly Microsoft’s (or anyone else’s) first effort at providing automation capabilities to Windows administrators. We think it’s valuable to understand why you should care about Power-Shell, because when you do, you’ll feel comfortable that the time you commit to learning PowerShell will pay off. Let’s start by considering what life was like before PowerShell came along, and look at some of the advantages of using this shell.
1.1.1. LIFE WITHOUT POWERSHELL Windows administrators have always been happy to click around in the graphical user interface (GUI) to accomplish their chores. After all, the GUI is largely the whole point of Windows—the operating system isn’t called Text, after all. GUIs are great because they enable you to discover what you can do. Don remembers the first time he opened Active Directory Users and Computers. He hovered over icons and read tooltips, pulled down menus, and right-clicked things, all to see what was available. GUIs make learning a tool easier. Unfortunately, GUIs have zero return on that investment. If it takes you five minutes to create a new user in Active Directory (and assuming you’re filling in a lot of the fields, that’s a reasonable estimate), you’ll never get any faster than that. One hundred users will take five hundred minutes—there’s no way, short of learning to type and click faster, to make the process go any quicker.
Microsoft has tried to deal with that problem a bit haphazardly, and VBScript was probably its most successful attempt. It might have taken you an hour to write a VBScript that could import new users from a CSV file, but after you’d invested that hour, creating users in the future would take only a few seconds. The problem with VBScript is that Microsoft didn’t make a wholehearted effort in supporting it. Microsoft had to remember to make things VBScript accessible, and when developers forgot (or didn’t have time), you were stuck. Want to change the IP address of a network adapter by using VBScript? OK, you can. Want to check its link speed? You can’t, because nobody remembered to hook that up in a way that VBScript could get to. Sorry. Jeffrey Snover, the architect of Windows PowerShell, calls this the last mile. You can do a lot with VBScript (and other, similar technologies), but it tends to let you down at some point, never getting you through that last mile to the finish line.
Windows PowerShell is an express attempt on Microsoft’s part to do a better job and to get you through the last mile. And it’s been a successful attempt so far. Dozens of product groups within Microsoft have adopted PowerShell, an extensive ecosystem of third parties depend on it, and a global community of experts and enthusiasts are pushing the PowerShell envelope every day.
1.1.2. LIFE WITH POWERSHELL Microsoft’s goal for Windows PowerShell is to build 100% of a product’s administrative functionality in the shell. Microsoft continues to build GUI consoles, but those consoles are executing PowerShell commands behind the scenes. That approach forces the company to make sure that every possible thing you can do with the product is accessible through the shell. If you need to automate a repetitive task or create a process that the GUI doesn’t enable well, you can drop into the shell and take full control for yourself.
Several Microsoft products have already adopted this approach, including Exchange Server 2007 and beyond, SharePoint Server 2010 and later, many of the System Center products, Office 365, and many components of Windows itself. Going forward, more and more products and Windows components will follow this pattern. Windows Server 2012, which was where PowerShell v3 was introduced, is almost completely managed from PowerShell—or by a GUI sitting atop PowerShell. That’s why you can’t afford to ignore PowerShell: Over the next few years, it’ll become the basis for more and more administration. It’s already become the foundation for numerous higher-level technologies, including Desired State Configuration (DSC), PowerShell Workflow, and much more. PowerShell is everywhere!
Ask yourself this question: If you were in charge of a team of IT administrators (and perhaps you are), who would you want in your senior, higher-paying positions? Administrators who need several minutes to click their way through a GUI each time they need to perform a task, or ones who can perform tasks in a few seconds after automating them? We already know the answer from almost every other part of the IT world. Ask a Cisco administrator, or an AS/400 operator, or a UNIX administrator. The answer is, “I’d rather have the person who can run things more efficiently from the command line.” Going forward, the Windows world will start to split into two groups: administrators who can use PowerShell, and those who can’t. As Don famously said at Microsoft’s TechEd 2010 conference, “Your choice is learn PowerShell, or would you like fries with that?”
Tolles Buch: Powershell in a month of lunches v3
Besserer Editor als ISE ist VSCode und auch die Standardempfehlung von Microsoft.
It will really help you understand what's going on in those scripts.
I did python with coding with mosh but its all trial and error, some online teachers were difficult for me to understand so you have to find some website where they can explain coding in a way you can understand then you just have to dive in and fail a shitload of times.
As far as scripting I did "Learn Windows PowerShell in a Month of Lunches" and from that point, PowerShell became an addiction. You can literally do anything in PowerShell it's glorious.
Pick up the book Learn Windows PowerShell in a Month of Lunches
Learn Powershell in a Month of Lunches is pretty well regarded as a great starting point.
This is the one everyone I know has used to learn it.
https://www.amazon.com/dp/1617294160/ref=cm_sw_r_cp_apa_fab_UJCCFbPDB8F0F
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...
> I am new to PowerShell and I am unsure on where to start.
Please choose your option:
With a tutorial.
By Googling 'powershell multiple choice'.
Are you sure?
https://www.reddit.com/r/PowerShell/comments/4ad8or/create_user_menus_from_objectsarrays/
https://www.reddit.com/r/PowerShell/comments/8afs51/create_dynamic_menu_from_array/
https://www.reddit.com/r/PowerShell/comments/2wk94i/creating_a_better_menu_structure/
https://www.reddit.com/r/PowerShell/comments/6cs2z5/adding_a_menu_to_a_variable/
https://www.reddit.com/r/PowerShell/comments/4or5s7/writemenups1_cli_menu_incl_keyboard_navigation/
Have you tried just jumping into power shell? power shell in a month of lunches is a great place to start.
Some literary resources you should find helpful. When in doubt, track down the best in your field and find out what they are writing/doing (Good Luck!)
Learn Windows PowerShell in a Month of Lunches https://www.amazon.com/dp/1617294160/ref=cm_sw_r_cp_apa_c--CzbBZM4SFB
https://www.manning.com/books/learn-windows-powershell-in-a-month-of-lunches-third-edition
Virtual Labs Building Virtual Machine Labs: A Hands-On Guide https://www.amazon.com/dp/1546932631/ref=cm_sw_r_cp_apa_4b.Czb24JYXTM
Microsoft Books: (I am positive you can scrape some useful AD information from this collection) https://blogs.msdn.microsoft.com/mssmallbiz/2017/07/11/largest-free-microsoft-ebook-giveaway-im-giving-away-millions-of-free-microsoft-ebooks-again-including-windows-10-office-365-office-2016-power-bi-azure-windows-8-1-office-2013-sharepo/
https://www.amazon.co.uk/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160/ref=dp_ob_image_bk
I tell a lie, paperback only, apologies!
>Like, how does Enter-PSSession even make sense?
If you want this stuff to make sense you have to learn how the syntax is laid out and the logic behind it. Once you get comfortable if you know some things you can start figuring out other things very easily but you have to put time in a book or classroom on Powershell.
https://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160/ref=dp_ob_image_bk