Archives for February 2009

All moved into the new house!

I’m super pumped because I’m finally all moved into my new house. I think we got a great deal on it. It’s about 2 years old and the previous owners lived here about a year before losing the house to foreclosure. Fortunately they didn’t trash the place because it’s in brand new condition and we got a great deal on it.

Don’t forget to occasionally clean up your wireless network list

Here’s a little tip for the security conscious. Over time, you will undoubtedly connect to various networks a couple of times or maybe even just once. But if you’re like me, you probably habitually check (or fail to uncheck) the box that saves the wireless network connection settings.

This can be an accident waiting to happen because let’s say you were living in a hotel for a week like I was while waiting for settlement on a new house. I had connected to an encryption-free wireless network called “lodgenet” which was how this particular hotel’s wireless was set up. Since there was no key, it wouldn’t be difficult for a hacker on a train to set up a fake access point called “lodgenet” and once I’m connected, well then it’s anyone’s guess what would happen next.

But where it’s particularly troublesome is when you connect to an open network called “linksys” or something that an out-of-the-box, unsecured access point defaults to. There’s so many of these that you may find your tablet, iPhone, or what not connecting to all kinds of unscrupulous networks. Hacking issues aside, some people have been *sued* over this crap believe it or not.

Anyway, from time to time, you should go into Network and Sharing Center, click Manage Wireless Networks link on the left, and delete any that you don’t want to automatically connect to.

Until PowerShell ISE gets PowerGUI’s “Open Profile” feature…

I hate to admit it, but the convenience of having PowerShell ISE installed with the core installation of PowerShell 2.0 has been enough to get me to switch from PowerGUI, which is in my opinion a much more full featured free editor/debugger.

One thing that I sorely missed from PowerGUI (which is compounded by the fact that unless you’re on Windows 7, PowerShell ISE doesn’t have a “Recent Files” menu) is the ability to quickly open my profile script without having to browse for it.

Well PowerShell ISE is extensible, so if it lacks a feature, you can just add it in most cases. I’ve uploaded my PowerShell ISE profile which has some useful functions for automating the ISE. But the one in particular that implements the “Open Profile” feature is called….(wait for it)…. Open-Profile!

So you can type that in the immediate window, or use the custom menu item that gets added. It opens the user/global/host/generic/etc profiles if they exist.

function Open-File([String]$Path,[Switch]$Quiet) { $AllowedExtensions = @(‘.ps1′,’.psm1′,’.psd1′,’.ps1xml’,’.txt’,’.txt’) $Extension = [System.IO.Path]::GetExtension($Path) try { if ( -not ($AllowedExtensions -contains $Extension) ) { throw “OpenFile: $Path cannot be opened in PowerShell ISE.” } if ( -not (Test-Path $Path) ) { throw “OpenFile: $Path does not exist.” } $Path = (Resolve-Path $Path).ProviderPath $PSISE.CurrentOpenedRunspace.OpenedFiles.Add($Path) } catch { if ( -not $Quiet ) { Write-Warning $_ } } } function Open-Profile { Open-File $PROFILE.CurrentUserAllHosts -Quiet Open-File $PROFILE.CurrentUserCurrentHost -Quiet Open-File $PROFILE.AllUsersAllHosts -Quiet Open-File $PROFILE.AllUsersCurrentHost -Quiet }