I’m all about negativity today. Sorry.
Anyway, I’ve had something nagging at me for a while now and I think I’ve just figured it out. Powershell is Microsoft‘s answer to having a dumb command line through the Win95 – Win2003 years and it’s quite powerful, as the name implies. Microsoft likes it so much that they makes most of the Exchange 2007 administration efforts in the Exchange Management Shell, a derivative of Powershell that contains Exchange-specific cmdlets.
I’ve long bemoaned to our internal support personnel… and… well, probably my Microsoft contacts too… about how discombobulated Powershell actually is. It’s like it was designed with no standard in mind for the commands – each developer wrote their own cmdlet with their own switches and methods to do things the way they saw fit.
But it’s actually worse than that. Now I’ve come to realize that the problem with managing Exchange from the shell is not only because of the lack of standardization, but because a great deal of this SHOULDN’T be done in a shell command. I’ve heard that Powershell was designed to attract Linux admins who prefer the command line and that’s fine. But I do not know of a Linux admin who would <a href=“http://en.wikipedia.org/wiki/Type%28command%29” title=“Type (command)” rel=“wikipedia” class=“zemslink”>type a command to set a disclaimer on the entire Exchange organization, but rather he/she would edit a config file of some kind. That way, not only would the disclaimer setting be readily apparent and visible, but it wouldn’t take some obscure command to be executed to show me the meat of the option.
What tripped this realization was this “power tip” when I just went into the Exchange shell on one of our servers:
Tip of the day #58:</p>
<p>Do you want to add a disclaimer to all outbound e-mail messages? Type:</p>
<p> $Condition = Get-TransportRulePredicate FromScope<br />
$Condition.Scope = "InOrganization"<br />
$Condition2 = Get-TransportRulePredicate SentToScope<br />
$Condition2.Scope = "NotInOrganization"<br />
$Action = Get-TransportRuleAction ApplyDisclaimer<br />
$Action.Text = "Sample disclaimer text"<br />
New-TransportRule -Name "Sample disclaimer" -Condition @($Condition, $Condition2) -Action @($Action)
Why am I not looking in a config file for this information? Fail.