Browse by Tags
All Tags »
PowerShell (RSS)
Quick script you can run at login to ensure that your XP machine is being defragmented. I chose 1:00 AM every evening but you can quickly alter that in the script. I have this script run as part of my regular set of configuration scripts to ensure that
Read More...
One operation I frequently perform is use a powershell pipeline to filter out a large set of data. Typically I don't care what is in the result but rather is there actually anything left in the pipeline. I can't find a good powershell built-in to perform
Read More...
Recently I made a very large update to our code base. Our code base lacked a standard way of guarding entry and exit points into the various components. Having said guards is useful for error handling, tracing, reducing redundancy, etc ...
Read More...
Been far too long since I blogged about a new PowerShell script. This is not to say I've stopped using PowerShell, more that I've been too busy playing with other tools to spend a significant amount of time updating my scripts. This is a simple, yet straight
Read More...
Another day, another PowerShell feature discovered. Unfortunately this time it was a feature that made me think I had a bug in my script. The script read through some directories, did some file parsing and created a data object for every directory
Read More...
There are only a few missing features from our tuple implementation. Mainly FxCop compliance, debugging support and test case code. The actual functional work is complete. The one issue with FxCop compliance is the chosen names.
Read More...
Previously I blogged about a recursive select-string function. Recently I've extended it a bit. I found the function to be very useful but when I encountered problems searching large directories that contained binary files. Namely searching them usually
Read More...
Now we have a decent tuple generation script which produces a very usable set of tuple classes. After awhile I ended up getting stuck because the tuples are not flexible enough. It's not possible to use a 2 pair tuple where a 1 pair is expected even though
Read More...
Last time we were left with a constructor that required us to explicitly specify generic parameters. This is not always easy or possible. We'll now alter the script to generate a constructor which utilizes type inference to create a Tuple. In addition,
Read More...
A tuple in computer science can be described as a set of name/value pairs. In some cases it can be described as simply a set of values that are accessible via an index [1]. Previously I discussed how to create a Tuple inside of PowerShell . This series
Read More...
I like my scripts to be readable and terse. They're scripts after all and I want to get the most done with the least amount of code. There's a lot to be said for having a readable script but I only value that when I intend to keep the script around for
Read More...
Recently I needed to filter the return of get-psdrive to return all of my local hard drives. I didn't want to accidentally start operating on floppies, CDROM's and more importantly, network drives. There are a couple of ways to do this but I found the
Read More...
Fortune is a Unix command that gets a random message from a set of databases and displays it on the screen. These messages have a wide variety but tend to be funny, quirky or famous quotes (most are indeed geeky). Nearly all unix systems have
Read More...
ViEmu is a Visual Studio Package which adds Vim keybinding support into Visual Studio. For former VI users this is huge benefit as I can use all of my cryptic key combinations inside of Visual Studio. For those unfamiliar, Vi is one of the original
Read More...
Tuples in computer science are usually light weight record objects with simple name value pairs. In scripting languages it is very handy to create them on the fly. For quite some time I was using associative arrays in PowerShell to do just that. PS>$a
Read More...