Wednesday, 25 February 2009

Fries with that...?

Had to do a presentation to a number of colleagues on the features that Microsoft have introduced with Internet Explorer 8, highlighting those that increase productivity (do more, more easily) and the improvements to security (do more, and do it more safely). I've been using it since beta 1 and really like it, finding it a pain when I'm forced to used either IE7 or IE6 on other machines. And when asked am very enthusiastic about it with people probably wishing that they'd never asked!
That said, after today I think I'll keep my enthusiasm to myself and not waste it doing presentations trying to instill it into others. In fact, working at the golden arches feels like it would be so much more rewarding at the moment...
UPDATE: Hmm, maybe given what I read here I shouldn't be indicating that my work was in any way unrewarding. Maybe as I didn't say 'boring' I'll be okay. Not that I would ever say my job is boring of course...

Tuesday, 24 February 2009

Windows 7 on a netbook?

After a few delays the Toshiba NB100 netbook that was ordered a while back arrived at work today. The delays were not due to any failing of our own internal ordering processes at work, merely that the not-so-conscientious dim-witted loon of a courier felt that when delivering to a University establishment he could simply leave the package with the first person he found in reception providing that they would offer a signature in return. Needless to say, the first NB100 that was delivered never made it as far as my desk, but we now probably have a student who is the proud owner of a new netbook....
Anyway, I recently came across this on Technet Edge recently so thought that I'd give installing Windows 7 with a USB stick a go. About 25 minutes later the install had finished, all devices detected, and after installing some AV software it was done. Okay,so it's not the most rapid machine ever (base score of 2.0 due to the hard-disk, Mr Atom scored slightly better at 2.2), but it boots up in about 30 seconds and the performance is more than adequate, and even the Aero interface works! I'll try a few more things over the next few days (install Office 2007, join it to the domain) and then palm it off onto a colleagues for testing ie: once the novelty has worn off. If I get any feedback that is relevant / interesting / printable I'll post it, just don't hold your breath...

Friday, 20 February 2009

Unplugged

I've just got back from spending 5 days in Newquay, Cornwall stopping in one of the Headland Cottages, with the closest I got to any sort of technology was checking the weather forecast on my phone (when I could get a 3G signal). And because the weather was so good for this time of year pretty much each day ended with a view like this...

That said the effects of going tech-free for a few days are beginning to kick-in: despite finding it very easy to summon up enough willpower not to check my work email, resisting the call of the Wii (specifically House of the Dead: Overkill) is getting tough....

Tuesday, 10 February 2009

Preventing boredom with numbers (and Powershell)..part 2

I spent a fair proportion of today stuck in a meeting (it was one of my favourite kind, lots of flip chart paper & post-it notes, and no coffee....) Anyway, there were a couple of occasions where my concentration lapsed, in fact at one point I had to 'fess up to having not been paying attention as I was asked a question and it was obvious that my thoughts were elsewhere and I had almost no idea what the topic of discussion was. It was during one of these particularly post-it note intensive sessions that for seemingly no reason I wondered how easy it would be to get the Powershell one-liner that listed a Fibonacci sequence of number to display the binary or hex equivalents. The asnwer, it turns out, is 'very easy' as you can simply leverage the power of the .NET framework from within Powershell eg: to convert 734 to binary (base2) you'd simply run:
[Convert]::ToString(734, 2)

or to hex:
[Convert]::ToString(734, 16)

Adding the convert functionality to my one-liner stopped it being just that (a one-liner!) and it 's now:
$1=0;$2=1;$3=$1+$2
do{
$3hex=[convert]::ToString($3, 16)
$3bin=[convert]::ToString($3, 2)
$output="$3`t`t$3hex`t`t$3bin"
$output
$1=$2;$2=$3;$3=$1+$2}
while ($3 -lt 10000000)

So thanks to the power of excessive post-it note usage I've tried something new with Powershell today...

Monday, 9 February 2009

Querying event logs with Powershell

Last week I had the opportunity to talk through a Powershell script with a couple of members of my team. The script itself was one I had written to trawl through all of the event logs on my main Vista notebook and to just report back any entries flagged as Errors, with a parameter of n where n is the number of days that the script was to go back through. Once I'd explained that the first 30 lines were comments and the built-in help it was apparent that this was actually the perfect way to demonstrate what Powershell is capable of. Right at the heart of the script is nothing more than a simple cmdlet that demonstrated the verb-noun principle ie: what do you want to do? - what do you want to do it to?
So I started off by simply showing what happens when you run get-eventlog from the Powershell prompt:
get-eventlog Application

then restricting it to just errors:

get-eventlog Application where {$_.EntryType -eq "Error"}

and then to limit the numbers of days to check back through (in this case 3 days):
$date = Get-Date
$recent= $date.AddDays(-3)
Get-EventLog Applicationwhere {($_.TimeWritten -ge $recent) `
-AND ($_.EntryType -eq "Error")}

And so the rest of the session went on, also going through how the script built an array of the available logs and then iterated through each one in turn. End result was that they now had PS script that could quickly check a machines event logs for errors (GUIs are so overrated), but more importantly they had a useful and relevant intro to Powershell (as well as a good understanding of how the script worked).
And the most important cmdlet that I told them about (almost a dozen times)?

get-help

Monday, 2 February 2009

Place your bets now...

Today is National Sickie Day apparently and given that we in the UK have got a bit of snow at the moment, Mother Nature has made it even easier for the work-shy to come up with an excuse for not showing up at work. Wonder how may no-shows we'll have here?
Update: Looks like most people are here today but given that a few snowflakes have fallen there are various murmurs like "they should let us leave early because of the snow...". So does that mean IT departments in properly snow-ridden places like Alaska only ever do 4 hours a day?!?! Rhetorical question....