Getting Started with PowerShell - Part 1

Here at MosaicMK Software we use PowerShell a lot we be leave that it one of the best tools Microsoft has put out in a long time. However it can be hard to start learning something completely new. So, we wanted to put together a getting started guide to PowerShell. In this new series we will conver the basics and work our way up to more advanced features and functions of PowerShell.

To start what is PowerShell exactly? Well PowerShell is a tool initially developed by Microsoft for Windows Administration however in the past few years it has grow into much more then You can use PowerShell for automation, configuration, as a scripting language or even a programming language. You see PowerShell has the unique ability to call on meany other scripting and programming languidness allowing you to have power to do more then what initially though possible.

To start using PowerShell lets first look at how to launch it and how the command are used.

First click on your start menu and search for PowerShell right click on PowerShell an run as an administrator (NOTE: you always want to run PowerShell as an administrator even if you are an administrator on the computer)


When PowerShell opens you will have a window open that looks allot like a command line. This is the host window from here you can run command and receive the results of those commands.


PowerShell command are formed on a verb-noun format but what dose that exactly mean ? Well simply put you will use a verb like "get" fallowed by the noun you want to use the verb on like "item"

an example of this is "Get-Item"

If we run the command get-item we are prompt with a message asking for a path , This is because we didn't tell it what item we want to get and the path is mandatory for the command to run.


so lets exit this command by pressing Ctrl+C

The path that PowerShell is asking for is called a parameter. parameters argument the command to run agents them or change the way the command runs. If a parameter is required by the command then the command will ask you to supply the value of the parameter before it runs. to pervert this each time you run the command you can specify the parameter  before you run it to do this we will type "Get-Item -path C:\"

as you can see we got some information back about C:\


a good first command to learn to use is the Get-Help command. If you are ever unsure of what a command is used for or are not sure what parameters the command has you can use the get-help command.

to do this type Get-Help -name "The Command you want to know" for this example we will get help on the get-item command


You may be prompt to update the help files if so just press "y" its always good to have the most update help information



As you can see in the screen shot above the Get-Item command has an Alias, Aliases allow you to run the command but using different characters. For example the get-item command can be run by entering gi instead of get-item.

In this post we covered what PowerShell is, how to run a PowerShell command, what Parameters are and how they are used and last we talked about how a command can be run by its alias. In the next post we go over some basic commands anyone should know.

Comments