Over the last few articles I’ve been sharing some shortcuts to get most recently used or edited files. For today’s Friday Fun I thought I’d share something that I use in my PowerShell ISE profile. Whenever I start the ISE, I automatically open the last file I was working on. Instead of launching the ISE…
Tag: PowerShell
What PowerShell Script Was I Working On?
Last week I shared a script for finding recently modified files in a given directory. In fact, it wouldn’t be that difficult to find the last files I was working on and open them in the PowerShell ISE. Assuming my Get-RecentFile function is loaded it is a simple as this: get-recentfile -Days 4 -Newest 2…
Friday Fun: Get Recent Files
As you might imagine, I work on a lot of different files throughout the week. Sometimes it is hard to keep everything straight. I’ll want to return to script I was working on yesterday, but I can’t remember what I called it. So I spend a few minutes searching and filtering until I find it….
Send from PowerShell ISE to Microsoft Word Revisited
Many of you seemed to like my little PowerShell ISE add-on to send text from the script pane to a Word document. I should have known someone would ask about a way to make it colorized. You can manually select lines in a script and when you paste them into Word they automatically inherit the…
Pi in the Sky
In celebration of Pi day, I thought I’d post some quick and dirty PowerShell code you can use to calculate pi. I found some easy to follow explanations at http://www.wikihow.com/Calculate-Pi that weren’t too difficult to transform into PowerShell code. And you might even learn something new about PowerShell along the way. Before we begin, I…
Friday Fun: Send PowerShell ISE Content to Word
Yesterday on Facebook, Ed Wilson was lamenting about confusion of keyboard shortcuts between PowerShell and Microsoft Word. I’ve run into the same issue. Muscle memory is strong. Then the discussion turned to getting content from the PowerShell ISE into a Word document. I humorously suggested we had a plugin and it had a Ctrl+C keyboard…
PowerShell Blogging Week is Coming
As I’m sure you are aware there is a lot of great PowerShell goodness online through social media and blogs. Well, I and a few members of the PowerShell community have banded together to add to that goodness. During the week of March 30, look for new daily content from the group. Our topic is…
Friday Fun: Size Me Up
Part of day job involves creating training material, often in the form of video training for Pluralsight or articles for Petri.com. Since I usually am covering PowerShell I often need to capture a PowerShell session. And sometimes I want the screen to be a particular size. So over time I’ve created a few PowerShell tools…
DevOps Twitter Chat
This Thursday, February 26, I will be doing a live Twitter chat from 12PM to 1PM EST. The topic is DevOps but I’m sure we’ll talk about PowerShell and automation in general. Use hashtag #DevOpsChat to submit questions and follow along. You can follow me on Twitter as @JeffHicks. I hope you’ll join me.
A PowerShell Weather Service
I’ve been having some fun this week sharing a few tools for getting weather information and forecasts using PowerShell. To complete the story, today I have one more technique. Using PowerShell, you can query a web service for weather information. In simple terms a web service is like an application you can “run” via a…
Getting the Weather Where On Earth
Yesterday I posted a popular article about using Invoke-WebRequest to get weather conditions. That function used the Yahoo web site but really only worked for US cities. So I also cleaned up and revised another set of advanced PowerShell functions (required PowerShell 3) that can retrieve weather information for probably any location on Earth. The…
Baby, It’s Cold Outside
I don’t know about your neck of the woods, but it is downright Arctic here. So I thought I’d polish up my PowerShell function to get weather data. #requires -version 3.0 Function Get-MyWeather { <# .Synopsis Get the weather for a US zip code .Description This command will query the Yahoo weather service and return…
Friday the 13th Fun
It is that time of year again. But instead of being freaked out by Friday the 13th, let’s have a little fun. Here is a collection of PowerShell one-liners, all celebrating 13. And maybe you’ll even pick up something new about PowerShell.
Friday Fun: Aren’t You Special
If you’ve been following my work for any length of time you know I am constantly going on about “objects in the pipeline”. But PowerShell is flexible enough that you should be able to use it as it meets your needs, provided you know the limitations for whatever path you take. Sometimes you really just…
Friday Fun: Creating Sample Files
Not too long ago I came across a PowerShell snippet, probably via Twitter, that showed how to use a few classes from the System.IO namespace to create dummy files. Sadly I forgot the record where I saw this first mentioned. What I liked about the code I saw was the ability to create a dummy…