Simple tip for PowerShell

Posted February 25, 2009 by Brian
Categories: PowerShell

Been doing more in PowerShell every week and while I’m far from being an expert I definitely enjoy what it offers. I’m always looking for tips and tricks to get the most out of PoSh and one came in my inbox today.

A short article by Jeffery Hicks pointed out something simple that makes perfect sense. Color coding the output to distinguish between your function info and the actual output.

Function Do-Something {
#run some code here
Write-host "Starting update process" -foregroundcolor Green
$procs=Get-wmiobject win32_process
Write $procs

When his above sample is run, the function message shows in green and the sorted and filtered output is sent to the pipeline.

Have to remember this for re-doing some of the early scripts I setup to see if I can clean them up.


Just Fix It

Posted February 5, 2009 by Brian
Categories: Tech

A new addition to the Microsoft support documents, the Fix It button.

Fix it

Rather than having to go down and do a list of 15 steps, the Fix It button will run a script to do the steps for you. It’s not on everything yet but it’s starting to show up on more pages.

Online Ringtone creator

Posted January 25, 2009 by Brian
Categories: Tech

Came across this site that makes it really easy to convert your own audio files into ringtones. Conveniently called

Boot Windows 7 from VHD

Posted January 13, 2009 by Brian
Categories: Tech

Just read this from The Lazy Admin about booting Windows 7 from a VHD and thought this was pretty cool for testing. I like the idea…currently running Windows 7 as a virtual system but may give this a try to really put it through the paces.

Ideal Home Network

Posted January 12, 2009 by Brian
Categories: Ramblings, Tech

I was watching some video from CES earlier and started thinking about the amount of electricity we use with idle devices around the house…especially the computers. Usually there are 2 computers, 1 server, and a Tivo on every night (not including the little night lights from the TV. coffee pot, and every other electronic device that sucks energy when off.)

I was thinking how nice it would be to just be able to have one GOOD system with a small touchscreen display that could be in the living room and serve multiple functions. It would need to be a decent system with multiple-redundant hard drives to function as a home server for backups and file storage, media server to record & playback TV, and a Virtual Server so we could have little dumb terminals with instant on to use for desktops. Heck even a blade server for home would be cool. Somehow I don’t think I could get away with putting even the smallest of the blade servers in the living room currently…one day maybe they’ll come out with a Home Blade Server!

Emailing with PHP

Posted January 12, 2009 by Brian
Categories: PHP, Tech, WebSites

While adding some more features to the recent Intranet Portal, one thing that came up was to have an email sent with a copy of the order for a quick check. I originally did this sending it as plain text however it was a little difficult to read. I wanted to set it up to have both text and HTML emails so it was nicely formatted for reading on the desktop but still useable when viewing on a mobile phone.

Enter PHPMailer. This is a great PHP class that makes the whole process of dealing with MIME headers and all the other crap painless. Using PHPMailer I was able to get the email sent with both a text and HTML version (including inline images) and it’s working great.

Windows 7 Beta…first impressions

Posted January 12, 2009 by Brian
Categories: Tech

Just installed the Windows 7 Beta. I should point out that I’m one of the few out there that seem to actually like Vista and have had great success with it….could it be better, sure, was it as bad as everyone makes it out to be, no way.

So, first thoughts of the new beta:

Install went well, no issues there. I like how the requirements seem a little better and am looking forward to seeing how it performs on netbooks. I think people will have less issues as they most likely already have newer hardware from upgrading to Vista or if they are still on really old hardware, they’re due for a new system anyway.

Look & feel is nice…I like the built in desktop slide show feature. It’s trivial but a cool touch (and I know someone who’s been asking for this feature for a while now.)  Gadgets are no longer tied to the gadget bar but rather can be dropped anywhere on the desktop.

Powershell is built-in of course as is PowerShell Integrated Scripting Environment which is a nice looking application that allows you to write, test, and debug scripts with all the syntax formatting and all.

UAC has a new settings adjustment. Honestly haven’t looked at this much as I don’t have too many complains about the one in Vista.

A new feature called HomeGroup is now available…not too familiar with this one yet but seems like it is from an old Longhorn feature called Castle.

Looking forward to playing around with it some more but so far it’s looking good.