Throwing the Kitchen Sink at PowerShell

The other day I was watching a good intro video from Shane Young on getting started with PowerShell profiles. I use profile scripts extensively, and they can be extremely useful in configuring your PowerShell experience. One element you could add to your profile is a customized PowerShell prompt. Microsoft provides one by default. It creates a simple function called prompt. The best part is that you can define your own function called prompt, and PowerShell will run it every time you hit enter.

Continue reading

Who’s Driving this Shell?

Microsoft has been busy with the next iteration of PowerShell. As you should already know, this version will run cross-platform. The executable, or engine, is naturally different than what you are used to with Windows PowerShell. As I was trying out the latest PowerShell beta, I needed to identify the path to the current PowerShell engine. I then thought it might be helpful to get even more details so I put together a quick PowerShell function called Get-PowerShellEngine.

Continue reading

PowerShell Summit 2017 Demo Files

devops-logo

During the recent PowerShell+DevOps Global Summit I had two primary presentations, that is, traditional sessions with slides and demos. My other sessions were panels which means if you weren’t in the room you missed out on some great content and interaction.

Anyway….my main sessions were on creating class-based PowerShell tools and using Nano server in the datacenter. The former was a lightening fast 45 minute session where I tried to cram in as much as I could. The latter was a 90 minute walkthrough of building a variety of Nano server images to meet traditional datacenter roles. Again, there’s no substitute for attending.

But for those of you who couldn’t attend, all of my demo files are available on GitHub.

I realize not everyone has jumped on to GitHub yet. You don’t need a GitHub account to get these files. No need to fork or clone. All you have to do is click on the green “clone or download” button and download a zip file. Of course you are welcome to clone the repo if you’d like.

As far as recordings go, this was not a good year. My Nano server session was not recorded and I don’t know yet about the class-based tools session.

Thanks to everyone who attended my sessions. I hope you found them worth your time.

Adding PowerShell Snippets to Visual Studio Code

So I’ve recently moved my daily work to a different laptop, a Yoga 900 with 16GB of RAM to be exact. I had been running Windows 8.1 but decided to jump in completely to a Windows 10 environment. As part of the process I’ve also made it a goal to begin using Visual Studio Code (VS Code) for my PowerShell work. Like many of you I am heavily invested in the PowerShell ISE so I know this won’t be easy. I’ve customized the PowerShell ISE extensively and have a lot of muscle memory that will need to be re-trained. One of the most important elements for me are snippets.

Continue reading

PowerShell Scripting and Toolmaking – The Last Book You Will Ever Need

At long last it is finished! Don Jones and I have recently published the first iteration of  The PowerShell Scripting and Toolmaking Book. This project was first announced in January 2017 with an early release program.   The first edition was finished and in reader’s hands by the end of February 2017.  We appreciate all of your enthusiasm and support but I also realize there are some questions around this title so I thought I’d touch on them.

What about the Toolmaking Month of Lunches book?

This is perhaps the number one question. Don and I refreshed the Learn PowerShell in a Month of Lunches book published by Manning, primarily to reflect a few minor changes in PowerShell v5 and to at least recognize that PowerShell is moving into the open source world. In terms of learning PowerShell from the very beginning the essential fundamentals are unchanged which is I think of the book more of a refresh than revision.

We considered doing the same with the Toolmaking book. But there was no real technical requirement to do so. PowerShell had not changed enough that the book was obsolete. It is still very relevant. But there were things Don and I had long wanted to do with the subject that couldn’t fit into the Month of Lunches model. So we decided to venture off on our own.

Who or What is LeanPub?

You may wonder why we didn’t simply publish again with Manning? They are great people to work with and they offer one of the top line-ups when it comes to tech books you should have on your shelf. However, there is a tough challenge facing Manning, and other tech publishers: how to keep up with a rapidly changing world. Traditional book publishing is a long process so that you end up with a properly produced and edited book. When we went 3 years between software releases that worked just fine. But now, at least in our world, we get new releases on a much faster cadence.  it is not uncommon for a tech writer to finish a manuscript only to have a new version come out before the book can be published.

So if that world is agile, we need to be as well. Think of LeanPub as a “books as a service” platform.  Don and I could write the book, with the capable technical assistance of Michael Bender, and publish as we went along. Did someone find an error? Was there a formatting goof? We can fix it and publish a new edition. In fact, the version you can buy on LeanPub is considered our “Forever” edition. When you buy a copy you are buying into the future. At some point we may add new content or fix errors. We’ll republish and you get that new version.  LeanPub offers a variety of digital and ebook formats. I personally love the Send to Kindle feature. And interestingly the majority of readers are opting for the PDF format.

Oh, and all of the book’s sample code and exercises is published as a module (PowerShell-Toolmaking) to the PowerShell Gallery.

Can I get a hard copy?

The whole point of using LeanPub is to quickly publish new versions as necessary. But some of you like holding a real book. You can, but here’s the deal. First, you can order from Amazon. If you pay close attention you’ll see that right now this is labeled as a First Edition.  Hard cover editions will be essentially point-in-time snapshots of the “forever’ manuscript. At some point we may make enough changes or add enough new content that warrants a 2nd edition. If you own a hardcopy 1st edition and want the content from the new edition, you’ll need to purchase it.  That’s why the hardcover edition is offered at a lower price point. Owner’s of the LeanPub “Forever” edition don’t have to worry. Of course, feel free to buy both!

I’m Sold!

If you are interested in the Forever edition, head over to http://bit.ly/PSToolmaking and order a copy. If you scroll to the bottom of the page you’ll also see that this title is being offered as part of a bundle with other PowerShell books. A lot of people have been taking advantage of that offer.

Finally, we’d sincerely appreciate any kind words you can spread about the title. One drawback to not using a publisher like Manning is that we have no advertising or marketing budget. We rely 100% on word of mouth. So any blog posts, Amazon reviews and even a simple tweet would help.

If you have questions or comments about the book, using the feedback and discussion features on the book’s LeanPub page.

Thank you for support.