Top products from r/PowerShell

We found 99 product mentions on r/PowerShell. We ranked the 51 resulting products by number of redditors who mentioned them. Here are the top 20.

Next page

Top comments that mention products on r/PowerShell:

u/evetsleep · 3 pointsr/PowerShell

Hey /u/Dude_with_the_pants! So this is a wall off text now that I've written it..sorry about that but honestly when I start talking PowerShell I can go on forever (as my peers at work can attest). So I hope this is kind of useful for you.

So you're looking for some real-world here goes from where I sit. I've been using PowerShell since it was in a long time. Prior to PowerShell I was a point-n-click guy. No scripting experience (beyond embarrassingly bad batch files). I'd open VB scripts and kind of zone out. PowerShell really opened a door for me. For the past 20 years I've been working for some really large companies (5,000 - 160,000) as an Exchange\AD guy with my current stint...about the last 13 years or so, I've worked for the same company. This has been an evolution of sorts, but ever since PowerShell v1.0 dropped in my lap during the Exchange 2007 beta I was hooked and started to automate and built tools.

This was a long time ago now, so my skills and uses have matured quite a bit (at least I'd like to think so). Looking through this thread you've already gotten a lot of really good responses. In terms of using PowerShell and where to start I like what others have said. When you reach for the mouse and start clicking on stuff to complete a task, note somewhere what that task was and then when you have down time, look up how to do it with PowerShell. Odds are really good, especially now, that there is a way to do it with PowerShell. If I may be so bold, but I'd recommend taking a look at Learn Windows PowerShell in a Month of Lunches. I recently did a manuscript review of it for the publisher which required me to slowly read through every single page. It's a good staring point and I highly recommend it.

That all said, daily PowerShell usage.. So I've spent the last decade automating and tool-making which my employer has really taking a liking to (not sure why, but I enjoy myself). Here are some examples of what I've done with PowerShell:

  • Designed a centrally managed PowerShell console that is extended by custom functions that various IT teams manage. When I user logs in to my custom PowerShell console it looks over what groups they're a member of and customizes they're PowerShell environment based off that. This includes loading custom modules, establishing remoting connections to Exchange\Skype, and so on. Currently used by ~100 or so IT folks. I built this, in my free time, about 6 years ago after I was tired of seeing everyone doing things differently (and inefficiently) and pointy-clicky on things when I knew I could make it faster for them.
  • When ever a user changes their password I have an hourly script which detects that change and notifies them via email as well as SMS that their password was changed and gives them some steps on what to do (such as change their password on their mobile devices and such).
  • Designed a PowerShell, PHP (for PowerShell backed web services), & PSSQLite architecture (thanks /u/ramblingcookiemonste!) which I've used to link together separate Active Directory forests and track various acquisitions. Basically this system tracks groups (and their memberships), users, and computers as they are migrated from one forest into the other. We do a lot of ..ahem.. acquisitions so this is a HUGE time saver. For example, when the project manager for an acquisition needs an update on what percentage of an office has migrated to our forest instead of hounding me (or the tech lead who is running an acquisition) they can just view a few web pages to get the info they need. No more bugging me so I can get back to my code! Did this in my spare time so the PM's would leave me alone...and it much so they asked for an official framework which I'm working on still.
  • I have a suite of tools that I wrote which query Splunk's REST API to pull data out for various tasks. For example, not long ago I was asked to provide a detailed report on the exact last logon time for approximately 300 people...who were no longer in our AD. My Splunk module made quick work of that. Took me about 10 minutes to get that info for the auditors. In the old days this kind of request would make me cry.
  • A long time ago we used to have real pains over unused accounts (both users and computers). I wrote an automation process which completely automates the detection of stale\unused accounts and send them through a workflow that I designed so that they are first identified, their contacts notified (manager..if they're a user, or admin contact if they're a machine), then they are disabled, and then eventually deleted after further notifications. All automated so I (or my peers) need to worry about it.
  • We don't use Active Directory for DNS, and so I had to write a tool which interrogates our DNS system to pull out subnet info (new subnets, changes, and deletes) and then pass that into Active Directory. This also heavily uses PSSQLite...I might be a little obsessed with this little database technology. With this I don't need to worry about what subnets are (or are not) in AD and if they're associated with the right AD site. Quite a few teams are quite happy with my tool, in particular the software distribution team as they're tools can now properly work with clients and find them in the right AD site.
  • By far my more heavily used tool is a directory searching tool. See where I work we don't have just AD (~140 DC's I might add), but other LDAP based directories and we needed a tool that could search any of them. Instead of having 15 ways of getting at that data I have 1. A single module where I can pass in a few basic parameters and get my LDAP query back.

    For day-to-day stuff, not long ago I needed to query the Windows time configuration status of all our domain controllers. Using remoting this was trivial. If you had 2 DC's then I guess it isn't a big deal, but for us fanning out through remoting to audit this data is absolutely necessary. I find remoting is a quality of life kind of thing. Yes I could RDP into something, but 9/10 times it is way faster to just run

    Invoke-Command -ComputerName machineName -ScriptBlock {do something}

    So day-to-day, for what I do, I'm honestly writing tools or working in automation projects 90% of the time. I only get into the shell to do something if something is really broken and none of my automation tools have already handled it. Not everyone has that luxury (and it is btw). If I was you I'd look for every opportunity to learn how to do stuff with PowerShell. I think you'll find that in most cases it will free you up to do other things. It'll be awkward at first as you fumble around, but you'll soon find ways to speed things up.

    I wouldn't be too obsessed with just looking at remoting stuff. It's true that this does expose some of the power of ..well.. PowerShell, but there is sooo much more to it. Look for ways to improve your daily life. Jot down the stuff you do a lot (and repeatedly). Those are your prime targets. It could even be something as simple as processing your mail in the morning. If there are certain patterns you follow and do a lot can absolutely hook in PowerShell into that too if writing Outlook rules won't do what you need (I've done this too).

    Good luck and happy shelling!
