Ahmed Mahdy

Developers & IT Pros Blogs

Ahmed Mahdy Tweets

Recent posts

Tags

Categories

Navigation

Archive

Translator


Visitors Map

Locations of visitors to this page

MVP Nominee


Windows Professional


Microsoft Student Partner

Microsoft Student Partner

MCPD/MCITP Qualified


Microsoft Registered Partner

Microsoft Partner

CCNA Qualified

CCNA

The Power of Windows PowerShell

 

PowerShell7 Windows PowerShell is a command-line shell and scripting language that helps administrators improve their productivity in day to day management tasks and achieve greater control over their IT environments. Using a new admin-focused scripting language, more than 230 standard command-line tools, and consistent syntax and utilities, Windows PowerShell allows admins to more easily control system administration and accelerate automation.

PowerShell ships with the Windows 7 and Windows Server 2008 R2. However if you’re running Windows XP or Windows Vista, you are still able to download a standalone installer for PowerShell.


PowerShell or as I’m going to call it PS for shorten, won’t replace the existing CMD “Command Prompt” already in Microsoft Windows. PS has CMD included within it in order to let admins do all tasks through the same environment.

PS is considered an intermediate environment that is a perfect choice for both Developers and IT Professionals as well. Since a developer can do some system procedures using PowerShell depending on “CMDLETS”. CMDLETs are .NET classes that represent APIs and GUIs. While IT Professionals can do a delicate scripting commands that became pretty more easier than other scripting languages like JavaScript and VBScript.

For example, if we’d like to list Inactive Services in a running instance of Windows, we can write the procedure as:

For VBScript

strComputer = "."
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=Impersonate}!\\" &
strComputer & _
"\root\cimv2")
Set colStoppedServices = objWMIService.ExecQuery _
("Select * From Win32_Service Where State <> 'Running'")
For Each objService in colStoppedServices
Wscript.Echo objService.DisplayName & " = " & objService.State
Next

For Windows PowerShell

get-service |where {$_.status –ne “running"} | ft displayname,status –au

Any easier?! :)

Why PowerShell?

Productivity

  • Consistent syntax and approach – learn once apply many times
  • Frictionless Composition – Type what you think
  • Flexible system – works against the “old” and the “new”

Fun

  • Multiple ways to administer tasks – interactive, scripting, API, GUI
  • Makes Windows administration as pleasant/productive/cool as possible

Sharing

  • Enables an ecosystem where the community can effectively fill in the things we’ve missed

This was the first article of a series I’m going to present about Windows PowerShell in the next few days. Follow up!

Comments

Svitlana.Net.Ua United States said:

Svitlana.Net.UaI would like to thank you for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now.

# June 15 2010, 18:47

няня United States said:

няняI would like to thank you for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now.
http://svitlana.net.ua/staff/category/3/ гувернантка, http://svitlana.net.ua/staff/category/5/ повар, http://svitlana.net.ua/staff/category/6/ садовник, http://svitlana.net.ua/staff/category/10/ репетитор, http://svitlana.net.ua/staff/category/4 домработница, http://svitlana.net.ua/staff/category/8/ семейная пара, http://svitlana.net.ua/pages/2/ работа няней.

# June 17 2010, 17:00

Секс с проститутками United States said:

Секс с проституткамиНаверное, это из-за климата у девочек просыпается такое дикое желание и появляется страсть в глазах. Стоит отметить, что ночные бабочки очень сильно уважают своих клиентов, и никогда не пререкаются с ними, хотя, конечно, южный темперамент иногда дает знать о себе, и не дай вам Бог разозлить одну из них, тогда вы увидите, какой гнев обрушиться на вас. Лучше этого не допускать, и не портить себе настроение и нервы, а просто хорошо провести время с одной из представительниц самой древней профессии.

# June 23 2010, 21:46

Покер United States said:

ПокерYou made fantastic nice points here. I performed a search on the issue and discovered almost all peoples will agree with your blog.

# June 27 2010, 04:44

Магазин сантехники United States said:

Магазин сантехникиCan you please provide more information on this subject? BTW your blog is great. Cheers.

# July 05 2010, 00:07

Московская проститутка United States said:

Московская проституткаI like your blog so much that I feel I have to wish you. Happy New Year in advance. Have a nice and prosperous year ahead

# July 08 2010, 06:30

Проститутки United States said:

ПроституткиYou gave nice ideas here. I done a research on the issue and learnt most peoples will agree with your blog. Certainly, these practices are unfair; but they say that most of their rules are only to apply to people who overdraw.

# July 10 2010, 23:39

Новинки сантехники United States said:

Новинки сантехникиYou got numerous positive points there. I made a search on the issue and found nearly all peoples will agree with your blog.

# July 11 2010, 21:19

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading