Boost Your Productivity With Windows PowerShell Scripts

Joel Lee 17-11-2014

What if you could bring the productivity of Linux over to Windows? One of the main differences between Windows and Linux Linux vs. Windows: 8 Key Operating System Differences, Explained Not sure whether to choose Linux or Windows? Here's how both operating systems differ, and why switching isn't as hard as you think. Read More  is that most Linux distros come packaged with the powerful Bash shell A Quick Guide To Get Started With The Linux Command Line You can do lots of amazing stuff with commands in Linux and it's really not difficult to learn. Read More ; by comparison, the command prompt in Windows is barebones. What if Windows had an equally powerful terminal?


With PowerShell, that dream could become reality.

Disclaimer: PowerShell is not “Bash for Windows” nor is it meant to be. Yes, both are command line environments that can greatly improve your productivity, but that’s where the similarities end. You should view PowerShell as its own separate approach to creating a powerful command line environment.

What Is PowerShell?

PowerShell can be thought of as a massive upgrade to Windows command prompt 15 Windows Command Prompt (CMD) Commands You Must Know The command prompt is still a powerful Windows tool. Here are the most useful CMD commands every Windows user needs to know. Read More . It can perform a lot of the same tasks (e.g. navigating the system, interacting with files, modifying properties), but opens up the entire .NET framework for maximum power. To understand the benefits of this, keep reading.

There are two core benefits that make PowerShell better than the traditional command prompt: extensibility and scriptability.



While PowerShell does come with an initial set of commands, you can add your own commands by creating cmdlets. Cmdlets are classes that are created using the C# language and when they’re called, they are executed within the PowerShell environment. Because they are written using C#, cmdlets have access to the entire .NET framework.

The .NET framework contains a huge library of code provided by Microsoft. When writing your own cmdlet, you have access to all of that code. Pulling process information? Cryptographic algorithms? Database connectivity? Network communications? All of that — and more — is provided by the .NET framework, which means most of the work is done for you. You just need to piece it together by calling the right functions.

Microsoft has made it clear that PowerShell isn’t going away — in fact, the upcoming package manager in Windows 10 will be based on PowerShell — so everyone should consider learning it sooner rather than later.

Why PowerShell Is Awesome

PowerShell has plenty of advanced features, most of which may only be relevant for Windows programmers and server administrators, but there are several basic features that are simple to understand, yet extremely useful for everyone.


Simple but powerful. The PowerShell environment is easy enough that anyone can pick it up within a few hours of reading. There is a learning curve, but it’s relatively shallow and you don’t need to learn all of it to make use of it.

Detailed process information. It’s one thing to use an alternative task manager 5 Powerful Alternatives to the Windows Task Manager The Windows Task Manager is good, but it lacks a few features. Try these alternative task managers for Windows instead! Read More , but PowerShell allows you to perform some neat tricks as far as process management is concerned. Start with the native Get-Process and Stop-Process cmdlets.


Easy automation and scripting. Basic Windows doesn’t provide an easy way to automate tasks. Prior to PowerShell, batch files could only perform primitive scripting while third-party solutions were needed for automation (e.g. Perl, AutoHotkey). But with PowerShell, you can schedule tasks to run at a certain time or interval.


For example, with the ScheduledTasks module, you can cause a specific program or process to execute according to a trigger (e.g. at a specific time, when a system event occurs, etc.) and you can define the context for that task (e.g. security limitations).

Command piping and logic. In Bash (Linux), commands can be piped together such that the output of one command can be used as input for another command. For example, the basic Get-Process cmdlet outputs information for all running process. What if you only want info from a subset of processes? You can pipe it with the Where-Object cmdlet, which acts as a process filter, to only execute Get-Process on the processes returned by Where-Object.

PowerShell also provides a few native commands for conditional logic (e.g. If, Else, For, Switch) that can be used to control the flow of cmdlet execution. For example, you could create a PowerShell script that only executes certain cmdlets when certain conditions are met (e.g. clean up processes when RAM is close to full).

Remote and background jobs. Not only can cmdlets be executed as background processes (so you can run multiple tasks at once asynchronously), but many cmdlets can also be executed on remote machines on the network as long as they have been configured to do so. Cmdlets with remote capabilities will often provide a ComputerName parameter that you can indicate when executing said cmdlet.


For more information, check out this TechNet page on running remote commands with PowerShell.

Download third-party scripts. You don’t actually have to extend PowerShell yourself. Several online repositories allow you to download and make use of public scripts and cmdlets that others have created.

Where To Learn PowerShell

Ready to get your hands dirty with PowerShell? Here are a few resources that are often recommended to newbies who want to get learning as soon as possible:

PowerShell Tutorial by Don Jones. This YouTube video series focuses on PowerShell 2.0 (the version that comes packaged with Windows 7), which is a bit outdated now, but offers a good introduction for those who have absolutely no scripting experience. Each video is only a few minutes long, but there are 99 of them, so it’s rather comprehensive.

Microsoft Virtual Academy. MVA offers lots of Microsoft-related courses for free, including two on PowerShell 3.0. There’s the Getting Started course and the Advanced Tools & Scripting course. Both courses contain 9 lessons that are each around 1-hour in length.


TechNet Script Center. The TechNet section of Microsoft’s website includes a lot of great links to PowerShell guides and tutorials. As a bonus, if you navigate to the Repository section, you can browse and download various PowerShell scripts.

Hey, Scripting Guy! Blog [Broken URL Removed]. This is an “all about PowerShell” blog with a LOT of great information that dates back almost an entire decade. New posts are published every day and they’re categorized by tags for easy browsing. If you don’t know where to begin, start by browsing the Getting Started tag [Broken URL Removed].