u/KevMar · 1 pointr/PowerShell

The smaller the better. From a development point of view there is a lot of god materials on writing clean code that is easy to read, work with and maintain. (

I break everything into smaller functions. Each function gets it's own file. The vast majority of my functions and scripts fit on one screen (once you get past the help and parameters). You build a library of functions that are very easy to find. Because the name of the file is the name of the function, I can look at a tree view of the folder and see all of my functions and go right to it.

When you use source control, you have all the changes and edits very cleanly defined. All the comments are more localized to that file. If you have pester tests, it is easy to pair them up and know you have coverage. If you need to track down a old version of a function, it stands on its own. You can much easier tell the last time that piece of code was changed. (even if you are looking at filesystem based backups.

These functions become reusable as modules and only have to exist once. If you copy the same functions over and over into other scripts, then you also copy bugs around. If you fix something, how do you know you fixed it everywhere it was used? If it is a standalone function in a module, improvements to that one file benefit every script that uses it (This is where you benefit from automated tests).

When you have small functions, your nesting is less deep. Your variables are also tighter in scope. This means you can use very basic simple variable names. You can call that thing $user and get away with it. Those giant scripts are full of $userName $tempUser $userObject $user2 $newUser $ADUser $userList and the longer the script, the more creative you have to get. Also in smaller functions, you can see the initiation of all the variables are you using on the same screen that the code using it is on.

The monolithic file works great when you are just in the zone and laying out code. For those 2-6 hours, you have the whole script in your head. Scrolling around is not a big deal. But when you return to it, that mental map is gone. You have to scroll all over to see what is going on. Often you will see giant blobs of comments telling you to stop scrolling.

The smaller the better and each in their own files. However small your functions are, they are still too big. My functions are about 1/3 help, 1/3 parameters and 1/3 code. I'll stop ranting there. But you get my point.

u/replicaJunction · 11 pointsr/PowerShell

Learn PowerShell in a Month of Lunches is one of the most widely-recommended books on starting PowerShell. I'd recommend following along and physically typing commands in to see what happens - don't just read it.

Alternatively, if you've got the time, one of the most comprehensive introductions is the Microsoft Virtual Academy course on PowerShell 3.0. Don't worry - even though PowerShell 5.0 has been released, this is still very relevant information. It's long - almost 8 hours of videos - but these guys know what they're talking about and they explain it quite well.

Beyond that, check out the resources in the sidebar of this sub. There are a couple other intro books and guides, as well as a lot of script resources to look at.

Finally, once you have a feel for what the language is, the best way to discover what the language can do is to find something you already do a lot, and figure out a way that PowerShell can automate that process. It sounds like your senior engineers have some examples of this already, but don't be afraid to expriment. I have to produce a lot of Excel reports, so the PSExcel module for PowerShell lets me automatically create those reports.

Hope that helps!

u/chadpatrick · 1 pointr/PowerShell

MrPowerScripts has a good point with the ExecutionPolicy. As a side note, this can be set through Active Directory Group Policy. Though there are security implications you may do so by going to

Computer Configuration | Administrative Templates | Windows Components
| Windows PowerShell and configure the Turn On Script Execution

If you're new to Windows and Scripting, you will find PowerShell as easy to learn as it is powerful. However, I cannot overstate the importance of a good understanding.

That is a good manual. They were giving them out at MS TechEd a couple of years ago and I loved it. I wish you luck!


u/loveandbs · 3 pointsr/PowerShell

As a beginner (still am), I have found the easiest way to learn is to just dive in using Powershell for any tasks that you do during your normal day (especially the repetitive ones).

With that said, I have found it highly beneficial to use a couple resources:

  • Subscribe to this Reddit /r/PowerShell
  • Subscribe to "Hey, Scirpting Guy!" blog
  • Buy the book Powershell in a Month of Lunches - A Youtube Channel also exists
  • Search for Powershell related courses on Microsoft Virtual Academy
  • Head on over to and go exploring
  • Visit the TechNet Script Gallery. Study and understand any available, high-rated scripts.

    To be honest, the most important tip in my opinion to learn how to use PS is the get-help command. This will teach you how to use just about every command out there minimizing most questions that you are looking to ask. A second tip: Learn what it means to "Pass by value" and "Pass by Property Name." This will help you immensely when combining commands using the pipeline.

    Quick warning: Powershell will quickly get addictive. Also, it is a community where people enjoy sharing and giving back.

    Last note, I swear. Learn shortcuts. It will save you a HUGE amount of time ( hitting esc on your keyboard to clear the line.)
u/kirizan · 2 pointsr/PowerShell

I'm not sure why it's not running, but you should think about changing your if-elseif to a switch statement. Here is a link that will explain it more. In this script it won't make much of a difference, but eventually you will begin to do more things with Powershell, and it's better to start with good practices before making bad habits.

I recommend this book. I haven't read it, but I have heard many good reviews on it from many different people.

Hope that helps some, and enjoy Powershell. It will really assist you as an admin, and it is very powerful once you start to understand the basics of how to work with it.

u/firefox15 · 3 pointsr/PowerShell

Okay, /u/kd9333, don't take this the wrong way, but have you considered brushing up on some POSH basics, maybe something like PowerShell in a Month of Lunches. You have been asking a lot of questions about this script (and general PowerShell questions) in the past few weeks, and honestly, some of your responses are literally you asking people to do 100% of the work for you, even after they point you in the right direction.

Many people are willing to help you learn PowerShell, but many of the questions are you asking are pretty basic, and they would likely be answered if you took the time to really learn the basics of the language. That, plus a few questions that look like homework make me question if this is just us doing schoolwork for you or if this is an actual question you need assistance with.

To your question, you don't need to type your date field as [datetime] when you send it to Out-File. It's already in that format. You will likely want to convert it to a string before hand using either a method or a format operator so that it is in the format you want.

u/BitteringAgent · 4 pointsr/PowerShell

For my situation, my helpdesk use scripts I've created on a daily basis to make new users, terminate users, and check on what locks people out. Small things like this make a 10-30 minute task take seconds which frees up a lot of time. If you're really wanting to learn powershell and have very little knowledge of it, I recommend picking up "PowerShell in a Month of Lunches". It will give you a good idea on how to export and import data. If I remember correctly it also gets into loops which helps immensely.

PowerShell takes time to learn, but if you want to learn it, I recommend googling how to do whatever task you're trying to do in powershell. Maybe don't do it at the time the task needs to be completed if you're understaffed and overwhelmed. But definitely go back and learn how to do it in PowerShell. After some time doing this, you'll be surprised at what you can accomplish when it comes to tasks involving all of your users or at least a good handful of them.

u/get-postanote · 3 pointsr/PowerShell

Nothing is every really outdated, as you never know what you are going to encounter in a target / assigned environment and even have to continue to deal with legacy OS, PS versions and now cross platform. That cross platfomr bit, as far as in depth stuff, no refrence really exists, yet.


Why are not all the built-in help files and ps1/psm1, etc., not a good reference point and well as all the docs on the MS PowerShell GtiHub and docs site as well as these handy resources and one of the other top PS books that been around: for years now:

Windows PowerShell in Action, Second Edition Second Edition


And coding in general -just becasue the more your script , eventually understand real coding practices is paramount. Look to this reference. It's not PowerShell specific, but for wrapping you head and goals around coding practices.

Code Complete (Developer Best Practices)


PowerShell Documentation


Other free eBook references


Windows PowerShell Survival Guide


DevOps Collective Videos


Cheet Sheets


PowerShell Best Practices




u/DrakharD · 2 pointsr/PowerShell

Would I create new lines below that one for the other OUs?

No, absolutely not. :)

The line I wrote is all you need.I'll try to explain it line by line.


$data = Import-Csv -Delimiter "," -Path C:\temp\data.csv

This line will import csv data from path C:\temp\data.csv into variable $data and it will use , as delimiter.Run it on your data and then run just $data to check what is inside your new variable.

$OU = ($data | select OU -Unique).OU

This line will select only OU column from your csv data in variable $data and it will select only unique values, so if you have users that are in same OU it will not duplicate it.After you run it check what's inside your variable by call it $OU.


Now we come to foreach loop.

foreach ($item in $OU) { New-ADOrganizationalUnit -Name $item -Path "dc=contoso, dc=com" }

It does exactly what it say, for each item, value inside variable OU it will run following code

New-ADOrganizationalUnit -Name $item -Path "dc=contoso, dc=com"

So let pretend you have this inside your variable OU.$OU



If we were to ran this code:

foreach ($item in $OU) { Write-Host "test" }

This would be the result in my terminal

Since we have 5 items inside $OU and command Write-Host "test" will be ran 5 times.

Now if I were to ran this code:


foreach ($item in $OU) { Write-Host "$item" }

This would be the result in my terminal



It will take each item from OU and output it to terminal.


I hope that makes it clear for you why all you need is this one line.

New-ADOrganizationalUnit -Name $item -Path "dc=contoso, dc=com"


If you really want to learn powershell and not just finish you project I strongly suggest this book:

Learn Windows PowerShell in a Month of Lunches


It's great book, really accessible and written in such approachable way that I guarantee if you finish it, you will understand and know powershell basics. :)

If you are more video guy this is old but great video series that will explain powershell basics.Big plus it's Jeffrey Snover talking about powershell. Can't beat that with a baseball bat :)

