Friday Fun: Quote of the Day Revised

talkbubble-v3This week TrainSignal has been running a contest to celebrate my new PowerShell 3.0 course . All you have to do to win is enter some off-the-wall, silly or non-production use of PowerShell. I’ve posted a few examples on the TrainSignal blog this week.  These Friday Fun posts I write also follow the same idea. Although, I do have a sneaky intention of teaching you  something about PowerShell without you realizing it.

For a while now I’ve been using a function to  get the latest quote of the day from Brainyquotes. When I first wrote the function I had to resort to .NET and the webclient class. But now with PowerShell 3.0, we have new web cmdlets that are even easier to use so I decided to rewrite my function.

The function is downloading XML content from an RSS feed. I’ve found that using Invoke-RestMethod is a handy cmdlet for this task because it formats the data into an easy to use object. All my function does is write a string composed of different properties of the most current entry. My first post this week on the TrainSignal blog uses some of this same code.

Ok. Maybe you don’t need daily inspiration but now you’ve seen another example of Invoke-Restmethod in action and maybe that is something you need. Enjoy and have fun out there.

Browse TrainSignal Courses with PowerShell

talkbubble-v3It took longer than I expected, but my latest course for TrainSignal is now available. PowerShell v3 Essentials is targeted for IT Pros with little to no PowerShell experience. This is the course that will get you up and running in short order. I developed the course so that an IT Pro could be effective with the PowerShell console, using many of the new features found in PowerShell 3.0. One of those features is the Invoke-WebRequest cmdlet. I thought I’d share a version of a demonstration I did for the course on using Invoke-WebRequest to browse the TrainSignal course catalog.

In case you didn’t know, all of TrainSignal’s courses are now delivered online on a monthly subscription basis starting at $49/month. Their site has all the pricing information you need. But you can also start with a 3 day free trial. Oh, and lessons can be viewed offline as well. Anyway…using Invoke-WebRequest I can “scrape” the TrainSignal courseware page using PowerShell. Here’s my sample script.

The script saves the results from Invoke-WebRequest to a variable. In looking through the raw html I learned how the links were formatted and discovered that I only wanted links that started with /Course. I also figured out that the link objects had instructor and course information that could be parsed out of the OuterText property so I reformat the data into something more object-like.

I did this so that I could push the results to Out-Gridview displaying the courses.

get-trainsignalIn PowerShell 3, Out-Gridview can pass objects back to the pipeline, so I can select a few courses that look interesting, click OK, and the links will open up in my web browser.

I had a lot of fun creating this course and hope you find it worth your investment. Let me know what you think. And if there is a course you’d like to see me create, especially PowerShell related, let me know that too.


New PowerShell 3.0 Video Training Course

I am very pleased to announce that my latest course from Trainsignal is now available. PowerShell v3 New Features is a course aimed at those of you who have experience with PowerShell v2. I wanted to create something that you could use as a jump-start into PowerShell v3 so the course focuses on what’s new, different and exciting.

As with my other PowerShell courses you can expect a lot of demos. Sure, I have slides because they make good references, but I think the best way to learn about these new features, such as scheduled jobs, is to see them in action. Here’s a short list of what I cover:

  • shell improvements
  • the new ISE
  • Scheduled jobs
  • web cmdlets
  • updateable help
  • PowerShell workflows
  • constrained endpoint configuration

While I developed this course with the assumption you have previous PowerShell experience, you could use it as a complete novice if you are willing to invest some time in reading help or have access to other reference material like PowerShell in Depth. But in any event, this course is not a complete language reference. I focused on the v3 elements I thought most IT Pros would want to take advantage of immediately.

I hope you find the course worth your investment of time and money.

Windows PowerShell Fundamentals Video Training

I’m very happy to report that my first training offering for Train Signal is now available.  I have assembled a course that should cover just about everything you need to know to get started right away using Windows PowerShell. You can get the course online or on disk. If the disks are like other train signal courses, there should also be versions you can throw on your iPod-like device.

The class, like much of my conference presentations and live training, is full of demos. All of my sample and demo code is part of the course. If you have next to no experience with PowerShell, this is the course to get you going. If you or your company are looking for private instructor led training, use the link on the right to email me.

Here’s a short video excerpt:

Windows PowerShell Fundamentals is available online from Train Signal. And be sure to check out all of their other training products.