Posted by: Preetam | December 14, 2006

PowerShell -Great Computer Shell and Not just another

I know there are lots of better and much better articles on Power shell, But still powers of powershell are so much immense that I can’t resist tell you what I learnt so far.

As per Jeffery there are 5 things you must know before you start powershell

So let’s start
Get-Help
Get-Command
Get-alias
Get-PSdrives
Get-Member

Any Get-Help (command name) has following option
1) Syntax reference
2) -Detail gives detail information
3) –full everything plus more examples

For example:

Get-help wmi-object
get-help WmiObject –full
get-help WmiObject -detail

Get-Help wmi -Examples out-file c:\wmiexa
(Above command get the results and push over bridge(Pipe) to out-file wmiexa.txt )

Get-command: this command not only show what command are available in PS but also can help in search any file on your C-drive. Just try get-command *.dll and see for yourself.

Get-PSDrives: one of the most daring innovations of PS. You can actually browse into registry using this command and check out what is stored over there and that too much much better format.

First run get-psdrives and then simple CD into HKLM to get into registry. If you can get into registry sure there is specific way to modify it as well.

Now Get-member, I found this command very handy. You know to get details of methods of any class, I use to run scriptomatic if it was WMI Class or move to MSDN, where every min something keep changing, so after min change link goes dead. Don’t trust me, search for Media Player SDK and get proved. But now Jeffery and his team makes this very easy. I don’t mumble out any words check the screen shot below.

One of the major source of inspiration for me to go for Power Shell , is the Dotnet class can also be invoked from here. This was lacking in VBScript and as result I was actually going to learn VB.net. Thank GOD..And Many thanks to Jeffery Hicks and his book on Powershell, Please download Powershell sample chapter to learn.

I wanna put screen but it is not getting display properly…I will put in few days on my google pages.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: