Thursday, April 26, 2007

EASI passport domains support for Live Messenger and LCS PIC

As earlier reported in EASI passport domains support in PIC / LCS 2005 SP1, EASI passports (Custom domains in MSN/Live) has actually been supported in LCS 2005 Public Instant Messaging Connectivity since October 11th 2005, even though the KB article KB897567 "Known issues that occur with public instant messaging after you install Office Live Communications Server Service Pack 1" said that it didn't.

Last I checked (April 2nd 2007) the information still wrongly stated that it wasn't supported, but it has now been corrected (I have reported it several times both through feedback forms and my contacts in US) as follows -

As of October 11, 2005, all EASI Windows Live ID domains are fully supported for the Public IM Connectivity (PIC) service. This means that Microsoft Office Communicator users can communicate with MSN users by using EASI Windows Live IDs through PIC. EASI ID enables MSN users to use the domain name of their choice to create an IM address through Windows Live ID. For example a user’s EASI Windows Live ID could have been username@contoso.com .

This was a great service for MSN users. However, the service caused problems when PIC-enabled users tried to communicate with MSN users by using Office Communicator. With the change of October 11, 2005, you can use the EASI Windows Live ID with PIC by making a simple change when you add a user to your Communicator contact list.

A Communicator user who wants to add the EASI Windows Live ID of username@contoso.com would add the following address to the search field: username(contoso.com)@msn.com

This increases the effectiveness of the PIC service because contacts that have unsupported EASI Windows Live ID domains no longer need to change their domains in order to use the PIC Service.

Remember that if you implement LCS and OCS and SIP with same namespace, as your users has used earlier in EASI passports (E.g. msnuser@inceptio.dk), then the msnusers will be required to change their passports after the PIC service has been activated ... and this is by no means a "smooth process". Read more about this in Issues with EASI passport domains, LCS and MSN Messenger.

Wednesday, April 25, 2007

Windows Messenger and Office Communicator Port Usage

Microsoft has updated the article "Description of the Windows Messenger client basic protocol port usage for instant messaging, file transfer, audio, and video" which also applies to Office Communicator (At least on Legacy Windows versions a.k.a. XP and 2000 ;-)

If you are looking at firewall configuration the post LCS, Audio/video, file transfers and firewalls may also be worth a read, and if you are looking at Network capacity planning then look at the post Interested in Network Bandwidth Usage of Audio/Video in Office Communicator !?.

Monday, April 23, 2007

PowerShell, bug in Stop-Transcript

Stop-Transcript emits an error even if -ErrorAction SilentlyContinue is used -

Stop-transcript –ea SilentlyContinue
Transcription has not been started. Use the start-transcript command to start transcription.
Stop-Transcript : An error occurred stopping transcription: The console host is not currently transcribing.
At line:1 char:16
+ Stop-transcript <<<< –ea SilentlyContinue


This must be a bug. Luckily, Stop-Transcript is not an important command as such.

You can suppress the error message using one of these method.
1) Set the global variable (or in the script scope)
$ErrorActionPreference="SilentlyContinue"

2) Do it locally in your script (better)
& { $ErrorActionPreference="SilentlyContinue"; Stop-Transcript }

3) Trap the message (probably best)
Trap {Continue} Stop-Transcript

If you need to suppress all output append > $null

Interesting set of webcasts on Exchange Troubleshooting Assistant (a.k.a. EXTRA)

As you might know, EXTRA 1.1 was released to the web on the 4th April (please see www.ExBPA.com for download details).

In order to help with understanding of how to use EXTRA 1.1, we have organized three Webcasts to be presented by the lead developers of the Database Troubleshooter, Performance Troubleshooter and the MailFlow Troubleshooter. They will be showcasing the functionality of these tools and also we are aiming to have Q&A during the Webcast for any questions that you have.

