All posts by Steven McNutt

About Steven McNutt

I am a technical support analyst and manager with more than fifteen years of experience. Although specializing in the Microsoft line of products I am also familiar with and have worked with (among others) the IBM AIX and Red Hat Linux operating systems, as well as the installation and maintenance of Cisco and Nortel networking equipment. I have obtained the following Certifications at differening times over my years of working in the IT field: -CISSP -MCSE (NT4 and Windows 2003) -RHCE (v3) -CNA (v4) I currently work and reside in Cleveland but I also frequently work in both Cincinnati and central Michigan as well. 

Command Line Argument

Firing up the way-back machine, I recalled interfaces from Exchange versions past that would immediately return some nice data, such as mailbox size, item counts, etc.  I set out to try and recreate some of these interfaces, but it seemed that a lot of the coding examples were in C#, a language that I wasn’t very familiar with.

Undeterred, I went through some C# lessons and I now have what I hope is a decent “working IT guy’s” knowledge of it’s inner workings.  Unfortunately at this point, I can’t exactly remember what I was missing from the past Exchange interfaces that drove me to learn C# to begin with, apart from the table that had the mailbox sizes.

I eventually determined that the Powershell command that I needed was:

Get-MailboxStatistics -server <exchange server name>| Select-Object DisplayName, TotalItemSize, ItemCount,StorageLimitStatus,LastLogonTime | Out-GridView”

I figured my C# coding skills would have to apply to something else as I could just as easily put that line into a batch file! For some reason, though, launching the command from a batch file would open the ‘Grid View’, but it would close immediately, so back to C#

I had the program working fine on my desktop, and had it set to either ask for a server name, or accept a command line argument that would contain the server name. For reasons I still don’t fathom, the command line argument wouldn’t work on the Exchange server itself. I eventually had to change the code from:

if (args[0] != null)
ServerName = args[0];

to:

if (args.Length>0)
{
if (args[0] != null)
{
ServerName = args[0];

Which makes more sense, I guess, but I don’t know why the former only worked on the desktop unless there’s some variation of the .Net runtimes between the desktop and server in how they handle command line arguments?

Anyway, if you’d care for a little program that auto-launches this grid view, I’ve posted it here.  It includes the user’s display name, their mailbox size, the number of items, and if they’ve exceeded their quota.  You may need this note if you get an ‘index out of bound’ error due to the Powershell visual GUI elements not being installed (obviously you’ll need a 64 bit machine with the Exchange Powershell add-on installed).

Remote Desktop With XP

Faced with an aging remote access server with dubious patches I wanted to move a little more quickly to a Windows Server 2008 R2 terminal server, but there is an issue: there’s no support for NLA connections within XP out of the box.  True, there’s some registry hacks to enable the feature, but I couldn’t have end user’s doing that, so I resolved to write a program to do it for them.  It wasn’t until I was almost done that I discovered that, alas, Microsoft had already written one.

I hate to be outdone to that extent so I’m still posting mine here: a zip file which contains a Windows forms version, and a command line version, both of which run remarkably faster than Microsoft’s patch.  My program(s) will check to make sure that it’s the proper version of the OS (Windows XP with service pack 3) and that the registry entries need to be added (with visual output).  No backups are taken, so use at your own (minimal) risk!

(Although I typically share my code, I must admit to being slightly embarrassed at it’s condition since it’s my first full fledged C# program.  I’ll share if I get around to cleaning it up so that it doesn’t look like a VB guy wrote a C# program 🙂

Now to patch up all the other Windows XP issues with the Remote Desktop Connection services in Windows 2008 r2….

Contact Forms and WordPress

I’m rebuilding my company’s website around WordPress, but a sticking point is a web contact form. This appeared to be no problem as there’s several nice contact form add-ins for WordPress. However, it didn’t matter which one I used, Contact Form 7, Fast Secure Contact Form, Contact ColdForm, they all didn’t work. I’d hit submit and the page would cycle back (or in the case of CF7, the spinning arrow would just sit there forever). I rebuilt the server by importing the theme and WordPress settings in a different website and the forms worked, until I restored the MySql database.

At that point I knew it had to be one of the dozens of customizations I had done to WordPress that was causing the forms to fail. And after a bit of a search, I found it: my custom permalink.  It turns out that although most of the rest of WordPress is forgiving about not rewriting URLs, the contact forms are not.  This was on IIS7 so I had to download and install the URL rewrite module and then follow the somewhat cryptic instructions here.

Tragedy of the IP Address Commons

This story detailing Microsoft’s purchase of Nortel’s IPv4 address blocks has a quote that sums up the IPv4 shortage issue:

The Regional Internet Registries, which allocate IP addresses, do not typically view IP as an asset that can be bought and sold. There are processes being developed for assignees to return unused IPv4 to the free pool, for the good of the internet community.

The ‘good of the Internet community’?  Have these people used the Internet? 🙂

IPv6 is being billed as the cure-all, but unfortunately there is as of yet far too much legacy technology out there to make discarding IPv4 worthwhile. This has led to a shortage of IPv4 addresses, however, if there was a market available where people could buy or sell the IPv4 blocks that they own it would bring added IPv4 capacity to the market.  Even if fully implemented, IPv6’s vast address space merely covers up for the incompetence of the RIR’s management of the address blocks and doesn’t actually address any fundamental flaws in IPv4 (while arguably, creating whole new undesirable issues).

As an example, at my current location we have a whole class C address block (~253 usable addresses) that we acquired back in the day when one would call and request a number of addresses and the IPv4 addresses were handed over with very few questions asked.  Most companies this size get by with one to five addresses using PAT and whatnot, but I have the advantage of running an ultra-inefficient Internet setup with huge swaths of dynamic NAT pools, static addresses to equipment that I might need once a year, and a honeypot sitting on top of well over 150 of the remaining addresses.  For a price which would justify a move to a more efficient setup under an ISP address block we might be willing to part with them, otherwise there’s no cost justification in having to make the changes. 

Due to the existence of large ‘dark IP address blocks’, the current lack of true ownership and transferability of these blocks has led to a shortage of those that can be used, and an Internet ‘slum’ where hackers can hang out in address pools that have gone fallow.  There is no real shortage, only a ‘commons’ that has been improperly managed.