u/storyadmin · 3 pointsr/PowerShell

I'd also recommend Windows PowerShell Cookbook Scripting but it isn't cheap ether. I've always found cookbooks useful because they are just a bunch of examples of how to create tooling once you know the foundation for anything. I'd also recommend reading some of the Powershell MVPs blogs they do some excellent content for the community. I learn a lot from them as well.

u/ramblingcookiemonste · 10 pointsr/PowerShell


I keep a list of resources I've found helpful for learning PowerShell here. Books, cheat sheets, videos, etc.

Highlights (from my perspective)

If you prefer videos:

u/Cruril · 1 pointr/PowerShell

> Is there any prior knowledge needed and if so what?

No prior knowledge needed. Of course, if you have experience with other scripting languages and some core concepts (if statements, variables, etc), it certainly helps.

> Just wondering if there is a best practice for newbies of powershell?

Try to think of something you want to do. It could be as simple as creating folders that have a unique name (like based off the date created), but the more you practice even mundane tasks in Powershell, the more you are going to learn about how it works and how to make it do what you want.

> If anyone could recommend some resources to help me get started that would be greatly appreciated.

There is no shame in going onto Google and searching for Powershell scripts that others have made. If you do take this approach, I would recommend trying to break down and analyze what the script is doing with each command and line. Also, this book really helped me get my foot in the door (well worth the ~$36):

