PowerShell V 3.0 CTP Export-Csv now has an Append parameter!


Great news for all those folks who rely on Export-Csv and who have been wanting an Append parameter! The latest CTP of PowerShell 3.0 now provides the parameter.

Capture

It’s not perfect, but it’s close – if the data you are exporting does not match the current data, you will receive an error:

Capture

If you rerun the previous example, with the Force switch, the current directories list of files will be in the “Name” column of the csv file.

If you don’t use the Force, and you DO know what you are doing, this does come in very handy – you can gather data on a daily (or weekly) basis and append it to one file with ease Smile

Let’s hope Microsoft keeps this in the RTM of PowerShell V3

To get the latest CTP of PowerShell V 3.0, head to the Microsoft Download Center

One note – Don’t forget to uninstall CTP 1 if you have it! I failed to do this, and had to spend quite a bit of time recovering from my inability to read the Instructions.

Advertisements

  1. #1 by jvierra on December 16, 2011 - 19:56

    Isn’t it great – these PosH guys really rock!

    • #2 by Karl Mitschke on December 20, 2011 - 11:24

      Yes, it’s great!
      There are more enhancements as well, which I hope to write about.

  2. #3 by Karl M. on March 4, 2012 - 17:04

    Does it do a better job of leaving out unnecessary quotes or does it still cram them in everywhere?

    • #4 by Karl Mitschke on March 5, 2012 - 14:35

      I guess that depends onyur definition of “unnecessary quotes” – if you give me an example I can test it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: