Introduction of Windows Powershell
I generally used to write article about SQL Server but sometime I likes to share my knowledge for other tools/software/scripting too. Powershell is one of them. Powershell is not only helpful to Windows Administrator but it helps Database administrator equally. Powershell has become life-savior for me so many times in my professional life and I like Powershell very much. I was using Windows Powershell 1.0 earlier but since last few months I migrated from Windows Powershell 1.0 to Windows Powershell 2.0 (not planning to migrate to Powershell 3.0 in near future :) ).
Have you ever heard about powerful “Shell scripting” in Unix? You can say “Powershell” is a “Shell Scripting” of Windows operating system. It is much powerful and helpful.
Earlier version of Windows Operating system like Windows Server 2003, Windows Vista etc. was having Powershell 1.0 but from Windows 7 and later and Windows Server 2008 R2 and later are having, by default, Windows Powershell 2.0.
No matter whether you are programmer, developer, system administrator or database administrator, Powershell has lots of things for you to manage your day-to-day routine efficiently. You can consider Powershell as an extended version of command-line utility. Powershell is depends on .NET Framework so I would recommend that you have, at least, .NET Framework 3.5.1 or later installed. Powershell is having scripting base of C# so anyone who is familiar with C#, will have advantage of similar syntax.
You have two environments to deal with Powershell.
1.) Powershell Command-line Environment
2.) Powershell Graphical Environment
See the screen capture of Start menu -> All Programs -> Accessories to find Windows Powershell
You can open both of these tools without even moving to menu.
Go to start menu -> Run and type “Powershell” (with or without double quote) to open Windows Powershell command-line tool
Go to start menu -> Run and type “powershell_ise” (with or without double quote) to open Windows Powershell graphical tool.
Let us open Powershell graphical tool and find out which version of Powershell is installed in operating system.
Execute $Host.Version command in Powershell Graphical tools to see whether you are having Powershell version 1 or 2. If it shows “2” in “Major”, you are running Powershell 2.0.
Let us execute one more command “get-process” which will give us all the processes running in computer at the moment.
If you like this article, do like “Extreme-Advice” page in Facebook.
Reference: Ritesh Shah
Note: Microsoft Books online is a default reference of all articles.