u/labmansteve · 42 pointsr/PowerShell

Honestly, I'd go with Windows Powershell Best Practices instead. PSIAMOL is nice, but this one focuses more heavily on ensuring you not only get the syntax, but the proper script structure, code re-usability, high performance, and just a ton of other stuff.

PSIAMOL Teaches you how to use PowerShell. WPBP teaches you how to be good at PowerShell.

Once that's done, it wouldn't hurt to check out Code Complete which had such an impact I ended up re-writing several of my larger scripts after reading it...

u/_mroloff · 27 pointsr/PowerShell

PowerShell in a Month of Lunches is kind of the defacto starter book.

From there, I would recommend diving into The PowerShell Scripting and Toolmaking Book.

Naturally, this sub is also an excellent resource. You could also join the PowerShell Slack, where tons of good discussions/examples can be found.

u/ihaxr · 2 pointsr/PowerShell

It took me a while to get good at PowerShell and I had a pretty extensive programming background prior to trying to learn it.

The Exchange cmdlets are also less than ideal when trying to learn... but it was also my first experience with PowerShell. They're usually pretty slow to run and aren't great from a syntax standpoint. The AD and file system cmdlets (Get-ChildItem / Get-Item) are more consistent, faster, and generally easier to work with.

Trial and error, as well as looking at code examples on /r/PowerShell is the way I ended up learning. You'll notice on /r/PowerShell people usually post very different ways of solving a problem and one isn't necessarily better than the other, but just use different features or logic.

