This portable reference to Windows PowerShell summarizes both the command shell and scripting language, and provides a concise reference to the major tasks that make PowerShell so successful. It's an ideal on-the-job tool for Windows administrators who don't have time to plow through huge books or search online. Written by Microsoft PowerShell team member Lee Holmes, and excerpted from his Windows PowerShell Cookbook, Windows PowerShell Pocket Reference offers up-to-date coverage of PowerShell's 1.0 release. You'll find information on .NET classes and legacy management tools that you need to manage your system, along with chapters on how to write scripts, manage errors, format output, and much more. Beginning with a whirlwind tour of Windows PowerShell, this convenient guide covers: PowerShell language and environment Regular expression reference PowerShell automatic variables Standard PowerShell verbs Selected .NET classes and their uses WMI reference Selected COM objects and their uses .NET string formatting .NET datetime formatting An authoritative source of information about PowerShell since its earliest betas, Lee Holmes' vast experience lets him incorporate both the "how" and the "why" into the book's discussions. His relationship with the PowerShell and administration community -- through newsgroups, mailing lists, and his informative blog Lee Holmes -- gives him insight into problems faced by administrators and PowerShell users alike. If you're ready to learn this powerful tool without having to break stride in your routine, this is the book you want.
I have this idea that I should switch over from cmd.exe to powershell. It's so much more powerful than the tried and tested cmd.exe. It is the shell of the future for Windows.
But my facility in powershell is so limited, in comparison with cmd.exe. Around every corner I discover another seemingly small obstacle that is insurmountable.
Today I tried to ctrl-C to stop a running program, inside a powershell, and it had no effect. ??
Last time through it was "how to do a 'dir /o' in powershell?" I know how to do for loops in .cmd scripts, how do I do that in powershell?
I need some advice: First, is it a good idea to try to switch to powershell?
If so, question 2 is: what are your recommendations on how to break the cmd.exe habit?
I'd suggest reading Windows Powershell in Action. And then just do everything you can in powershell.
I've been in the same situation. What I finally did was close my CMD window that was normally open all day and keep the PowerShell window and force myself to only use it.
I only resorted to CMD when something was urgent and I didn't feel I could take the time to figure it out in PS.
I'm still not quite as proficient in PS yet, but I'm getting better everyday.
Below are a couple good books and some links to some good resources.
I liked these two books a lot:
Also, check out these sites:
I'm particularly interested in Windows PowerShell, but here's a somewhat more general complaint:
When asking for help on learning something new, be it a small subject on PHP or understanding a class in Java, what usually happens is that people direct me towards the documentation pages.
What I'm looking for is somewhat of a course. A deep explanation of why something works the way it does.
I know my basic programming, like Java and C#. I've never seen C or C++, though I have seen a bit of assembler. I know what the Stack and Heap are, how boxing and unboxing works, why you have to deep-copy an array instead of copying the pointer and some other things.
Windows PowerShell on the other hand, I know nothing about. And I notice that when reading the small document or some code, I usually forget what it does or why it works.
What I am looking for is preferably, a nice tutorial that explains the beginnings, the concepts, and goes to more difficult things at a steady pace.
The only thing documentation can do is explain what a function does. That's no good to me since I don't know what I want to do yet. I could read about a thousand functions, and forget about most of them, because I don't need to implement them right after it. Randomly wandering through the documentation doesn't do me any good.
So conclude, what is a good tutorial on Windows Powershell? One which explains in clear language what is happening, one which builds on previous things learned.
I don't think googling this is a good idea. Doing a Google search on this would turn up numerous tutorials. And experience tells me that you have to look long and hard to find the gem you're looking for. That's why I'm asking here. Because this is the place where you can find more experienced people. Many of the PowerShell guys among you will know the good ones already, and by asking you, I avoid wasting time that could be spent learning. So to summarize: I will not google this!