Thursday, 24 December 2009

Doesn’t time fly…?

So I’ve posting to this blog for 12 months now, having started on last Christmas Eve.  I have no idea whether anyone has found anything I’ve posted useful or just entertaining, although my ClustrMap indicates that a few people from various places around the globe have stumbled across my blog either on purpose or by accident (well, if I’m being honest it’s probably the latter, and when I say ‘people’ what I probably mean is automated web-crawling bots…).

So I’m still stuck at work until the bitter end but there’s a very relaxed atmosphere about the place, so there’s not a lot of real work being done.  That said, I did rebuild a WSUS server this morning.  Perhaps this afternoon when time is really dragging I may pass the time with a bit of Quake Live.

So Merry Christmas to anyone who may come across this, and as there’s still a bit of snow around here we may even get a white one after all…

Monday, 21 December 2009

So you work in IT…? #2

As I’ve said be before, being an IT Consultant automatically means that I’m also expected to know how to fix anything that has display and buttons for user-input.  So the conundrum put to me at the weekend was why a newly purchased Sony DVD-recorder/Blu-ray player wouldn’t play said Blu-ray disks.  Sometimes when troubleshooting, despite all your instincts, you have to get back to basics.  After a few moments the cause was quickly identified and after steeling myself to update the person concerned I took a deep breath and said to them “It’s not a Blu-ray player…”.  Despite their initial protestations, after pointing out..

  • The lack of Blu-ray logo on the device & packaging,
  • And that the manual didn’t list Blu-ray as a supported playback media,

..it was found quite funny all round (probably more so for me!).  But then they remembered that they had asked for a load of Blu-ray films for Christmas…

Wednesday, 16 December 2009

A bit of light reading…

On and off over the last couple of weeks I’ve been reading Memory Dump Analysis Anthology, Volume 2 by Dmitry Vostokov.  While I was in Berlin at TechEd I attended a session on Crash Dump Analysis presented by Daniel Pearson of David Solomon Expert Seminars which proved how much I don’t know about it (I’m okay with !analyze –v or basic stack trace diagnosis but there is obviously so much more that I don’t know yet) so I thought I’d read up on it.  The book is proving really interesting and I’ve already picked up a couple of things that I didn’t already know but it’s pretty heavy going in terms of raw-geek content (even for me!).

For an idea of what sort of content to expect check out the website.

Tuesday, 15 December 2009

Defragmenting drives with PowerShell: updated

A while back I posted about how it was possible to defrag a disk with PowerShell but ended the post saying that I would probably never need to use it.  Turns out that I did need to after all…

It had been quite some time since I’d defragmented either the drive in my main PC at home or any of the external hard drives connected to it.  What I wanted to to be able to do with a PowerShell script was:

  1. Identify all local hard drives,
  2. Work out how defragmented the drive is,
  3. Defrag the drive,
  4. Show how much less it is fragmented afterwards,
  5. Log it all to a file
  6. Then shutdown the PC (given that if I’m sitting in front of this PC I tend to be playing Team Fortress 2 I wanted it to run when I’d finished then shut the box down.  I know that defrag will fall back into the background if it detects that the user is doing anything but given my n00bTF2 skills I can’t afford to hamper my performance!).

Using the code I posted previously as a starting point, turned out that it was pretty easy to achieve everything I wanted the script to do…

image

  1. Identify all local hard drives using Win32_Volume class, checking that DriveType equals 3 (a local drive) and that there is a drive letter assigned,
  2. then use the Win32_DefragAnalysis class to work out how fragmented the drive is,
  3. then use Defrag Method associated with the Win32_Volume class,
  4. repeat step 2,
  5. Log it all using the start-transcript and stop-transcript cmdlets,
  6. and finally shutdown the PC using the stop-computer cmdlet.

This will only run on Vista and later and needs to be run elevated, but it means that I can defrag my drives and shut my PC down without having to leave it on and rely on scheduling and it’s one less excuse I have for being beaten on TF2 again….

Friday, 4 December 2009

SCCM SP2 gotcha (sms_def.mof)

Last week I upgraded the SCCM servers here to SP2.  There were a couple of reasons why I thought it would be a good idea, among them the fact that there have been some improvements to clients working with advertisements and also that there are now reports that will indicate how much of your managed PC estate can (or cannot) be expected to run Windows 7.  One thing that did almost catch me out was that a while back I made a change to enable the capture of environment variable info from client PCs through enabling Win32_Environment in sms_def.mof as below:

image

What happened during the upgrade to SP2 was that that although my amended copy of sms_def.mof got backed up the changes I had made weren’t reapplied to the new file…

 image

Okay, it wasn’t that onerous a task to re-enable Win32_Environment but I’d have been happier if I hadn’t had to do it at all….