PowerShell in a month of lunches is usually the recommended book / guide.

u/jzetterman · 6 pointsr/PowerShell

The best PS book I've come across is Learn PowerShell in a Month of Lunches:


Also, keep an eye out for the authors in blog posts as you're Googling. Don Jones and Jeff Hicks are both really active on as well as

u/chelbornio · 2 pointsr/PowerShell

Grab Don Jones' PowerShell in a Month of Lunches, it's well worth it, and an easy way to become proficient. That said, Ed Wilson's Hey Scripting Guy blog is also a fantastic resource.

u/gaz2600 · 3 pointsr/PowerShell

I was like you no programming experience at all. I learned from these videos, I suggest you download them as MS is decommissioning this site soon.

  1. Getting Started with Microsoft PowerShell
  2. Using PowerShell for Active Directory

    and everyone will recommend reading Learn Windows PowerShell in a Month of Lunches although I'm not a big reader and have not gone through most of this book. The two video modules will give you a good start. This reddit has also helped ALOT.
u/billyyankNova · 3 pointsr/PowerShell

I was in the same boat as you when I first started learning PowerShell. I had experience in C++, C and Java. I bought The Windows PowerShell Cookbook to use as a reference and just started to wing it. It helped that I'm a sysadmin at a large company and I'm pretty much left to my own devices as long as I get my tickets and projects done. Each time I'd want to do something in PowerShell, I'd just plunk away at it. I'd use Get-Help, the reference book, and Google to help me along. A lot of it was just thinking about how I'd do something in another language, then figuring out the equivalents in PS.

When I first started, I would write structured scripts, but now I pretty much do everything on the command line.

u/Raynefire · 4 pointsr/PowerShell

Learn Windows PowerShell in a month of lunches is a great start!

That walks you through some of the basics.

Once you feel comfortable using Get-Help and Get-Member, you should be able to slowly work through any problem that you want to solve, by reading documentation on each cmdlet via get-help and analyzing objects with get-member.

u/root-node · 3 pointsr/PowerShell

The best way I found to learn something is to find a project that relies on it.

For example, I never knew any powershell a few years ago, but I was given a project to write some QA scripts for work. That turned into a 8000+ line modularised script that anyone can use and create plugins for.

I am currently working on building servers and applications using PowerShell (installing and configuring AD, SQL, MSCS, RDP, ...)

If you haven't already, buy the book "Learn PowerShell In A Month Of Lunches" ( It's the top rated book by everyone.

u/-Divide_by_cucumber- · 1 pointr/PowerShell

