Welcome to MSDN Blogs Sign in | Join | Help

New Free Windows PowerShell Quick Reference Card

I've been working with the folks over at Developer Zone on a quick reference card for PowerShell, based on my book. The card is now complete and is available as a free download. (PDF, registration required.)powershell_ref_card

This is an 8-page card that covers the PowerShell language, common commands and  examples. The card was written primarily for developers (it is Developer Zone after all) and for people with existing scripting experience. Even so, if you're using PowerShell, it should be a handy reference to the environment.

Thanks
-bruce

===============================
Bruce Payette [MSFT]
Principal Developer,
Windows PowerShell Team

Published Friday, May 30, 2008 10:31 PM by PowerShellTeam

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: New Free Windows PowerShell Quick Reference Card

Thanks for doing such a great job on the Windows PowerShell refcard, Bruce. I really believe it will be useful to everyone who gets it.

We're going to be sending this one to the printer soon, so I will get you some copies as soon as we get them back!

Cheers,

Rick

Friday, May 30, 2008 6:19 PM by Rick Ross

# re: New Free Windows PowerShell Quick Reference Card

Its not really free if you have to register, why not just share it up?

Friday, May 30, 2008 7:53 PM by iainlennox

# re: New Free Windows PowerShell Quick Reference Card

Unable to connect to database server

If you still have to install Drupal, proceed to the installation page.

If you have already finished installing Drupal, this either means that the username and password information in your settings.php file is incorrect or that we can't connect to the MySQL database server. This could mean your hosting provider's database server is down.

The MySQL error was: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).

Currently, the username is dztest and the database server is localhost.

Are you sure you have the correct username and password?

Are you sure that you have typed the correct hostname?

Are you sure that the database server is running?

For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

Monday, June 02, 2008 7:56 AM by Andy Puchrik

# Error on card?

Im not the best at powershell, but this looks wrong. Page 6, Operators for working with types.

-is example: $true -is [object] | $true | This is always true – everything is

an object except $null     <- sounds good

-isnot example: $true -isnot [object] | $true | The null value is the only thing that

isn’t an object.

shouldnt this return $false because $true is not null, making it an object?

Monday, June 02, 2008 9:49 AM by Justin

# re: New Free Windows PowerShell Quick Reference Card

Thanks.

btw there's a typo on the first sentence:

"...provide a powerful, well-integrated command-line experience for the operation system"

You could fix the typo by...

"operation" -replace "on", "ng"

:)

Tuesday, June 03, 2008 3:05 PM by LS

# re: New Free Windows PowerShell Quick Reference Card

I appreciate the cheat sheet (at least I will as soon as I register for yet another developer site), but I also agree that it should be available without registration.

Frankly, even with the "Graphical Documentation", the state of PowerShell 1.0's documentation is appalling.  Searching blogs is the best way to find out shell syntax and features.  While I will admit that searching the web is great for SUPPLEMENTING the core documentation, I don't think it should SUPPLANT the core documentation.

Since the cmdlets are all self-documenting, why does the "Getting Started" guide not provide all of the syntax and less about cmdlets?  After all, knowing which about_* help topic you want is hit or miss...

I'm hoping that PowerShell 2.0 includes something a little closer to MSDN Library standards.

Friday, June 06, 2008 11:29 AM by Thomas S. Trias

# re: New Free Windows PowerShell Quick Reference Card

On page 2, in the Commands table:

"... documnets for with there are ..."

should be

"... documnets for which there are ..."

Friday, June 06, 2008 11:57 AM by Thomas S. Trias

# re: New Free Windows PowerShell Quick Reference Card

Bruce,

Thought I would help the state of documentation along with some proofreading / suggestions:

Microsoft would probably appreciate it if you capitalized Word in the Commands table on page 2.

The first while Loop example is an infinite loop.

I think the first Unary Operator should be negation (and not assignment); the example and results are right, but the operator and description are not.  There is a similar issue with the unary plus operator.  The descriptions of the type cast and array (comma) operators are wrong.

What's the difference between Set-Item and Set-Content

The Corresponding .NET Types for all of the entries between and including [array] and [switch] are wrong; the correct entry for [array] is missing and the rest are shifted up one cell.

