Earlier this week I posted a function that you could incorporate into the PowerShell ISE to convert selected text to upper or lower case. I was challenged to take this a step further and come up with a way to convert aliases to commands. Which is exactly what I did.
PowerShell ISE Case Closed
When writing a PowerShell script or function, things like indentations, white space and case make a big difference in how easy it is to read and understand your code. Sometimes it can be helpful to have a word or sentence in all upper case so that it stands out. Here is a simple set of…
Friday Fun PowerShell Pep Talk
Today’s Friday Fun is meant to help get you excited about the upcoming Scripting Games. I want to add a little pep to your PowerShell prompt. Perhaps it will even keep you motivated. What I have for you today are variety of prompt functions. Consider them variations on a theme.
Get File Hash
The other day I had the need to calculate MD5 file hashes in order to compare files. The PowerShell Community Extensions has a nifty cmdlet, Get-Hash, that does exactly that. Unfortunately, sometimes even free tools like this aren’t an option, as in the case of my client. Or they don’t go far enough. So with…
New Comment Help
If you follow my blog I’m sure you noticed that I post a lot of advanced functions and scripts. While I don’t expect every one to be developing advanced functions, the closer you can get the more powerful your work. With the Scripting Games approaching I thought I’d offer up a little something to help…
Friday Fun Create Numbered File
I was working on my guest commentary for the upcoming Scripting Games and started thinking I would need a line numbered version of my solution to help explain. Turns out I didn’t go down that road, but in the process I put together a little PowerShell to take a text file and create a line…
Get Password Will Expire
During my Managing Active Directory with Windows PowerShell session at Techmentor Orlando, an attendee asked about finding when a user’s password would expire. He wanted to be able to come in on Monday morning and run a report to find whose passwords were going to expire during the week. I didn’t have the time to…
Techmentor Orlando 2011 Decks and Demos
As promised, I have put together the most current versions of my slide decks and demos. A word of caution on the demos: many of them were designed to be used with my Start-Demo function, which essentially steps through the demo file one line at a time. The AD demos do include a few scripts…
Convert Transcript to Script
During my PowerShell scripting best practices at Techmentor last week I mentioned a function I had to convert a PowerShell transcript to a script file. Since there’s very little difference between an interactive session and a script, parsing the transcript can yield 80% or more of a script very quickly. I wrote such a function…
Friday Fun ConvertTo Text File
When I’m working on simple PowerShell scripts, I find myself using the PowerShell ISE. When I need to share those scripts on my blog I inevitably need to save the script as a text file so I can post it. I finally realized that instead of the few manual steps, I could automate this process.
St. Patrick’s Bar Order
Let’s have a little fun with St. Patrick’s Day and perhaps even learn a little PowerShell.
Get Local Admins One-Liner
Working with local users and groups can get a little messy in PowerShell. But I wanted to share a quick one-liner you could use to list all the members of the Administrators group.
Friday Fun Virtual Demos
I’ve been prepping my demo scripts for Techmentor using the ubiquitous Start-Demo, and realized I could take things further. I mean, why do I have to do all the talking? Windows 7 has a terrific text to speech engine so why not take advantage of it. With a little work I could create a virtual…
Get IP Data
I was doodling in PowerShell this morning and ended up with what I hope is a useful function to retrieve IP configuration information, sort of like IPCONFIG, but using WMI. The beauty is that I can connect to remote machines and the output is an object which leads to all sorts of possibilities. My function…
New Event Report Revised
Last year I posted an update to an old Mr. Roboto script that was an update to an even older VBScript. Still with me? My last revision leveraged the new Get-WinEvent cmdlet to create an HTML report of recent error activity on one or more computers. The problem was that I didn’t account for older…