Is PowerShell For You?

What do you think? Will PowerShell help your productivity on Windows Get Things Done! 5 Ideas To Make The Best Productive Use Of Your Desktop People love their desktops! Whether you're on a Mac, Windows or Linux computer, the desktop is an open space that isn't pre-defined by a rigid structure. Unlike the interfaces of mobile devices or Windows 8's... Read More ? Or is it too much of an overkill for your needs? Share your thoughts with us in the comments!

Related topics: Computer Maintenance, PowerShell.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Anonymous
    February 22, 2016 at 9:22 am

    I would prefer if there were a front end(s), that provided a GUI, and we never even need to see (or type, or paste) the commands/scripts.
    Since I have not seen any front ends, I ask this question -
    If one installed the current free VB.NET program (whatever it is called theses days), could that be used instead of learning commands (and scripts) ?

    I am a very happy VB6 programmer, and I swore that I would never use VB.NET
    But if I were faced with the need to learn Powershell VS me learning VB.NET
    I would go for VB.NET

    If my idea is valid/plausible, perhaps some others might consider that path, instead of getting to grips with PowerShell.
    That would be facilitated by having access to a library of pre-written programs, that we could download, and they would easily be executed.
    And of course an article explaining how to download / Install the free VB.NET plus explanation of how to use the free pre-written programs would be great.

    Am I way off the mark, with my idea ?

    • Anonymous
      February 22, 2016 at 9:26 am

      PS Like Vincent, I too hate videos, and would prefer step by step tutorials

  2. Anonymous
    September 29, 2015 at 10:21 am

    If it is meant to be so easy why do you and other author never mention how to start the power shell. I know how to but as a technical writer/educator I often verify the completeness of materials.

    Note: I don't look at videos as I want to take tutorials step by step and do not like to have to stop a video, role back some frames just to be able to follow the demo hands on.

    In this case the simple instruction of:
    - Open the Windows Menu
    - Click in the search box
    - write Powershell
    - click the powershell or Windows powershell menu option

    Is NEVER EVER mentioned in these explanations/recommendations. If it is so simple to use it write for everybody to understand it and not only for yourself

    • Joel Lee
      October 7, 2015 at 1:04 pm

      Hey Vincent, you're absolutely right. I guess we tend to forget that even the simplest steps need explaining. Thanks for sharing how to open PowerShell. :)

  3. Joe
    November 25, 2014 at 9:57 am

    @Joel Lee - I use Windows very infrequently. I have not used either Cygwin or Powershell. (Neither existed when I was still using Windows regularly.)

    I would expect that the special interfacing that PowerShell has is probably not in Cygwin yet, but with M$ recently releasing some substantial parts of their .Net code into the public domain, that situation is likely to improve.

    I think it's a case of choosing the right tool for the right job. It depends on what you're trying to do. I am not trying to suggest that one tool is better than the other, just that both are available.

  4. SWT
    November 22, 2014 at 12:31 pm

    The people I work with have a problem learning basic Windows commands. If they have to use Power Shell, thew will start looking for a new job! Most people want things to be simple. They go to work, do their job and go home. They don't like change! When will you people learn " Keep It Simple Stupid" !
    I don't have a problem using the Power Shell. But that is because it's what I do. But I have to work with average people.

    • Joel Lee
      November 25, 2014 at 5:51 am

      I agree to an extent. Even the least tech-savvy person can learn basic PowerShell as long as 1) they are convinced that PowerShell can be useful to them and 2) someone teaches it to them in a way that minimizes the learning curve. However, you're right that most people probably won't care enough to want to learn it.

  5. pmshah
    November 20, 2014 at 3:00 am

    @Roger Williams

    I too am an old hand at NDOS, 4DOS, 4NT and now Take Command. At the moment I simply can't live without it. BTW the current version is also linked to Everything, a real time file search utility I consider must have.

    I tried getting into it but wasn't comfortable with the learning curve. I am going to give it a go to find out if it is worth the effort as compared to Take Command. Haven't used cmd.exe in ages!

  6. Joe
    November 20, 2014 at 12:09 am

    In addition to Powershell, there's always cygwin ( which does give you a lot of the tools available to the Linux command line, including bash.

    • Joel Lee
      November 25, 2014 at 5:48 am

      Good point! I haven't used Cygwin in a while but it was pretty neat when I was using it. Does it tie as deeply into the Windows infrastructure as PowerShell? I don't imagine that it would, but I'd be happy to hear otherwise.

  7. likefunbutnot
    November 17, 2014 at 6:23 pm

    I use Powershell every day 'cause it's part of my job description, but if there were a single thing that a non-IT/developer/sysadmin might like to know or use in Powershell it would be the scripts available at, which amount to a *nix style package manager for Windows.

    • Roger Williams
      November 19, 2014 at 8:28 am

      I used to write simple DOS command extensions using 4DOS. I had some nifty dir commands that could search for files on any and all directories with names containing an arbitrary string anywhere in the name, and with other strings excluded. I find Windows 8/8.1 searches very frustrating so maybe I should look into what this PowerShell can do? I guess it may be like using a sledgehammer to crack a nut... But if I can get my feet wet scripting easy things I might find it possible to do more sophisticated things in time! I like "free" too.

    • Joel Lee
      November 25, 2014 at 5:46 am

      Nice mention on Chocolatey! I was happy to hear that Windows 10 would be including OneGet (based on Chocolatey) by default. Having a native package manager is going to be awesome, assuming Microsoft doesn't give up on it.