Archives for the Month of January, 2013

Announcing PowerShell Cookbook Online Access

With the third edition of the Windows PowerShell Cookbook, O'Reilly and I are embarking on an experiment to expand the boundaries of traditional publishing even further – full, online, searchable access to the Windows PowerShell Cookbook.

cookbook_search

There's been a huge shift in the way that people like to get their content in the past few years. The raw unwashed internet is a popular first choice, but usually involves a difficult ordeal of sifting through bad content to find just the right forum response, blog post, or documentation page. Curation. That's the difficult part.

Above all else, that's exactly the business the book publishing industry is in in. Content curation: finding great authors, great content, and great topics. After that, get it to readers in the way they want it.

Printed books have long been the preferred answer. You can skim them easily, feel them in your hands, and bookmark them. They have limitations, though. When it comes to the print edition of the PowerShell Cookbook, version three has grown to over 1,000 pages. It's over two inches thick, weights more than most current laptops (3 pounds), and has over 30 pages in the index alone. Finding a topic by going to the index can easily take over a minute. Through the table of contents, even longer.

This size isn't for lack of trying. With each edition of the Cookbook, I've ruthlessly cut recipes, replaced recipes with new PowerShell features that accomplish the task more efficiently, and done everything I can to make it smaller. PowerShell is just a huge topic, and every recipe offers crucial insight.

O'Reilly has been expanding the envelope of the traditional publishing industry for years – leading the way in eBook publishing, online digital betas, and offering DRM-free electronic versions of everything in the catalog. E-books are extremely portable, and offer basic search functionality. Despite their portability, though, they still don't offer the ubiquity and ease of access that the raw unwashed internet does.

To push this boundary even further, O'Reilly and I are experimenting with a new site: http://www.powershellcookbook.com. The carefully curated content of the PowerShell Cookbook, with the ease-of-use and ubiquity of an internet search engine.

Using the Site

When you visit the site, you are simply asked to prove you own the book by entering a word from one of the chapters. The site remembers you by default, so you shouldn't have to do this very often.

Searching

Once you've logged in, you can search for recipes with the ease of any regular search engine:

cookbook_search_result

Each search result links to a recipe, which you can use to read and copy code samples from:

cookbook_recipe

Sharing

See that big green button? Share It. That's a key feature of the site. Gone are the days of you having to tell people on StackOverflow or a forum – "This is covered in the PowerShell Cookbook. It says, ….". Instead, simply link to the recipe and let them read the answer for themselves! Try it: http://www.powershellcookbook.com/recipe/XmJd/manage-large-conditional-statements-with-switches. If they are not logged on, they'll get the recipe as you see it – but with the bar on the right letting them know that the recipe comes from the PowerShell Cookbook and where to buy it.

Free Trial

To kick off this experiment, we're offering a free trial of the PowerShell Cookbook's online access until February 8th. Visit the home page, use "free_trial" as the password, and let us know what you think!

PowerShell Cookbook V3 Now Available

On Friday, Amazon began shipping the PowerShell Cookbook, V3!

cookbook_trio

You can buy it in both print and digital formats from Amazon, O’Reilly, and any of your other favourite book sellers.

If you or your company subscribes to Safari, it’s there too.

It’s almost 1100 pages now, despite my continuing efforts to keep it svelte 🙂 Since every edition of the book is about filling “missing pieces” from the last, and we filled tons of “missing pieces” from V2, much of the new content directly replaced recipes that existed in the V3 book.

If you want a free eBook of the first chapter, O’Reilly has made it available: “The Windows PowerShell Interactive Shell.”

What’s new in this edition?

My previous post delved into this in tons of detail.

Workflow, being the biggest new addition to PowerShell in version three, represents the largest change to the cookbook in this edition. It gets an entire chapter of coverage – including some great guidance on when to write a workflow, and when not to!

Scheduled tasks get explained in detail, as do web and internet scripting techniques that we’ve now vastly simplified through Invoke-WebRequest, Invoke-RestMethod, and related cmdlets.

PowerShell version three also begins a large shift in the Windows Management world: from WMI to CIM. The Windows Server Blog talks about this shift in great detail, and the PowerShell Cookbook has been completely updated to incorporate this change.

And of course there’s the “little stuff”. The vast sea of changes we made to improve your life little-by-little: default parameters, customizing the updated tab expansion engine, mapping drives, creating restricted remoting endpoints with configuration files, updating help, working with alternate data streams – the list seemingly goes on forever.

If you liked the first or second versions of the PowerShell Cookbook, you’ll like this one even more 🙂

Resolving Adobe Reader Error 1328–“Updated by Other Means”

<Just putting this on the internet, in case it helps some poor soul. There are a lot of forum posts with the issue, none with the solution.>

 

I was recently trying to install Adobe Reader, and had an unfortunate blue screen right near the end. When trying to install again, I got this error:

Error 1328. Error applying patch to file C:\Config.Msi\PTxx.tmp. It has probably been updated by other means and can no longer be modified by this patch.  For more information contact your patch vendor.

Apparently, Adobe Reader 11.1 is distributed internally as two MSIs: "Adobe Reader 11”, plus a patch to bring 11.0 to 11.1.

After turning on MSI logging, I could see that the temporary installer files were going to C:\ProgramData\Adobe\Setup\{GUID}.

The solution, in my case, was to go to that location, run AcroRead.msi manually, run AdbeRdrUpd11001.msp manually (which failed), and then go to the control panel to uninstall Adobe Reader.

After that, running the official setup program (from http://get.adobe.com/reader/) worked.

 

Additional things I did along the way that may have helped, but I don’t think were required:

  • Manually deleted files left behind in ‘C:\Program Files (x86)\Adobe\Reader 11.0’. To do this, I had to take ownership of the files, and manually give myself permission to delete them.
  • Manually deleted a bunch of .tmp files from ‘C:\Config.msi\…’ that were time stamped from around the time I was doing this installation.
  • Manually deleted a few MSIs from ‘C:\Windows\Installer"’ that were time stamped from around the time I was doing this installation.