Thursday, February 15, 2007

Exchange 2007 SP1 info - updated

Update - The MS Exchange Team blog has also published info on SP1. The timeline is still around Longhorn Server release. You can find the info here.

Jim McBee has found some info on what will be part of Service Pack 1 -

  • S/MIME controls for Outlook Web Access
  • Personal distribution lists via OWA
  • Outlook Web Access monthly calendar view
  • Custom fields visible in the OWA address book
  • Rules wizard for OWA
  • Move-Mailbox cmdlet will import/export from a PST file!
  • Bulk mailbox operations (I'm assuming this means creation)
  • Public folder management from GUI
  • POP3/IMAP4 configuration management from GUI
  • IPv6 support
  • Support for Longhorn server
  • Standby continuous replication (SCR)
  • Log shipping on private networks
  • Information Rights Management (WRMS integration was pulled from E2K7 right before RTM)
  • Improvements in geographic CCR clusters
  • Improved VOIP security

The timeline for the release is after the Longhorn Server release

(So we will have to wait for this and the Viridian release before we can virtualize Exchange 2007). Read more at Jim's post.

PowerShell, creating statistics


# Creating statistics in PowerShell is very easy. There is no need to
# create several variables, it can all be combined into one!

# This is how it can be done


# Create hash-table a.k.a. associative array
# Note that you do not have to define the members before using them
$stats=@{}

# do something, here the distribution of random numbers are
# used as an example, but in the real world it could be the
# number of objects processed, number of updates succeeded
# and number of failed operations

$random=new-object system.random

1..1000 | % {
$n=$random.next(0,10)
switch ($n) {
# Increase the counters
0 { $stats.zeroes+=1; break }
1 { $stats.ones+=1; break }
2 { $stats.twos+=1; break }
default { $stats.others+=1 }
}
}

# report the results
$stats

# Output
Name Value
---- -----
twos 93
zeroes 108
ones 104
others 695



# this is almost too easy...

# Hint: If you want pretty-formatted names, use $stats."Pretty Name"+=1



Updated with missing vertical bar in code (it is hard getting pasted code to work)

Wednesday, February 14, 2007

LCS 2005 MOC course 7034A available for free

I'm in Seattle for the Office Communicator Server 2007 Airlift and was asked about courses for LCS 2005.
The following is actually old news, but I thought I had blogged about it earlier. The Microsoft Official Curriculum (MOC) course 7034A called "Implementing Microsoft Office Live Communications Server 2005 (SP1)" is available for free download (Everything except the VHD files) from here.

PowerShell, write-verbose word wraps

I think this is an error: Write-Verbose word wraps the output based on the window width.

Try to execute the last statement with different window widths (just drag the right border of the window) to see what I mean -

$VerbosePreference="continue"
write-verbose $($s="";for($i=1;$i -lt 10;$i+=1) {$s+=([string] $i * 9) + " "};$s*5)



Well, I could live with that if that was just the case interactivily, but no -
nope - nix - it also applies to a scheduled task - and which window is it then
taking the width from? Needless to say, having word-wrapped you verbose output makes it very hard to read.

Looking for word-arounds, I first tried this -

$host.ui.rawui.WindowSize.width=10000


but that assignment was just ignored. Then I tried this approach -

$current=$host.ui.rawui.WindowSize
$current.width=10000
$host.ui.rawui.WindowSize=$current


and got -

Exception setting "WindowSize": "Window cannot be wider than the screen buffer.
Parameter name: value.Width
Actual value was 10000."
At line:1 char:16
+ $host.ui.rawui.W <<<< indowsize="$current"


Well, the obvious approach is then to -

$current=$host.ui.rawui.BufferSize
$current.width=10000
$host.ui.rawui.BufferSize=$current
$current=$host.ui.rawui.WindowSize
$current.width=10000
$host.ui.rawui.WindowSize=$current


but no -


Exception setting "WindowSize": "Window cannot be wider than 200.
Parameter name: value.Width
Actual value was 10000."
At line:1 char:16
+ $host.ui.rawui.W <<<< indowsize="$current"


It seems to be limited by the values in $host.ui.rawui.MaxWindowSize or
$host.ui.rawui.MaxPhysicalWindowSize (BTW: to see the value of these, pipe
them into format-list). Then I realized, that the windows size is controlled
by the font and made some tests with that. So maybe, I could just create some
customized settings and in this way improve the situation? First, I figured out
the actual window title by logging $host.ui.rawui.windowTitle. Next, I started
my own console with that title -

cmd /c start "the wanted title" powershell


adjusted the window properties and that worked.

Next, I started to look at a scripted approach. First, I did not want to have to do this manually on some server and second, hey - this is scripting, right? - no such thing as a manual procedure please!

The scripted work-around (to cut a long story short)

When a scheduled task is running, an invinsible command line window is created.
And the settings come from the default window settings in HKCU:\Console. So could
I influence the settings but creating a subkey with the necessary properties.
This is quite simple to do from PowerShell, but I ran into another problem.
Set-ItemProperty only seems to support write string properties (e.g. registry
values), so I had to make a small dword-function as well.
Finally, I had to cope with the different titles as the values vary from XP/2003 to Vista.

Here is the resulting example -

function Set-RegistryValue($Key,$Name,$Value,$type=[Microsoft.win32.registryvaluekind]::DWord) {
$parent=split-path $key -parent
$parent=get-item $parent
$key=get-item $key
$keyh=$parent.opensubkey($key.name.split("\")[-1],$true)
$keyh.setvalue($name,$value,$type)
$keyh.close()
}
function Set-OutputBuffer($width=10000) {
$key=""
if ($host.ui.rawui.WindowTitle -eq "taskeng.exe") {
$key="hkcu:\console\taskeng.exe"
}
elseif ($host.ui.rawui.WindowTitle -eq "$($env:windir)\system32\svchost.exe" ) {
$key="hkcu:\console\%SystemRoot%_system32_svchost.exe"
}
# other titles are ignored
if ($key) {
$taskeng=$key
if (!(test-path $taskeng)) {md $taskeng -verbose}
set-RegistryValue $taskeng FontSize 0x00050000
set-RegistryValue $taskeng ScreenBufferSize 0x02000200
set-RegistryValue $taskeng WindowSize 0x00200200
set-RegistryValue $taskeng FontFamily 0x00000036
set-RegistryValue $taskeng FontWeight 0x00000190
set-ItemProperty $taskeng FaceName "Lucida Console"

$bufferSize=$host.ui.rawui.bufferSize
$bufferSize.width=$width
$host.ui.rawui.BufferSize=$BufferSize
$maxSize=$host.ui.rawui.MaxWindowSize
$windowSize=$host.ui.rawui.WindowSize
$windowSize.width=$maxSize.width
$host.ui.rawui.WindowSize=$windowSize
}

}


$verbosepreference="continue"
Set-OutputBUffer

# test code

$host.ui.rawui
write-verbose "$(get-date)"
write-verbose $($s="";for($i=1;$i -lt 10;$i+=1) {$s+=([string] $i * 9) + " "};$s*5)



The first time a scripts runs - for that user account - the window have not been
adjusted. The next time, everything is fine. I can live with that. There is still
a limit to the line length before it gets wrapped, but I haven't figured out
how those values gets calculated. On my Vista with a resolution of 1920, the
max length is 341, on my XP with 1400, the max length is 466! Changing the
screen resolution does not seem to affect the value.

PowerShell multi-line comments

Well, as you may know, there is no such thing. You can only comment to the end of line. But there are two work-arounds.

The first is if you simply want to uncomment some code-lines. In this case, you can surround them with an if-statement like
if ($false) {
disabled-command
}
This can be useful when developing.

This first approach has that advantage - or disadvantage - that the disabled code must be syntactically correct.

The seconds approach, utilizes the multi-line contant construction of PowerShell. Simply surround the lines with @' and '@ -
@'
whatever
'@ > $null

whatever can be anything except that the line must not start with '@. $null is used to write the string into the big bit void. So this approach is good for writing comments.

Do not use @" and "@. The string between will be parsed and variables will be replaced.

I know that you can simply use the uncomment function from a decent code editor. But often, notepad is all you have.

PS: The @' '@ construct is also very useful, if you want to embed other things like XML-code in you script. Here is a small example -

$xml=[xml] @'
<root>
<child>value</child>
</root>
'@
$xml.root.child

Monday, February 12, 2007

Are you still using LM hashes?

Maybe, now is a good time to stop doing so!

Just read Robert Hersing's entry to know why.

Here is how you get rid of the LM hashses: KB 299656 How to prevent Windows from storing a LAN manager hash of your password in Active Directory and local SAM databases. I recommend method 1.

Friday, February 09, 2007

Microsoft GM Scopes Out New Tools For Unified Communications Push

Interesting article from CRN -

The brave new world of unified communications will spur demand for new tools. And programming a system that combines PBX functionality, voice and data communication -- in real time and asynchronous -- is no small feat....

...When people think of platform, they focus on the APIs. While that's the center of gravity, thinking broadly, there must be a focus on things like tools, manageability and deployability, [which is] especially important in this space to all personas: the developer, the IT pro and the end customer," Debique told CRN. "This is a space where it's really important to make sure the connection between the application, the administration and the deployment of the application is very strong.

(Sadly details isn't publicly available until PDC in October 2007)

Microsoft's Virtualization Offerings Suck

I just stumbled across Robert McLaws post Microsoft's Virtualization Offerings Suck and I do agree with a few of the points he is making (GUI and 64 bit guest support mainly).

We've been sticking with Virtual Server for some time and the main reason for that has been PSS supportability and licensing (Actually we have both VMWare and Virtual Server in our environment). But now we want to setup Exchange 2007 in "real" production environment and has bought a beefy server for that (Quad-core, 64 bit, 8 GB, six 15.000 RPM spindles in RAID 10).
Furthermore, as we wan't to mirror our enterprise customers environments I was planning on using Virtual Server to create and separate all the possible Exchange Server 2007 roles on a single server.

I've been running the 64 bit version of Virtual Server 2005 SP1 (Beta 2) for a while on my demo machine, but only with 32 bit guests due to the products I'm testing (Primarily LCS 2005 and Exchange 2007 32 bit). I thought that 64 bit guest support would be part of the final SP1 package (never bothered to check 'cause it was "a given"). But I just discovered that its first planned to be released as part of the Windows Server Virtualization (a.k.a. Viridian) offering that is due 90 days after Longhorn release and then only on the Longhorn platform :-(

So I guess we will ditch the support and go with VMWare Server for this server (I guess I for a while will have a hard time to handle customers complaints regarding how they think Microsoft supports "legacy" systems and how the products always seems to be much better/working as they should .. in the "next version").

Tuesday, February 06, 2007

SCOM 2007 Services Provider Management Pack

Interesting (For many of my customers anyway) ...

... this Management Pack lets you "manage" a downstream System Center Essentials environment at a customer site from an upstream Operations Manager 2007 environment at a NOC. This solution is being developed for Managed Services Providers who want to deliver their customers a "hosted" monitoring offering.

Read more at source

Sunday, February 04, 2007

Nortel and Microsoft announcement on VoIP and UC

Microsoft and Nortel has announced a joint roadmap for Voice over IP and Unified Communications and it indeed looks very interesting. Here's a short summary -

UC Integrated Branch. This new product from the alliance will incorporate Nortel and Microsoft® technology on a single piece of hardware that delivers cost-effective, high-quality and easy-to-deploy VoIP and unified communications in remote offices. The UC Integrated Branch is planned to be available in the fourth quarter of 2007.

Unified Messaging. To simplify customer deployments, native session initiation protocol (SIP) interoperability between the Nortel Communication Server 1000 and Microsoft Exchange Server 2007 Unified Messaging is planned to be available in the second quarter of 2007. The solution includes Nortel professional services for design, deployment and support.

Conferencing. This new solution will extend the rich feature set of Nortel Multimedia Conferencing to Microsoft Office Communicator 2007, delivering a single, familiar client experience consistent across applications such as voice, instant messaging, presence, and audio- and videoconferencing. The on-premise solution is planned to be available in the fourth quarter of 2007.

In 2007, the companies also plan to extend their current unified communications solution — a unified desktop and soft phone for VoIP, e-mail, instant messaging and presence — to the Nortel Communication Server 2100, a carrier-grade enterprise telephony product supporting up to 200,000 users on a single system. "

You can read the full transcript and see the webcast here.

Saturday, February 03, 2007

WMI Diagnostics v2.0

If you experience WMI problems (like I currently do - put operations to WMI combined with Live Communications Server 2005 fails - but not always), give the WMI Diagnosis Utility v2.0 go try. Get it here.

Friday, February 02, 2007

Exchange 2007 Language Support

Just found a good overview of supported Exchange 2007 languages -

Microsoft Exchange Server 2007 has more language support for its components and features than in any earlier versions of Microsoft Exchange. This topic gives you information about the specific languages that are supported for each feature and component in Exchange 2007.

Thursday, February 01, 2007

Ajax 1.0 released

If you are into ASP.NET web pages and want to avoid those annoying full page repaints the good news is that Ajax (formerly known as Altas) has been released.