Video: Learning PowerShell for the IT Administrator – Increase efficiency and automation

Home > Blogs > PowerShell > Video: Learning PowerShell for the IT Administrator – Increase efficiency and automation

Video: Learning PowerShell for the IT Administrator – Increase efficiency and automation

Like This Blog 1Jason Helmick
Added by April 11, 2012

For IT administrators who are hesitant to learn PowerShell, this post will help take the fear out of getting started.

PowerShell is not a scripting language. Yes, it does have a scripting language, but that’s for automation and to make tools, which we’ll discuss later.

PowerShell’s primary focus is to be a real-time interactive command tool that allows the user to be much more efficient in managing all system resources – whether it be users, servers, applications, deployments and more.
Many UNIX or Linux admins are already using PowerShell with ease, but if you haven’t tried PowerShell yet, let’s start off with a few basics.

At first glance, many newcomers to PowerShell get lost when they see the command line.

PowerShell for Admins Start PowerShell

If you’ve worked with the older, or native, command prompt, you know that some commands are pretty familiar, and you’ve probably used them for a long time. Well, PowerShell has its own custom commands known as cmdlets, and they’re in what’s called a verb/noun pair.

Take a look at my current directory listing.

PowerShell for Admins Current Directory Listing



If you’re at that native command prompt, and want to change back to the root of C, you’d probably type “CD\”. PowerShell has a cmdlet for that called Set Location.

PowerShell for Admin Set Location C:



The result is changed to the root C:\.

PowerShell set Location



If you wanted a directory listing you might type “dir”. PowerShell has a cmdlet for that called Get ChildItem.

PowerShell Get ChildItem

If you wanted to clear the screen you could type “CLS” but PowerShell has its own cmdlet for that called Clear Host.

PowerShell clear host


These special cmdlets may cause newcomers to fear PowerShell. It looks like there’s this whole new command structure to learn. Well, the creators of PowerShell made the command lines friendly for everyone.

If you want to change from your current directory back to the root, typing “cd\” works as well.

PowerShell CD backslash \" title=


If you want to get a directory listing, type “dir”.

PowerShell dir

If you want to clear the screen, type “CLS”.

PowerShell UNIX ls
Interestingly, how do you get a directory listing in UNIX? Type “ls”.

PowerShell UNIX ls

You might remember from the old DOS days that if you wanted help, you could type “help”.

You may also like:  Using PowerShell to convert to the MiniShell on a Server 2012 R2 Datacenter Core Edition

PowerShell Help

That gets you help for PowerShell as well. For those who work with UNIX or Linux, typing “man” provides help, too.

PowerShell provides flexibility for Windows administrators who are familiar with the native command line and for UNIX administrators who are familiar with their shell.

They can begin working right away, and so can you.

The best way to get started with PowerShell isn’t by opening up the command prompt. It’s by opening up the PowerShell prompt and doing what you would normally attempt to do.

Let’s see a couple other examples. At a command prompt you might need to check your IP addresses so you type “IP config”.

PowerShell ipconfig

PowerShell will let you run Windows native commands as well. You can even run “ping”.

PowerShell ping

Let’s launch notepad.

PowerShell notepad

Your regular Windows native commands will work just fine. How about MS Paint?

PowerShell MS Paint




MS Paint launches as well.

PowerShell launch MS Paint

You can now start using PowerShell right away for what you usually would do at the command line.

PowerShell enables you to run your native Windows commands as you begin to learn PowerShell cmdlets and start to write your own scripts to become a better administrator.

For an in-depth demonstration of using PowerShell in Active Directory see What is PowerShell and how can it make your IT staff more efficient?

Using the PowerShell Editor for customizing scripts:

The PowerShell editor is simply one liner commands that you would have typed at the console. The difference is there’s more structure around it, and the editor allows you to create your own cmdlets.

PowerShell PS Editor

You can create custom cmdlets and put them in a module to use whenever you want. For example, I’ve created a couple cmdlets and put them in “JasonMod.psm1”.

PowerShell import module

These cmdlets are “Get-CompInfo”, which retrieves basic computer information, and “Set VolLabel”, which changes the labels.

PowerShell Get Command Module

We’ll run the cmdlet Get-CompInfo.

By default, this simple cmdlet returns basic computer information about our local host. As you can see, it gives us the computer name, local host, etc. Notice there’s no drive label on the hard drive, “drive C”, and that’s actually what we’ll fix next.

You may also like:  Changing the Network Location in Windows 8 and 8.1

This cmdlet was written in a few minutes to collect some information, but the benefit of PowerShell is that when you make a cmdlet, you get many usable features. As simple as this cmdlet appears, it can also get information from any remote server. So let’s get information from server 1 and server 2.

PowerShell get compinfo server

Notice they don’t have “drive” labels either? Let’s fix this.

PowerShell get compinfo server drive label












Now we’ll run the Set-VolLabel cmdlet. Starting with the Get-CompInfo cmdlet, using the parameters server 1 and server 2, we’ll now change it with the cmdlet that I made called Set-VolLabel and give it a new label of “drive C”.

PowerShell Get CompInfo server drive label vollabel

With PowerShell, no news is good news, meaning we didn’t experience any errors. We can check the results to be sure by moving back and removing the portion of the pipeline and striking enter.

PowerShell Get CompInfo server drive label check

As you can see, the drive labels on the remote computers are now set.

You can start to see the power in PowerShell. It empowers you to use cmdlets to solve problems and to do IT administration tasks much more efficiently – and it also empowers you to easily create automation.

There is a learning curve to working with cmdlets, but once you get comfortable with them, you’ll start using PowerShell with all Microsoft products deployed in your organization. When Windows 8 releases, you’ll be able to use PowerShell to manage your environment efficiently and effectively.

As an IT admin, there’s no need to be afraid of PowerShell. You can start experimenting with PowerShell today, and I don’t think you’ll regret it.

Knowledge is PowerShell,
Jason Helmick
Director of PowerShell Technologies
Interface Technical Training

Videos You May Like

Agile Methodology in Project Management

0 17 0

In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management

Creating Users and Managing Passwords in Microsoft Office 365

0 16 1

In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365.

Detailed Forensic Investigation of Malware Infections – April 21, 2015

1 52 1

In this IT Security training video, Security expert Mike Danseglio (CISSP / CEH) will perform several malware investigations including rootkits, botnets, viruses, and browser toolbars.

Write a Comment

See what people are saying...

  1. ozgur

    nice post. how about sharing the compinfo cmdlet 🙂

Share your thoughts...

Please fill out the comment form below to post a reply.