Monthly Archives: February 2013

Fun with Exchange Management Shell

I’m really digging the Exchange Management Shell.  It’s FUN FOR THE WHOLE FAMILY!

Okay, maybe not the whole family.  😉

Short example:  someone wanted to know if I could tell them how many emails someone sent in a specific time period.  Short answer:

Get-MessageTrackingLog -Sender username@yourdomain.com -EventID “send” -start ‘1/1/13’ -end ‘2/20/13’ -resultsize unlimited | select-object sender | Group-Object pattern | select count

I spent time playing with that command and checking out how many emails we’ve sent offsite since the start of the year and such.  Better than a water park, I’m telling you!

Comments Off on Fun with Exchange Management Shell

Filed under powershell, sysadmin

Obituary spam

There is a special circle of hell for people who spam obituaries.

As it turns out, I have a modest talent for obituaries.  (Also job references, and for the same reason:  I’m good at finding unique good things about people and saying them.)  Unfortunately, I have now been called upon to exercise this talent for both parents.

Because I’m putting obituaries on the Internet, that means I’m also called upon to fight spam.  I could just turn off comments, but one of my mother’s friends discovered she was dead via google and if someone is in that position and wants to comment…

I can now endorse the following:

  • Bad Behavior.  There are plugins for WordPress, MediaWiki, Drupal, and more.
  • Akismet.  There are plugins for WordPress, MovableType, Drupal plugins that tie in to the service, and more.

Akismet runs your comments through their web service, comparing them to known spam.  Bad Behavior detects malformed spammy requests, and has an optional tie in to http:BL.  They both beat learning how to kill people with your brain.

Comments Off on Obituary spam

Filed under web

I haz a Goodreads listing nao.

I <3 Goodreads.  I like categorizing my books and tracking them;  it appeals to my unused library degree.  Also, much as they suspect, my friends have similar reading tastes.

Here’s my author page on Goodreads.  Most of the stories are available via the equally awesome Escape Pod, heh, but there’s also Broad Spectrum (on my Kindle!).  Which, let me remind you, is free free free free free.

If you’re not on Goodreads, you should be!

Comments Off on I haz a Goodreads listing nao.

Filed under Uncategorized

So, um, I have this friend… *shifty eyes*

So, I have this friend *cough* who had a domain controller that needed a new motherboard. Due to the excitement of the hardware vendor’s tech forgetting to reattach the RAID, then the server no longer recognizing its network cards, and then the tech realizing that he forgot to replace the fan shroud, um, my… friend… kind of forgot to check the system time. It was a long week (which included parental death).

(The system time was 12 hours fast, so it looked right at a glance.)

This was Saturday. The system time situation was discovered Sunday on my… um… friend’s workstation.  (If the time is wrong on the domain controller, that wrong time propagates across the entire network.  This is to prevent Kerberos issues. If this had happened during the week, people would have randomly lost their ability to log on or connect to network shares until the times on workstations and servers were synchronized.  To the wrong time, since the domain controller is the official source.  Yeah.  And that’s the optimistic scenario.)

Since I’m not fooling anyone, I’ll take responsibility for the fix.

  1. Fixed the time on the domain controller.  (Date/time control panel followed by “w32tm /resync” to get the precise time from an internet time server.)
  2. Did search-and-replace on a list of computers from dsquery to strip it down to nothing but computer names, and saved the list as control.txt.
  3. Ran this simple script.

@ECHO ON

set controlfile=control.txt

FOR /F %%L IN (%controlfile%%) DO (
w32tm /resync /computer:%%L
)

I’m a little embarrassed to post my five-liner to my blog, but there you are.  Ten minute fix.

Comments Off on So, um, I have this friend… *shifty eyes*

Filed under scripting