Such a good book. Also I've gotten good mileage out of Windows Powershell 3.0 Step by Step (was handed out at a workshop I attended)


u/astro_za · 32 pointsr/PowerShell

Powershell in a month of lunches is apparently quite good, that will cover Powershell from the basics to relatively advanced concepts, although I don't recall it covers AD.

Once you have a grasp of PowerShell, the AD modules are not much trouble to learn at all, MCSA should at least cover some of that.

Also - Take a look under the "resources" tab on the right of this sub.

u/Swarfega · 2 pointsr/PowerShell

There's a menu to the right of this subreddit with various links and book recommendations. You'll need to be on desktop version of the reddit website to see these though.

Personally I really like the Getting started with PowerShell 3.0 Jump Start.

Most will recommend the Learn Windows PowerShell in a Month of Lunches book.

u/Deviltry · 11 pointsr/PowerShell

Powershell in a month of lunches by Don Jones...

I'm a big fan of Don Jones... That's a really good intro book imho.

u/michaeltlombardi · 1 pointr/PowerShell

STLPSUG: May 19, 2016

Presentation: PowerShell Functions

Micah Battin, PowerShell Functions
A link to Micah's Demo notes/scripts will be put up ASAP

u/ambrace911 · 2 pointsr/PowerShell

If you are looking for an actual book, check out "Learn Windows PowerShell in a Month of Lunches"

That's come up more times in various IT forums. The link I posted had the video version by the same author. I am going to get started on this myself. I know enough to get by, but think it will be good to go through the entire thing.

u/tymaster22 · 5 pointsr/PowerShell

Just to add, if you want a good book to read after. This is very informative.

u/arpan3t · 3 pointsr/PowerShell

Powershell in depth is really good after you get done with the month of lunches.

u/jed_PK · 2 pointsr/PowerShell

The Powershell class i'm taking right now uses this book:
It does a good job explaining the how things work.

u/admlshake · 1 pointr/PowerShell

Learn Powershell in a month of lunches
and DNS and BIND are two I always recommend to people looking to learn about the windows side of things.

u/darrk666 · 5 pointsr/PowerShell

I started by reading a book which you can see by Clicking Here

After this I started changing my day to day admin process to use PowerShell instead. Learning other languages might help for looking into loops and things.

u/affieuk · 4 pointsr/PowerShell

I would take a look at Don Jones, PowerShell in a month of Lunches

Not sure if the book is the latest, so have google first.

If you see yourself repeating a task 2 /3 times or more, then look into scripting it, start small and simple and go from there. Once you start seeing the time put into scripting paying off, it'll get easier.

u/adamoo403 · 3 pointsr/PowerShell

PowerShell in Action is apparently quite good. I read somewhere if you wanted a more in depth read on what/how powershell is doing, more so than in 'A month of lunches' then this is the one you want. I haven't read it myself, but I have the 3rd edition on order and its due in May

u/reallybigabe · 6 pointsr/PowerShell

This is probably the most recommended book:

Books aren't really my learning style - to me, it's just solve a problem, then solve it gooder

Maybe I should read more....

u/suddenarborealstop · 3 pointsr/PowerShell

aliases == bad.
tight code is not flexible and is awful to read and edit. use as many functions as you can. there are lots of books around on code quality. here is a good one:

do not copy/paste code. ever.

learn how to use blocks/scopes to your advantage. do not leave variables laying around.

use generic collections, learn why they are useful if you are unfamiliar with them

reduce type casting, and ambiguous parameter binding.

limit how much data is returned from external systems or IO. if you are querying SQL or AD, let the remote server do all the work, and reduce the number of fields returned.

exit from functions early with guard clauses.

use rsjobs to really get speed if you need it.

micro-optimise only if you have to.

u/jpedlow · 2 pointsr/PowerShell
if($Canadian.WestCoast){<br />
$luck = $true<br />
write-output &quot;;<br />
write-output &quot;;<br />
write-output &quot;I got you fam.&quot;<br />
}<br />

u/xDind · 6 pointsr/PowerShell

I taught a powershell class at work a few years ago. We went chapter by chapter through "Lean powershell in a month of lunches"