Today I gave an Live Meeting presentation for the PowerShell Virtual User Group. When the recording is posted I’ll update this post. I spoke about new features in Windows PowerShell 3.0 that I think will make it easier for people to use PowerShell more efficiently. I think they even might find it fun. Here is…
Tag: PowerShell
Maximizing the PowerShell Console Title Bar
A few days ago Boe Prox posted some very nifty PowerShell modules for using the title bar as a ticker for RSS feeds like the weather. I thought this was an awesome idea and an easy way to take advantage of what would otherwise be unused screen space. I was especially intrigued with his use…
Friday Fun Get Content Words
Recently I was tracking down a bug in script for a client. The problem turned out to be a simple typo. I could have easily avoided that by using Set-StrictMode, which I do now, but that’s not what this is about. What I realized I wanted was a way to look at all the for…
PowerShell in a Nutshell
This past weekend I did an online presentation for a friend of mine who teaches for ITT in Omaha, Nebraska. He wanted me to do a brief talk about what PowerShell is and show how to use it, especially for managing Active Directory. I probably went much longer than I needed but everyone seemed to…
Friday Fun: A PowerShell Alarm Clock
Today’s Friday Fun is a continuation of my exploration of ways to use Start-Job. A few weeks ago I wrote about using Start-Job to create “scheduled” tasks. I realized I could take this further and turn this into a sort of alarm clock. The goal is to execute at command at a given time, but…
Using Types with Imported CSV Data in PowerShell
The Import-CSV cmdlet in PowerShell is incredibly useful. You can take any CSV file and pump objects to the pipeline. The cmdlet uses the CSV header as properties for the custom object. PS S:\> import-csv .\testdata.csv Date : 1/18/2012 6:45:30 AM Name : Data_1 Service : ALG Key : 1 Size : 25 Date :…
Friday Fun: Output to 2 Places in 1
Today’s Friday Fun comes out of a short exchange I had yesterday with Hal Rottenberg on Google Plus. We were playing around with piping a PowerShell command to Clip.exe which dumps the output to the Windows Clipboard. I got to thinking about taking this a step further based on my needs as a writer. Often…
Convert Text to Object Updated
I’ve had a few comments and emails lately about my post and script on converting text to objects. I decided the function needed a little more lovin’ so today I have an updated version, complete with comment based help. Function Convert-TextToObject { tasklist /s server01 /fo list | where {$_} | convert-texttoobject -group 5 Take…
The PowerShell Morning Report
I love how easy it is to manage computers with Windows PowerShell. It is a great reporting tool, but often I find people getting locked into one approach. I’m a big believer in flexibility and re-use and using objects in the pipeline wherever I can. So I put together a PowerShell script that I can…
Friday Fun What’s My Variable
I use scriptblocks quite a bit in my PowerShell work, often saved as variables. These are handy for commands you want to run again, but don’t necessarily need to turn into permanent functions. $freec={(get-wmiobject win32_logicaldisk -filter “deviceid=’c:'” -property Freespace).FreeSpace/1mb} Now in PowerShell I can invoke the scriptblock. PS S:\> &$freec 94079.72265625 Ok then. I have…
Using Start-Job as a Scheduled Task
Here’s a technique you might want to use for ad hoc troubleshooting or reporting. Even though it is possible to set up scheduled tasks to run PowerShell commands or scripts, it is cumbersome and time consuming. PowerShell v3 offers a great alternative, but I’ll cover that another day. Suppose I want to do something every…
Format Leading Zeros in PowerShell
I’ve been working on a question in the forums at ScriptingAnswers.com and the need arose to create a folder name with a 4 digit number. But the number needed to have enough leading zeros so that the number was always 4 digits. For example, Test_0005 or Test_0456. The solution is to use the -f Format…
Where’s Jeff?
I hope that 2011 was a good a year for you as it was for me. In 2012 I hope to keep up the pace. Here’s a brief look at where you can find me this year and a few of my projects. Of course, this blog is my primary content site. According to my…
Friday Fun – A PowerShell Console Menu
When working in PowerShell, and especially when scripting, you might want to give the user a choice of actions. For example, you might develop a configuration script that another admin or technician will run. Perhaps one of the steps is to configure networking depending on their location so you want to give the person running…
Thursday Treat – A PowerShell Word Find Game
Now for something completely different but hopefully a little fun. I’m a big fan of word games and puzzles. Tim Bolton has assembled a few PowerShell themed crosswords, which you can find on his blog. I’ve always like word finds so I put together a pretty simple one using 16 common PowerShell cmdlet names. You…