Getting Started with Windows PowerShell


If you have used MS-DOS or CMD commands to execute commands on Windows, Windows PowerShell is not new to you.

Now, Windows PowerShell is even more useful because Microsoft has replaced StsAdm command-line tool with PowerShell 2.0. So if you are developing or planing to develop SharePoint 2010 solutions, you will need to understand Windows PowerShell 2.0.

Here is description from MSDN:

Windows PowerShell is a new Windows command-line shell designed especially for system administrators. The Windows PowerShell includes an interactive prompt and a scripting environment that can be used independently or in combination.

Unlike most shells, which accept and return text, Windows PowerShell is built on top of the .NET Framework common language runtime (CLR) and the .NET Framework, and accepts and returns .NET Framework objects. This fundamental change in the environment brings entirely new tools and methods to the management and configuration of Windows.

Windows PowerShell introduces the concept of a cmdlet (pronounced "command-let"), a simple, single-function command-line tool built into the shell. You can use each cmdlet separately, but their power is realized when you use these simple tools in combination to perform complex tasks. Windows PowerShell includes more than one hundred basic core cmdlets, and you can write your own cmdlets and share them with other users.
Like many shells, Windows PowerShell gives you access to the file system on the computer. In addition, Windows PowerShell providers enable you to access other data stores, such as the registry and the digital signature certificate stores, as easily as you access the file system.

We have a Windows PowerShell section with some articles:

Windows PowerShell on C# Corner


And you can learn more about Windows PowerShell 2.0 here.

http://msdn.microsoft.com/en-us/library/aa973757(v=VS.85).aspx 

Here is one more cool thing. Now you can access Windows PowerShell from your managed code using PowerShell classes. Here is an article written by Sateesh on how to create your own cmdlets using Visual Studio 2008.

Creating Windows PowerShell cmdlets using Visual Studio 2008 by

Here is a list of namespaces and related classes that may be used for this purpose.

http://msdn.microsoft.com/en-us/library/dd776072(v=VS.85).aspx

Cheers!


Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.