Using Out-GridView (#DoExTip)

My second tip in this series is going to violate the ground rules I laid out for it, because they’re my rules and I want to. This tip isn’t a tool or script. It’s a pointer to an insanely awesome feature of Windows PowerShell that just happens to nicely solve many problems an Exchange administrator runs across on a day-to-day basis.

I only found out about Out-GridView two days ago, the day that Tony Redmond’s Windows IT Pro post about the loss of the Message Tracking tool hit the Internet. A Twitter conversation started up, and UK Exchange MCM Brian Reid quickly chimed in with a link to a post from his blog introducing us to using the Out-GridView control with the message tracking cmdlets in Exchange Management Shell.

This is a feature introduced in PowerShell 2.0, so Exchange 2007 admins won’t have it available. What it does is simple: take a collection of objects (such as message tracking results, mailboxes, public folders — the output of any Get-* cmdlet, really) and display it in a GUI gridview control. You can sort, filter, and otherwise manipulate the data in-place without having to export it to CSV and get it to a machine with Excel. Brian’s post walks you through the basics.

In just two days, I’ve already started changing how I interact with EMS. There are a few things I’ve learned from Get-Help Out-GridView:

  • On PowerShell 2.0 systems, Out-GridView is the endpoint of the pipeline. However, if you’re running it on a system with PowerShell 3.0 installed (Windows Server 2012), Out-GridView can be used to interactively filter down a set of data and then pass it on in the pipeline to other commands. Think about being able to grab a set of mailboxes, fine-tune the selection, and pass them on to make modifications without having to get all the filtering syntax correct in PowerShell.
  • Out-GridView is part of the PowerShell ISE component, so it isn’t present if you don’t have ISE installed or are running on Server Core. Exchange can’t run on Server Core, but if you want to use this make sure the ISE feature is installed.
  • Out-GridView allows you to select and copy data from the gridview control. You can then paste it directly into Excel, a text editor, or some other program.

This is a seriously cool and useful tip. Thanks, Brian!

Posted in Computers, DoExTip, Exchange | 1 Comment

Exchange Environment Report script (#DoExTip)

My inaugural DoExTip is a script I have been rocking out to and enthusiastically recommending to customers for over a year: the fantastic Exchange Environment Report script by UK Exchange MVP Steve Goodman. Apparently Microsoft agrees, because they highlight it in the TechNet Gallery.

It’s a simple script: run it and you get a single-page HTML report that gives you a thumbnail overview of your servers and databases, whether standalone or DAG. It’s no substitute for monitoring, but as a regular status update posted to a web page or emailed to a group (easily done from within the script) it’s a great touch point for your organization. Run it as a scheduled task and you’ll always have the 50,000 foot view of your Exchange health.

I’ve used it for migrations in a variety of organizations, from Exchange 2003 (it must be run on Exchange 2007 or higher) on up. I now consider this script an essential part of my Exchange toolkit.

Posted in DoExTip, Exchange | Leave a comment

Introducing DoExTips

At my house, we try to live our life by a well-known saying attributed to French philosopher Voltaire: “The perfect is the enemy of the good.” This is a translation from the second line of his French poem La Bégueule, which itself is quoting a more ancient Italian proverb. It’s a common idea that perfection is a trap. You may be more used to modern restatements such as the 80/20 rule (the last 20% of the work takes 80% of the effort).

I’ve had an idea for several years to fill what I see is a gap in the Exchange community. I’ve been toying with this idea for a while, trying to figure out the perfect way to do it. Today, I had a Voltaire moment: forget perfect.

So, without further ado, welcome to Devin on Exchange Tips (or #DoExTips for short). These are intended to be small posts that occur frequently, highlighting free scripts and tools that members of the global Exchange community have written and made available. There’s a lot of good stuff out there, and it doesn’t all come from Microsoft, and you don’t have to pay for it.

The tools and scripts I’ll highlight in DoExTips are not going to be finished products or polished. In many cases, they’ll take work to adapt to your environment. I’m going to quickly show you something I found that I’ve used as a starting point or spring board, not solve all your problems.

So, if you’ve got something you think should be highlighted as a DoExTip, let me know. (Don’t like the name? Blame Tom Clancy. I’ve been re-reading his Jack Ryan techno-thrillers and so military naming is on the brain.)

Posted in Computers, DoExTip, Exchange | Leave a comment

Let’s Test It!

I’ve been studying karate for nearly five years now, and I don’t think I’ve shared this story before. When we’re sparring, students are required to wear the appropriate protective gear. No head shots, for example, if you’re not wearing head protection. For males, a sports cup is mandatory, for reasons that probably don’t require elaboration.

When I was buying a cup, I had no clue what to get. The only sports I’d done as a kid were one season of track in high school and some Pee-Wee/Little League baseball. I’d never had to deal with a cup before. I’d heard lots of horror stories about them: they were uncomfortable, didn’t fit, and didn’t really keep blows from hurting as much as they reduced the pain to manageable levels.

No, thanks. This geek did some research and came up with the Nutty Buddy. This was a cup whose inventor stood by his product by taking 90mph fast balls from a pitching machine to his crotch. After reading around, I was sold. It was more expensive, but hey, not feeling soul-crushing pain is worth it, right?

Here’s what happened next, as I sent it to Nutty Buddy:

My order arrived on the day of a sparring class. That night, I prepped for class a little early so I could figure out how to get my Nutty Buddy put in place. Having bought the “Build Your Own Package” option, I had everything I needed, and soon I was all dressed in my gi, ready to go. I walked out from my bedroom to the living room to pick up my gear bag and was met by my son, then 11 years old. “Do you have it on?” he asked eagerly and I nodded. “Great, let’s test it!” he said as he executed a perfect front snap-kick to the boys. It was a great kick, too – one of those kind you can’t be thinking about, you just have to let it rip. He immediately realized what he’d done and started apologizing, but was shocked when I laughed. The only thing I’d felt was the shock. The Nutty Buddy lived up to the hype, and I knew it was worth every penny.

No matter how prepared you are for life, sometimes you only know whether something’s going to work by just doing it.

Posted in Humor, Karate, Life | 2 Comments

#MSExchange 2010 and .NET 4.0

Oh, Microsoft. By now, one might think that you’d learn not to push updates to systems without testing them thoroughly. One would be wrong. At least this one classifies as a minor annoyance and not outright breakage…

Windows Update offers up .NET 4.0 to Windows 2008 R2 systems as an Important update (and has been for a while). This is fine and good – various versions of the .NET framework can live in parallel. The problem, however, comes when you accept this update on an Exchange 2010 server with the CAS role.

If you do this, you may notice that the /exchange, /exchweb, and /public virtual directories (legacy directories tied to the /owa virtual directory) suddenly aren’t redirecting to /owa like they’re supposed to. Now, people aren’t normally using these directories in their OWA URLs anymore, but if someone does attempt to hit one of these virtual directories it leaves a gnarly error message to spam your event logs.

This is occurring because when .NET 4.0 is installed and the ASP.NET 4.0 components are tied into IIS, the Default Application Pool is reconfigured to use ASP.NET 4.0 instead of ASP.NET 2.0 (the version used by the .NET 3.5 runtime on Windows 2008 R2). What exactly it is about this that breaks these legacy virtual directories, I have no idea, but break them it does.

The fix for this is relatively simple: uninstall .NET 4.0 and hide the update from the machine so it doesn’t come back. If you don’t want to do that, follow this process outlined in TechNet to reset the Default Application Pool back to .NET 2.0. Be sure to run IISRESET afterwards.

Posted in Computers, Exchange | 1 Comment

Blues Brother

Right at the end of December, I decided that January 2013 would be my year of just saying “Do it.” The first thing I said “do it” to was getting my hair dyed blue, like I’ve been wanting to for over a decade. That Saturday, I walked into my hairstylist for my normal haircut, and came out with a little more.

Devin_blue-dec-sm
My blue-green hair in December

I loved the cut and the color (a blue-green-silver mix), and after two weeks it had faded to a soft cotton-candy color of blue. However, it just kept on fading. Time for a refresh, so back in to my fantastic hairstylist, Liz!

Devin_Liz_Blue-sm
My partner in crime

This time, we dropped the green and mixed the blue and silver in nearly equal proportions. The result is vivid now, but we think it’s going to be fantastic after some fading!

Devin-blue-jan-sm
Move over, IBM

The best part of this experiment is that if I ever get tired of looking like a dry-erase marker, I can simply shave it off. It’s not like that’s a new look for me. The plan, though, is to keep experimenting with fun colors and settle down on a few favorites.

Posted in Life | Leave a comment

A Few Bullet Points on American Gun Culture

I’m a gun owner. I hold a concealed pistol license in the state of Washington and I own a pistol and a rifle, which I have taken reasonable and prudent steps to keep locked up and safe when they are not in use. Although I have not taken a formal gun safety class, I have had firearms training and have taken steps to ensure that my family is also provided with training. My kids have enjoyed the carefully supervised events when they have been taken shooting by myself and other qualified adults.

I’ve had some thoughts stirring around for a while on the topic of America and the 2nd Amendment, but it wasn’t until today I pulled them together enough to start the process of writing a blog post.

Note 1: I’m going to do my level best to be polite and respectful to all parties, regardless of their political position on this subject, and I request that all commenters do the same. People crossing the line of civility may get a warning or I may just delete their comment, depending on the severity.

The Ground Rules

Today, on Facebook, one my friends posted this picture:

Who knows more about the Constitution?Figure 1: Constitutional law qualifications
(can’t find the original source for this, if you know please let me know?)

As you can imagine, this prompted (as do almost all gun control threads on the Internet) a barrage of comments. Sadly, these types of discussions tend to quickly be dominated by one of two vocal extremes:

  • The gun enthusiast (pejoratively known as the “gun nut” or “right-wing whackjob”), who often gives the impression that she won’t be happy until she can personally and privately own any weapon system ever made, up to and including ICBMs, aircraft carriers, Abrams tanks, and F-22 Raptors. She is typically, but not always, aligned with the more extremely conservative side of the political spectrum
  • The gun worrier (pejoratively known as the “gun grabber” or “bleeding-heart liberal”), who commonly and frequently opines that mankind will know nothing but a wretched existence devoid of any light, joy, or hope until every last physical instance of, drawing of, reference to, or even the mental concept a of weapon is wiped from existence. He is typically, but not always, aligned with the more extremely liberal side of the spectrum.

Note 2: if you fit into one of these two extremes, I will give you good advice: stop reading now, and move on. You won’t like what I have to say; I refuse to validate your unreasonably narrow and exclusionary viewpoint. I won’t let other people call you names should you choose to ignore my advice and comment, but I will redact your extremist attempts to redirect a civil conversation into your own flavor of lunacy. Be warned – my blog, my rules. You want to post your own screed? Go burn your own storage and bandwidth to do it.

Almost immediately, a good point was made: while Obama’s credentials are accurately stated, this picture attempts to make a point through blatant use of stereotypes. We know nothing about the gentleman in the red box – he might also be an Ivy League Constitutional scholar, or a distinguished judge, or even a talented and knowledgeable amateur scholar. We don’t know and we’re not told. This is the good old “guilt by association” propaganda ploy – if you like big scary guns, you’re probably ignorant just based on your appearance. Not a great way for liberals to make a point.

At the same time, conservatives are guilty of blatantly false propaganda too:


Figure 2: One of these things is not like the other
(found on
rashmanly.com)

Really? A democratically elected (twice, now, even!) federal executive, in a country with some of the most extensive checks and balances, who for at least half of his time in office has had to deal with a Congress (you know the branch of the government that actually makes the laws) controlled by his political opponents, is magically a dictator on par with some of the worst tyrants of recorded history? Because his biggest political acts have been to try to keep our country from plunging into a hyper-inflationary depression, to make sure poor people have access to medical care, and to try to maybe do something to reduce the number of innocent people killed by guns in this country every year? Remember, this is the President who pissed off many in his party because he didn’t bother to dismantle many of the incentives put in place by his predecessor.

Note 3: Don’t even think of heading to the “Democrats just want to take away guns and Republicans are protecting gun rights.” Remember the assault rifle ban that expired in 2004? The one that was enacted in 1994, which would have been during the (Democratic) Clinton administration? The one that was lobbied for by Ronald Reagan?

Finding Middle Ground

Okay, now that I’ve unilaterally declared extremes off the table, let’s dig into the meat of the original graphic – which is the fact that Obama has a background in Constitutional law, so unlike many politicians and political wonks, he might actually have a more than passing familiarity with some of the issues involved.

Obama is using executive orders to make changes within the framework of existing law, as well as working to introduce legislation to accomplish additional goals such as reintroducing the expired assault rifle ban. Some of these changes are likely to be polarizing, but outside of the echo chambers and spin factories, there’s actually a large amount of support for many of these proposals – and this according to a poll of 945 gun owners conducted last July by Republican party pollster Frank Luntz, before the events of Newton. After Newton, support for stricter laws on the sale of firearms has increased overall, including increased support for passing new laws although support for renewal of the assault rifle ban is still just shy of a majority. Yet somehow, any discussion of changes provokes an immediate, hostile response.

It’s also inevitable to see someone trot out the argument that since cars kill far more people, we need to regulate cars. Um, hello? We do. Car manufacturers have to regularly participate in studies and make changes to cars to reduce the deaths because of cars, and over the decades, it’s worked. We do the same thing for other forms of violence — we study it, and we make intelligent changes to reduce the impact. But the current climate and talking points (such as the historically inaccurate charge that gun control led to the Holocaust) have kept us in a virtual standstill on dealing with gun violence of any type.

Thanks to a careful and prolonged lobbyist and political spending campaign by the NRA and the gun manufacturers, we don’t even have credible research that would tell us why American gun deaths are so much higher than comparable nations. Let me be clear; the NRA does a lot of good, but they are a human institution and over the past couple of decades, they’ve transformed themselves from a simple society to promote scientific rifle shooting to a lobbyist organization. At times, I think this dichotomy can at times drive the NRA leadership out of sync with their members’ concerns and lead them to try to drive policy and dictate their members beliefs rather then represent them.

At this point, I think its obvious that some sort of changes need to be made. The USA has a gun homicide rate that is 4.5 times higher (or more) than other G-8 countries. When confronted with these facts, many people respond with talking points about how countries that have enacted gun control laws see a rise in crimes such as violent assault (Australia is a frequently featured talking point). However true these points may be, I can’t help but think that’s an invalid comparison. If I were to be the victim of a crime, I think I would rather be injured rather than outright killed. I would rather that my stuff got stolen than lose my wife or one of my kids. But overall, the crime rate in the US is dropping.

Like many Americans, I’m in favor of extending background checks and doing more to ensure that people with a history of violent mental illness and misdemeanor violence have reduced access to guns. Without comprehensive studies, I’m not convinced that renewing the assault rifle ban will actually help anything (are extended magazines actually useful in genuine self-defense scenarios, or would regular magazines do the trick?) But there’s a number of potential steps I’ve thought of that I’ve seen no discussion on:

  • I’m disturbed by the fact that when I take a free CPR or First Aid class, I have more stringent requirements than I do for my CPL. When I get CPR training I have to demonstrate that I am up-to date in my training and technique and recertify every year or two at the most; when I applied for my concealed pistol license, all I had to do was not currently be a felon and I get a five year license. Different states have different requirements; maybe it’s time to get a more consistent framework in place that requires more frequent check-ins and more frequent training?
  • While we’re talking about training, let’s hit another popular talking point: that armed private citizens are likely to stop mass shootings. While there are incidents of gun owners (typically store clerks) stopping an attempted robbery, the private citizens that have stopped instances of mass shootings all turn out to be private or off-duty security personnel who have substantially higher levels of firearms training than the average citizen (such as the Clackamas Mall shooting in Portland, OR).
  • One of the claimed benefits of having less restrictive firearms statutes is crime reduction. More armed citizens, it is said, equals lower crime. However, in order to have this kind of deterrent effect, don’t the criminals have to either know that people are carrying, or at least have a reasonable suspicion that people are carrying? Concealed carry would seem to be counter-productive; open carry would actually allow criminals to know what they’re about to get into. Is American culture ready for open carry? Again, this is an area we’d need more research on.
  • What about on-site gun safe inspections as part of the permit approval process? If one of the big concerns is people getting inappropriate access to guns, we should be making sure they’re being appropriate stored and locked away.

There’s a horrible patchwork of laws in place and there are some loopholes that should be closed, as long as we can do so without heading down the path of a guns registry. Come on, yes there are some screwballs who want to take all guns away, just as there are some screwballs who think that they should be able to own fully operable RPGs and tanks and fighter jets. Most of us are somewhere in the middle, although not in the same part of the middle, but we can’t even have a realistic, reasoned discussion on this because the people who benefit financially from the status quo make sure we can’t.

At this point in time, we can’t have a meaningful conversation on what the “well-regulated” clause in the 2nd Amendment is supposed to mean. All of our other liberties have been slowly and carefully re-interpreted over time – sometimes overly so, usually with corrections in the long run — as the times changed and as the nation changed and (yes) as we saw the fruits of some of the Founders’ mistakes. They were human; of course they made mistakes. They knew they would make mistakes and that we would have to adjust for situations they could never have foreseen. And yet, a strict reading of the 2nd Amendment is somehow off the table for even reasonable discussion? Why must we hew strictly to the Founding Fathers’ intentions in this one area when we willingly ignore them in other areas? (Check out what they had to say about professional politicians, lobbyists, and a two-party system.)

So, yes, sometimes it takes a Constitutional scholar to understand not only the original context of our Constitution, but also remember that the Founding Fathers always intended this Constitution to grow and live and adapt as our country did. It’s time for us to open the doors to a reasoned discussion on all areas of the 2nd Amendment, including the precise definition of which weapons it makes sense to allow citizens to have and what sorts of controls might be prudent to put in place to balance the right to self-defense with the reasonable safety of those around us.

Posted in Politics, Rants | 2 Comments