See more here (And remember to subscribe to their RSS feed if you already haven't done so ;-)

Technical Note on Exchange 2007 UM and Cisco CallManager (CCM 5.1) integration

Microsoft has released a preview configuration note that contains information about deploying Exchange 2007 UM with a Cisco Call Manager 5.1. The requirements to use the example configurations are -

- PBX Vendor: Cisco
- PBX model: Call Manager 5.1
- PBX software: 5.1.0.9921-12
- Protocol: Direct SIP Connection

It also contains a link to a list of trained Exchange 2007 UM partners (I guess you don't get on that list if you can do it without training ;-)

Download it from here.

Friday, April 20, 2007

PowerShell, writing debug output

I have been playing around with redirecting verbose and debugging output. I have pursued debugging the most as I want to log debugging information to another place than the user interface. Verbose output is intended to go there.

My first hope was that Write-Debug would output to the debugger, so I could see the messages in Sysinternals' DebugView. But no. Write-Debug should write to the debug pipeline, but I do not think PowerShell v1 has a way of reading that pipeline.

Luckily, PowerShell is a .Net application, so - would it be possible to tamper with the listeners like I have done in asp.net? The answer to this rhetoric question is yes.

So I wrote two new scripts Set-DebugOutput and Out-Debug. Originally, I would have just overridden the existing Write-Debug statement, but I cannot figure out how to do that. If I create a function called Write-Debug, that will be called - as PowerShell searches functions before cmdlets - but I also want to call the Write-Debug cmdlet. I have searched the Microsoft.PowerShell and System.Management.Automation namespaces without luck. But Out-Debug is also a 'valid' name as it sends information outside the PowerShell environment.

The two scripts are placed in by script library and is included in the path. I do that like this in my $profile -

$myPSConfiguration=(split-path $myinvocation.mycommand.path -parent)
$libraryDir=join-path $myPSConfiguration Library
new-item -type directory -path $libraryDir -ea silentlycontinue
$env:path+=";$libraryDir"

Explanation: Figure out where $profile is placed, build path, create sub folder - ignore errors, add to search path

Both scripts are raw and not commented as they are so small. Out-Debug uses a method so it processes both arguments and pipeline input. An easy way to do so is to create a local function - f - that does the actual work (always using pipeline input) and then just process $args and $input. Out-Debug calls Write-Debug, so the debug is still visible if $DebugPreference is set to Continue. Set-DebugOutput lets you specify a file which then also receives the debug output.

Set-DebugOutput.ps1 -
param($file)

[System.Diagnostics.Debug]::Listeners | ? { $_.name -eq "Default" } | % {
    Write-Verbose "Setting log file to $file"
    $_.LogFileName=$file
}


Out-Debug.ps1 -
filter f{Write-Debug "$_";[System.Diagnostics.Debug]::WriteLine("$_")}
$args| f
$input | f



PS. If you see Dennis, remember to tell him that he has something in his eye...

Wednesday, April 18, 2007

Correcting SIP address to match SMTP address

Stuart Bennet has created a nice little script that corrects SIP adressess for users that have a change in their Primary SMTP address. This is for users that would like to change the SIP URI when their SMTP address changes (And thereby ensuring that presence shows up correctly in Outlook etc.)

You can find the script here.

We (Actually Per) have created the same script using PowerShell for a customer and when Per gets his act up (Wink, wink) we may post the same and more samples in PowerShell (If he doesn't I will do it and take credit ;-)

Small Update Rollup for Exchange 2007 released

MS has released a update rollup to Exchange 2007 containing the following fixes -

932487 (http://support.microsoft.com/kb/932487/) The Microsoft Exchange Information Store service stops unexpectedly when the Exchange Server 2007-based server replicates the Public folder

929756 (http://support.microsoft.com/kb/929756/) The DoSnapshotSet method may stop responding in the Exchange store, and a backup application stops responding on an Exchange 2007 server

You can find more info in the KB and the download here.

Monday, April 16, 2007

HMC 4.0 RTW'ed

HMC 4.0 has been Released To Web here and you can find the documentation here (UPDATE The documentation file works now).

Microsoft Solution for Hosted Messaging and Collaboration 4.0 offers hosting service providers with tools, tested best practices, scripts, and code samples designed to efficiently deploy messaging and collaboration services on multi tenant servers. The solution provides both automated and manual procedures for deploying, running and operating a hosted environment.

Most notably it now includes Exchange Server 2007 and WSS 3.0 hosting. If you are not familiar with the product you can read more about the solution here (Or better yet contact us at Inceptio A/S for an introduction / Architectural Design Session ;-)

Thursday, April 12, 2007

Viridian and Virtual Server Timing Update (A.k.a. delayed)

Mike Neil who is the general manager for virtualization strategy has announced an updated/delayed timeplan for Viridian and Virtual Server -

The public beta of Windows Server virtualization will ship in the second half of 2007, not in the first half as previously disclosed.

Still 180 days after the longhorn release

The final version of
Virtual Server 2005 R2 service pack 1 now will be available in Q2, not Q1 as previously stated. In the interim, customers and partners can download a Release Candidate (RC) version later this month - this is code complete and an update to the current beta 2.

I still wonder why Virtual PC 2007 supports 64 bit guest OS and Virtual Server doesn't - anyway IMHO after approx. 6 months since the the release of beta 2 its about time for the RC ;-)

Read the complete announcement here. Originally seen here.

Wednesday, April 11, 2007

Exchange 2007 SP1 Beta available on MSDN and TechNet Plus

FYI - Exchange 2007 SP1 is now available at MSDN and TechNet Plus and it's a whopping 717 Mb download.

For more information on what's in SP1 look at my earlier post here.

Source (And a few others)

Friday, April 06, 2007

Mail and Public folder replication not flowing between Exchange 2003 and newly installed 2007 ?

Then it might be because the Routing Group Connector (RGC) that should be automatically created during installation of the first Exchange 2007 Hub Server role somehow wasn't created (Took me more time to figure out than I'm ready to admit ;-)

If you open ESM on Exchange 2003 it should look like this ("Borrowed" from TechNet illustration) -



If the connectors aren't there, then you can create them from Exchange Management Shell as described in the article How to Create Routing Group Connectors from Exchange 2007 to Exchange Server 2003".

Tuesday, April 03, 2007

PowerShell, Convert-TsvToCsv

The other day, I exported some data from SQL 2000 analyzer to a CSV-file. The database was across the internet but I had no direct database connection and I had to get it down to my PC for analysis. The easiest way was to export it directly to my PC's file system using \\tsclient\c.

On my PC, I had created a PowerShell script, to analyse the data. After getting strange results, I realized that SQL exported values with commas without quoting them. This made the cmdlet Import-Csv ‘shift’ some of the records, as it parsed the records.

To overcome this, I exported the data as TSV i.e. with the tab character as delimited. But Import-Csv does not read TSV or any other delimited than comma (see also my earlier entry about Export-CsvCultureAware). Consequently, I had to convert it to a correctly-formatted CSV-file. I did it with this script –


PS> type Convert-TsvToCsv.ps1

# Convert a tab separated file to comma-seperated, enclosing each element in double quotes
# quotes within the values are doubled
$v=new-object system.text.stringBuilder 1000
$input | % {
$v.length=0 # empty sb
$e=$_.split("`t")
$e | % {
$null=$v.append(",")
if ($_[0] -eq "`"" -and $_.endswith("`"")) {
# already quoted - strip them
$_=$_.substring(1,$_.length-2)
}
$null=$v.append('"'+$_.replace('"','""')+'"')
}
$v.tostring().substring(1)
}

Comments to the code –

  • This is a quick and dirty solution
  • Pipe your tsv-file into the script file and output will be csv
  • A single StringBuilder is used to optimize memory usage, I had to convert a file with 15.000 lines, 13 MB file, so speed mattered
  • To make the logic easier, the string always starts with a comma and then does not output it at the end – hence the substring(1)


Share it!



PS. Code formatted with CodeHTMLer

PowerShell, Export-CsvCultureAware

I stole this joke in an entry http://blogs.msdn.com/powershell/archive/2007/01/06/cliff-notes-of-convertto-html-other-language-blogs.aspx by Jeffry Snover -

  • How do you describe someone that can speak multiple languages?
    Multi-lingual.
  • How do you describe someone that can speak two languages?
    Bi-lingual.
  • How do you describe someone that can speak one language?
    American

And this also goes for PowerShell as well!

To be fair, I have only found few problems: Export-Csv and Import-Csv are not culture-aware!

In Denmark, amongst many other cultures, comma is used between integers and decimals and dot is used to make integers more readable. Semi-colons are used in argument list like between Excel function arguments and when saving a CSV-file from Excel. The normal American 1,234.56 is 1.234,56 here and 1,2,3 becomes 1;2;3. What does this mean? This means that Excel is using these culture rules when parsing input and consequently, arguments in Excel functions and fields in CSV-files are expected to be separated with semi-colon.


So when I do –


PS> Something | export-csv x.csv; ii x.csv


Excel is not able to parse my CSV-file directly. I either have to
1) change the regional settings before starting Excel or
2) use the text-to-data wizard in Excel.


The worst part is that PowerShell knows the concept of cultures – as it is based on .Net – and has the info –



PS> (Get-Culture).textinfo | select listSeparator

ListSeparator
-------------
;

So it should have been culture-aware or at least provided a -seperator argument.

I also tried setting $OFS - the output field seperator, but that did not change the result.



This work-around works (wrapped for formatting reasons) -



PS> something | % {$h=@()} { if(!$h) {$_.psobject.properties | % {}
{$h+=$_.name} {[string]::join(";",$h)}}; $r=$_;$_.psobject.properties |
% {$f=@()} {$name=$_.name;$f+=$r.$name} {[string]::join(";",$f)} }

Dirty ;)
But as always, the quick-timers can be converted to a nice function. The function also includes quoting of all values, but does not handle values with quotes -



function Export-CsvCultureAware($file=$(throw "File must be specified")) {
# First, construct the header by picking up all the property names
$sep=((get-culture).textinfo | select listseparator).listSeparator
$sep='"'+$sep+'"'
$header=@()
$input | % {
if (!$header) {
$_.psobject.properties | `
% {} `
{$header+=$_.name} `
{'"'+[string]::join($sep,$header)+'"'} `
}
# Next, process all the data records/objects
$record=$_
$record.psobject.properties | `
% {$fields=@()} `
{$name=$_.name;$fields+=$record.$name} `
{'"'+[string]::join($sep,$fields)+'"'} `

} | out-file $file -encoding ascii
# Only ASCII files seems to be supported in Excel for CSV
}


PS. The blogger editor gives me a hard time formatting these code
examples, so a vertical bar or such may have slipped. Any suggestions
of how to improve editing are highly welcome. I currently use pre-tags
but if I switch to Compose view, strange things happens.

PowerShell training in Denmark

I normally do not use this channel for commercial things, but this time I find it relevant as it is linked to one of my favorite subjects - PowerShell. I just finished creating a training course for PowerShell called PowerShell 1, 2, 3. The idea is to split the training up into 2 to 3 small courses targeting the level of knowledge your are aiming at achieving. Between the courses, you are expected to use and explore PowerShell, so you get the learning-by-doing combined with course training. Read more here and read our brochure here. Sorry, but it is in Danish. The training itself can be held in English (all the material is in English) and outside Denmark, if wanted. In case you are interested in this, email info(at)inceptio(dot)dk.

Sunday, April 01, 2007

Congratulations! You have received the Microsoft MVP Award

Dear Dennis Thomsen,

Congratulations! We are pleased to present you with the 2007 Microsoft® MVP Award!


The Microsoft MVP Award is our way of saying thank you and to honor and support the significant contributions you make to communities worldwide. As a recipient of Microsoft’s Most Valuable Professional award, you join an elite group of technical community leaders from around the world who foster the free and objective exchange of knowledge by actively sharing your real world expertise with users and Microsoft. Microsoft salutes all MVPs for promoting the spirit of community and enhancing people’s lives and the industry’s success everyday.

To learn more about the MVP Program, visit: www.microsoft.com/mvp

What can I say other than thank you! Especially to the brilliant Microsoft people in Charlotte, Turkey, Redmond and Denmark who helped me getting this award and in developing my competencies around Live Communications Server and Unified Communications (You all know who you are ;-)

I look forward to joining the MVP community and especially to contribute more to the community on the subjects of Office Communications Server and Unified Messaging.

My MVP profile can be found here.