Microsoft TechNet
226 out of 454 rated this helpful - Rate this topic

Getting Started with Windows PowerShell

Published: May 20, 2009

Applies To: Windows PowerShell 2.0, Windows PowerShell 3.0

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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.

This Getting Started guide provides an introduction to Windows PowerShell: the language, the cmdlets, the providers, and the use of objects.



Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Where is the Guide?
There is no reference to the "Getting Started with Windows PowerShell on the listing on the left. Useless link
Hello Want to learn Windows powershell
Hello friends
I am a SQL DBA and i really want to learn the Windows PowerShell. So would you guys help me in that.

Thanks


Go here:
http://technet.microsoft.com/en-us/library/cc281954.aspx
mr
test
ednatitle
test
Let's Start PowerShell
Learn more
qerqr
erwer
er
erer
Free Windows PowerShell Cheat Sheet
Whether you're a newcomer to Windows PowerShell or an advanced user, you'll probably enjoy this free PowerShell cheat sheet. Written by Bruce Payette, a member of the PowerShell development team, it covers starting and using Windows PowerShell, including the syntax for all statements, operators and other elements of the language. Also included are examples of how to use .NET, COM, ADSI and WMI objects from PowerShell. Finally, it includes tips and tricks— short examples showing how to perform common tasks from PowerShell. For more information on this - see Bruce's blog entry at: $0 http://blogs.msdn.com/powershell/archive/2008/05/30/new-free-windows-powershell-quick-reference-card.aspx$0 $0 The PDF is well organized and prints great from your own printer. Get your copy now!$0 $0 http://refcardz.dzone.com/refcardz/windows-powershell (registration required)
Bpcue
Begineer
In response to the question of the cmd shell not running Power Shell scripts...
In response to the question of the cmd shell not running Power Shell scripts: Go figure... since the cmd shell has no support for .NET specifically. Regarding the reverse - that of running cmd shell scripts in Power Shell -, have you tried calling cmd.exe from the Power Shell and feeding it a cmd script?
The first thing to mention!!!
When various pages with PowerShell scripts are suggesting that typing something on "the command line" or running a script from "the command line" will result in some behavior that you're not getting; Make sure you're not using "THE command line" (meaning cmd.exe), but instead using PowerShell.exe.

Not sure why cmd.exe is incapable of running PowerShell scripts using the correct interpreter, or why PowerShell can't be made to run the older scripts...  Apparently I should have known this somehow.


++++++
Yes you can. Go here:
http://technet.microsoft.com/en-us/library/dd315276.aspx
Getting Started with Powshell
What level of programming do I have to be at to start working with PowerShell?
where is the guide
tell me
[TFL] The guide in in the pages following this one - see the tree control in the left pane and use that for navigation
Reply - Whether CLI use Requires Programming Skills
I have not found it necessary to learn programming yet.  I imagine for IT purists it would seem like a very handy if not necessary tool, and if I had the patience, I probably would try it.  Who knows what the future holds.  However,  I am an intermediate user w/no formal programming training -- formerly an Apple OSX (based on Unix variation, BSD-Darwin) user where I first used the "Console" and "Terminal" to perform various simple CLI (Power Shell is a Command Line Interface) tasks -- chkdsk in various forms (check disk, maintenance utility); changed color of shell screen and font and size of font, etc.  Next, I worked on Cisco servers and switches managed by PC consoles and more CLI software in a school lab.  I am currently learning Linux in preparation for installing a variation of Linux combined with Snow Leopard on a PC so that I can have access to my Mac files on my current Windows 7 rig esp 15G of mp3 files. $0$0 $0 $0LSS -- I've never crashed an OS doing all this nor fried a system.  Before I attempt anything new though, I read/study a lot, get various info & advice (tips, tricks, cautions) from blogs such as this one, and take detailed notes before patiently and cautiously following the instructions.  It helps that most current OS's have options that almost make them mistake proof if I were to crash and burn -- recovery -- so I feel fairly confident in trying new stuff.  I am curious and want to know stuff which many people who want to personalize their computers seem to be.  This is how I've learned a lot of the little bit I grasp about computers -- it's how my mentors and the gurus -- I turn to with my knotty questions in the user groups to which I belong and the blogs to which I subscribe -- seem to have learned, too. $0 $0$0 $0 $0My suggestion is give it a try  especially if you use current generation OS's such as OSX, Linux or Windows 7.$0
Question about PowerShell

What is Windows PowerShell, and what can it do for me?  Sorry to be so unfamiliar with technology, however, the powershell is on my computer and I have never used it.  Do I really need it?

Thanks for the information.  I appreciate it.
Manny
mrobles4@hotmail.com

What level of programming ...for... Powershell.?
Hi, V-Power,

The answer is really NONE. You don't need any programming experience at all. All of our docs assume that you know nothing about programming, and we try to teach you everything you need to know.

If you find something that's too "programmer-ish" or a doc that uses a concept without explaining it, please let me know. You can file a doc bug on Connect (connect.microsoft.com/powershell) or send mail directly to me: juneb@microsoft.com.

Thanks,
June Blender [MSFT]
Windows PowerShell Documentation

---

Hi June,
Actually this is not really true. When coming from VBScript, if one has no knowledge of C / C++ or C#, the PS syntax is just awfull. VBScript was Visual Basic with a few plus. Visual Basic was the famous Basic+2 language that everyone knows, with a few plus. PowerShell scripting is everything but obvious because of this .NET presence everywhere. However I should agree that the doc is wonderful (except maybe for Error Handling, which is widely spread between MSDN, TechNet and the Scripting Guys Blog...)
Programming Knowledge Required
I agree with June's comments on the need for programming skills, i.e. none. That's certainly true up to a point. For using PowerShell from the command line - programming is not needed. However, once you start moving into writing scripts, then programming skills do become necessary. Fortunately, the level of skill needed is not as significant as for other languages.

PowerShell scripts are, at least at one level, a program. PowerShell runs your .Ps1 file line by line from top to bottom. But like all classic programming languages, you need to understand two fundamental concepts and how to deal with them in PowerShell. The first is alternation, the second is iterate.

Alternation is where you run different (alternate) code depending on some value or expression - classic If/Then/Else as well as Switch (aka switch) constructs. Iteration is where you want to do something on on some set of values or objects, implemented by a number of constructs in PowerShell, although the two foreach constructs are the ones I find you use most often.

It also helps if you know the .NET framework and WMI as well as a bit of COM. These three provide you with a wealth of configuration and management capabilities and are ideal for scripting.

Thomas
Looking for securing my Application
Am i at right place, i want to secure my application using motherboard serial number or disk serial number so that my application should not be copy by customer to an other computer ...

Also is it the right way of securing the window application ... help needed ...