Share via


Windows Powershell is for Administrators... is it really?

For those who are unaware, Windows Powershell is a new Windows command line shell with System Administrators being the target audience. That's the reason why I kept myself away from this tool for a pretty long time (I am more of a Developer than an Administrator). Then one day, I found myself enrolled for a training in Powershell Happy

Before going to the training I was preparing myself to get the basic background of what it was and stuff, and now I feel that I was really dumb to keep myself away from such a cool new thing for such a long time.

Download it from this link and read the manual. The manual is pretty good.

The POWERSHELL includes an interactive prompt and a very robust scripting engine. It is built on top of the .NET Framework 2.0 and instead of accepting and returning text, it has the power of accepting and returning .NET objects. If you think about it, you will notice that most shells including CMD.exe in Windows... SH, KSH, CSH and BASH Unix shells operate by executing a command in text format which could be calling external commands like "XCopy.exe" and getting the output (or doing the task) for you. There were a few inbuilt commands as well like dir, copy, etc. but that's about it. If you need more utilities, you need to create additional programs and call them appropriately. Windows Powershell brings the concept of cmdlets (pronounced "Command-Let"). Please read the documentation to know more about it. In contrast to a normal shell, PS gives you access to File System + other data stores like registry, digital certificate stores, as easily as you can access the file system.

After you install it... you will find it pretty simliar to the command prompt. Don't let this look deceive you. There is a powerful beast inside this interface.

image

Start with get-help get-* and you will see the list of Get commands it throws at you.

image

In PS, the convention is pretty simple...

cmdlet conventions... What it does...
get Retrieve Data
set Change Data
format Formats Data
out Direct the output to a specified destination.

Similarly, have a look at some of the other outputs... I find it interesting enough to start my journey into PowerShell.

image

My journey has just begun, and I have subscribed to the following...

https://blogs.msdn.com/PowerShell/

Using powershell from IIS/.NET troubleshooting perspective would be my agenda in the coming time. This blog post is my first on Powershell, and that too before writing any real cmdlets. Pretty soon, after I get comfortable with creating the real cmdlets, I will share them with you as well. Stay tuned...

Before I end this post, here is what you can do for today (if you haven't already).

1. Open the PowerShell's Shortcut property.
2. Set the Shortcut key to CTRL+Shift+P (or anything else of your choice) and click Ok.

image

3. Whenever you want to open a PS command prompt... all you have to do is to press your shortcut key Happy

Cheers,
Rahul

Quote of the day:
I have enough money to last me the rest of my life, unless I buy something. - Jackie Mason

Comments