It would be nice if there was a little more exposition on the [switch] type; it is quite powerful, very useful, and I had to discover its workings on my own.

Does the -as operator throw an exception or just return $null on failure?  I know I can find that out easily for myself, but it's the sort of thing that would be handy in the cheat sheet.

There seems to be a misplaced bit of text on page 6 at the end of "Accessing Instance Members:" :

"Working With Collections: ForEach-Object, Where-Object"

They were already discussed in "Flow-control Statements:" by their aliases.

In the hot tip on page 6, you might want to say "the beginning of 2006" instead of "the beginning of this year".  Of course that alters your other examples, so maybe you want to use $now.Year + "/01/01".  Likewise with the Christmas examples.

You might want to mention New-Object in the .NET section as well as the COM section.

In the COM section, you might want to change "used as the Windows automation mechanism" to "used as a Windows automation mechanism".

The usage here-string for Get-Spelling should probably be in the format for PowerShell script used in the rest of the document, instead of the format for body text.

The header on page 8 "BUILDING CUSTOM OBJECTS IN POWERSHELL" is wrong; it should be about errors and debugging instead.

"The behavior of the trap statement can be altered with the break and continue statements."  How?

Friday, June 06, 2008 12:54 PM by Thomas S. Trias

# re: New Free Windows PowerShell Quick Reference Card

Jeez, they sure want a lot of information to register, too much for me.

Monday, June 09, 2008 10:28 PM by GregL

# re: New Free Windows PowerShell Quick Reference Card

That website wants to know WAY TOO MUCH about me.  

I'm a big fan of PS and I'd love to have a copy of this PDF.

But their profile data looks like it was designed to be sold.  I'm really tired of unsolicited crap resulting from my address and profile being sold by websites like these.  Sorry, they just don't look trustworthy!

Bruce, I hope whatever they paid you for this content was worth keeping it locked away behind their shady registration.

Tuesday, June 10, 2008 1:05 PM by Matt

# re: New Free Windows PowerShell Quick Reference Card

And they seem to think that names and cities should not be the single character "a"

Monday, June 30, 2008 11:32 AM by awf

# re: New Free Windows PowerShell Quick Reference Card

Way too much BS for me. I will go without

Wednesday, July 23, 2008 2:23 PM by Me

# re: New Free Windows PowerShell Quick Reference Card

As usual nothing in this world is really for free.

You pay with a lot of personal information, and that could ending up being very expensive.

Tuesday, February 03, 2009 5:24 PM by Gunnar Hermansen

# re: New Free Windows PowerShell Quick Reference Card

I can't afford the cost of the registration!

Thursday, March 12, 2009 2:25 PM by No Name

# re: New Free Windows PowerShell Quick Reference Card

Id does not look right to ask for detailed registration to download "free" Quick Reference Card. It is a way you collect information about users and registration should be optional is the only thing user is interested in is a download.

I'm going to download this document from P2P, not from here.

Wednesday, May 13, 2009 8:48 AM by S.M.

# re: New Free Windows PowerShell Quick Reference Card

With all the registration,  I still couldn't download.  The link takes you no where...

Thursday, June 25, 2009 6:15 PM by Steve

# re: New Free Windows PowerShell Quick Reference Card

This looks like a good reference I have never used power-shell

Friday, August 28, 2009 5:49 PM by Steve Buhrman

# re: New Free Windows PowerShell Quick Reference Card

I'm sure its a great guide, but as mentioned previously by other correspondents, I'm not prepared to sell my soul to read it.

If its that good then either openly share it for free (without the dodgy 'registration'), or stick it on Amazon.

Offering it behind a spam generator degrades your professionalism.

Tuesday, September 08, 2009 10:53 AM by Suspicious

# re: New Free Windows PowerShell Quick Reference Card

A question, I am just learning powershell and I am not sure if it is a typo or not, but on page 3, the "if" example reads:

if ($a –eq 13) { “A is 13} else {“A is not 13”}

Is it missing a quote after the "A is 13" ? it would seem to, but I am not sure if the syntax works or not.

great resource! thanks for making it available.

Monday, September 21, 2009 2:08 PM by Mark

# re: New Free Windows PowerShell Quick Reference Card

Just based on what I have read on this page - dont want it.

Tuesday, November 03, 2009 6:53 AM by Wade

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker