Share via


Powershell Commands for Beginners

Three PowerShell commands for beginners to start With !!!

For Everyone using Microsoft Products, it is must to learn PowerShell to be more productive. 3 Years back when i started working on PowerShell i found it little difficult as I didn't know where to start and hope is the same case with others trying to get hold of PowerShell.

This article is all about to help you in learning PowerShell.

There are only 3 Commands that you must understand and use widely in order to learn PowerShell:

  1. Get-command
  2. Get-help
  3. Get-Member

Lets take an simple example, that you want to stop a service on a computer.

Considering that everyone knows how to open PowerShell Prompt, the first task is to find out which commands are available for us to work with service. To Start with try to find out Verb and Noun in given task as with these information it will be easy to locate commands.

In above example we can figure it out that Stop is a Verb and Service is Noun.

To find out command** Get-command** command comes to your help, it comes with many parameters out of which "-verb" and "-noun" are most important and widely used in beginner phase.

In our example we know that we have "STOP" is verb and "Service" is a noun, so lets go ahead and use this Verb and noun info and see if there are is any command available to fulfill our purpose

 

So we have "Stop-service" command available to us. But we don't know how to use it, here "Get-help" command comes to your rescue.

Microsoft have build up a detailed Inline help information about each and every command which is ease to use.

You can use get-help command with "-detailed","-full" and "-example" Parameter for detailed information on how to use a particular command

 

As shown in above image, "-example" Parameter of "get-help" gives you examples of how to use a command

So if we want to stop a "Adobe Acrobat Update Service" we can use a PS command.

Note

whenever you run a command and after running a command if you didn't get any output on PowerShell Console it means your last command was successful !!

PowerShell is an Object Oriented Programming language and every thing in PowerShell is an object.

Each Object have some Methods and Properties assigned to it. Methods contains action you can take on a particular object and Properties explains Object.

We can retrieve Methods and Properties of an object using "Get-member" command as shown below.

So Simply by following sequence of this commands you can start using PowerShell in your day to day activities.

Best way to learn PowerShell is start replacing GUI activity with PowerShell commands, start from simple file navigation, copy, move task to move further.

All the very best and you can definitely post your question about PowerShell over here: https://social.technet.microsoft.com/profile/sachinwaghmare/