Friday, June 27, 2008

Hyper-V RTM'ed

yesterday. So now I'll start updating my test system to see if these errors are gone:

  • Keyboard does not always work after a boot. A shutdown/start normally fixes the problem
  • Network is sometimes messed completely up if you switch the network the guest is connected to
  • "Type clipboard text" only works if you guest runs US English keyboard layout. It seems to generate/emulate keyboard stokes so slash are written as dashes (on a Danish keyboard)
  • Virtual Machine Connection crashes

Get the 64-bit update here. Remember to get rid of all save states and snapshots before upgrading! Get the full release notes here.

Tuesday, June 24, 2008

The WOW6432Node effect

Last night I was playing around with "Adding Commands to the Communicator Menus" and before I got it running I ran into an obstacle . Basically I wanted it to add extra menu entries in the Communicator menus.

The way to do this is by adding a following registry entry

HKEY_LOCAL_MACHINE\Software\Microsoft\Communicator\SessionManager\Apps\[GUID of Application]

and some keys

Name (Type:REG_SZ) to specify menu caption
ApplicationType (Type:DWORD), value can be either 0 (if application is executable) or 1 (if application is protocol)
Path (Type:REG_SZ) to specify full path to the executable
SessionType (Type: DWORD), value can be 0 (for local session), 1 (this is default for two party session) or 2 (for multi-party session)
ExtensibleMenu (Type:REG_SZ), value can be MainWindowActions, MainWindowRightClick (this is default value), ConversationWindowActions, ConversationWindowContextual (this is the default value) and ConversationWindowRightClick. Multiple values can be specified separated by semi-colons

So I started up a registry editor and added the above mentioned keys and launched my Office Communicator. But the "Contoso Sales C..." entry was missing. I did spend some time checking up on typos but came no where. So I decided to make use of Process Monitor to look for what kind of registry activities Office Communicator was having. Surprisingly the activities were only in this part of the registry HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Communicator. Just for the fun I moved my registry entry to this location and the entry in the Office Communicator worked like a charm.

The explanation for this I found on Windows IT Pro: "The Wow6432 registry entry indicates that you're running a 64-bit version of Windows. The OS uses this key to present a separate view of HKEY_LOCAL_MACHINE\SOFTWARE for 32-bit applications that run on a 64-bit version of Windows."

If you want to read more about customizing your Office Communicator the following links can useful for you.

Integrating a Third-Party Collaboration Program with Communicator 2007

Adding Commands to the Communicator Menus

How do ISA figure out which authentication to use?

So you have published your Exchange server and your are using forms based authentication (FBA). But when you use Outlook Anywhere or ActiveSync (MSRPC), it bypasses FBA. Why does it do that and how does that work?

Well, thanks to my coworker Claus-Ole Olsen, I got the question answered. ISA uses the User-Agent header/string to decide whether it will actually use FBA or not! You can also select different forms based on the value - for different device capabilities.

The ISA GUI tells you it uses FBA, but you just cannot trust that as the User-Agent header will modify the rule!

Read it all here on TechNet Microsoft Internet Security and Acceleration Server 2006 Managing User-Agent Mappings, including scripts for viewing and setting the values.

If you want to avoid the VBScript, you can use PowerShell. This is Get-IsaUserAgentMapping.ps1 -

 

param([switch]$pretty)
$root=new-object -com fpc.root
$isaArray=$root.GetContainingArray()
$mappings=$isaarray.ruleelements.UserAgentMappings |
select PersistentName,UserAgent,Description,Enabled,@{n="FBAFormsType";e={
# For values, see http://technet.microsoft.com/en-us/library/bb794715.aspx
switch ($_.FBAFormsType) { 0 {"HTML 4.01"} 1 {"cHTML"} 2 {"XHTML-MP"} 3 {"Basic"} }
}},order
if ($pretty.isPresent) {
$mappings | Sort Order | Format-Table -auto UserAgent,Description,Enabled,FBAFormsType,Order
}
else {
$mappings
}

 


Adding and modifying is left as an exercise for yourself ;)

Saturday, June 21, 2008

The first steps of programming Office Communicator

Hi there.

The last three weeks has been very exciting and the future is going to bring even greater things. You will probably ask you self why I would write this and to answer this I will use a few lines to explain.

My name is Peter and for the last few years been working in the telecommunication business. A month ago I was lucky enough to get employed by Inceptio to do consulting and development on the UC platform (E.g. OCS and Exchange).

For some time I have being reading and fooling around with the Office Communicator 2007 API SDK and it has been fun and at times frustrating. The reason for this post is to share ideas and possibilities provided by Microsoft UC platform. So to start from the beginning I thought of bringing a small and simple example and I will then continue to post more advanced samples based upon my own experiences with UC development. Below is my first example that shows how to hookup to some of the events that the Office Communicator 2007 Client exposes. Basically it writes a message in the console every time a new conversation windows starts or closes.

The example down below can be the foundation for an application that helps in retrieving information about the incoming caller. Information like calling history, email conversations, location information, billing information, project information. As one se the possibilities is endless.

In my next blog entry I will start to add functionality to retrieve some of the above mentioned information types.

Until then... 

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace EventFun
{
class EventHookUp
{
CommunicatorAPI.Messenger mCommunicator = null;
static void Main(string[] args)
{
EventHookUp hu = new EventHookUp();
hu.InitializeEventHocks();
Console.ReadKey();
}
public void InitializeEventHocks()
{
mCommunicator = new CommunicatorAPI.Messenger();
mCommunicator.OnIMWindowCreated += new CommunicatorAPI.DMessengerEvents_OnIMWindowCreatedEventHandler(mCommunicator_OnIMWindowCreated);
mCommunicator.OnIMWindowDestroyed += new CommunicatorAPI.DMessengerEvents_OnIMWindowDestroyedEventHandler(mCommunicator_OnIMWindowDestroyed);
}
void mCommunicator_OnIMWindowCreated(object pIMWindow)
{
CommunicatorAPI.IMessengerConversationWndAdvanced stpIMWindow = pIMWindow as CommunicatorAPI.IMessengerConversationWndAdvanced;
long Hwnd = (long)stpIMWindow.HWND;
Console.WriteLine("New IM Window Created : {0}", Hwnd);

//Listing Frindly name of the caller.
CommunicatorAPI.IMessengerContacts contactList = (CommunicatorAPI.IMessengerContacts)stpIMWindow.Contacts;
StringBuilder sb = new StringBuilder();
foreach (CommunicatorAPI.IMessengerContact imc in contactList)
{
sb.Append(imc.FriendlyName);
sb.Append(Environment.NewLine);
}
Console.WriteLine(sb.ToString());
}
void mCommunicator_OnIMWindowDestroyed(object pIMWindow)
{
Console.WriteLine("IM Window Destroyed.");
}
}
}



If you want to read more about the API’s then take a look at these posts/blogs



Chris Mayo -> http://blogs.msdn.com/cmayo/



Michael Dunn -> http://blogs.msdn.com/midunn/



George Durzi -> http://blogs.claritycon.com/blogs/george_durzi/default.aspx

Wednesday, June 11, 2008

Live Meeting update and GPO administrative template

Just a quick update - Microsoft has released a GPO Administrative template for Live Meeting that removes the dreaded "Test connection" dialog that end-users somehow do not fully appreciate ;-)

Find the description in KB article 948741 here and the accompanying updates for Live Meeting and the Outlook add-in that updates the clients to version 8.0.6362.70.

Original source LCSKid

Creating More Efficient Microsoft Active Directory-Enabled Applications

I just found this MSDN article about optimizing your queries. Besides good advice on how to create optimal queries, you can also instruct Active Directory to log expensive queries and even control the threshold value of when a query is expensive!

Furthermore, the ANR search is explained e.g. how you can search for 'Sam' when you do not know whether it is a name, a SAM account name etc. Just like the GUI search in Users and Computers.

 

And while you are at it, I can also recommend reading How Active Directory Searches Work.

Windows Home Server Evaluation Kit

Before getting a real kit, I would like to test it first. But so far I have not been able to find it for download anywhere. The officiel free trial page only allows you to order the kit on a DVD - not download.

Today, I found the evaluation download on connect and even better an evaluation version of Windows Home Server Power Pack 1. Power Pack seems to be Home Server'ish for  Service Pack and some new features. You can get a prerelease version of the release notes from connect.

As soon as the download finishes, I will load it up in Hyper-V :)

Thursday, June 05, 2008

winmgmt as a command line tool

The other day, I could not install AVG8 on someone's PC. Everything worked fine, but it could not register with Security Center. It turned out to be a WMI problem. I solved the problem with winmgmt and the /verifyrepository and /salvagerepository switches.

Read all the documentation about the command line switches  here at MSDN.

Thursday, May 22, 2008

Invoke-Vbscript - now supporting Vista x64

As mentioned in Is this PowerShell Session a 32-bit or a 64-bit?, Invoke-Vbscript was the reason I ventured out into that.

 

Here is the updated Invoke-Vbscript. It checks the architecture using Get-Architecture from Is this PowerShell Session a 32-bit or a 64-bit?. If it is 64-bit, it invokes the 32-bit powershell to run the script using a method described in Invoking PowerShell with complex expressions using Scriptblocks.

The script -

param($vbCode,[switch]$ExecuteStatement)

if ($args) {throw "Unknown arguments: $args"}

function PrepareVB {
$vb=new-object -com MSScriptControl.ScriptControl
$vb.language="VBScript"
$vb
}

if ((Get-Architecture -CurrentProcess) -eq 64) {
# Get path for this script
$me=$myinvocation.mycommand.path
# Build command as string to substitute values
$sb = " &'$me' -vbcode $vbcode -ExecuteStatement:`$$ExecuteStatement"
# Encode for safe command line passing
$encoded=[System.Convert]::ToBase64String([System.Text.Encoding]::UNICODE.GetBytes($sb))
# Invoke powershell 32-bit
&"$env:windir\syswow64\windowspowershell\v$($host.version.major).$($host.version.minor)\powershell.exe" -noprofile -EncodedCommand $encoded
return
}

$vb=PrepareVB
if ($ExecuteStatement.isPresent) {
$vb.ExecuteStatement($vbcode)
}
else {
$vb.Eval($vbcode)
}

Is this PowerShell Session a 32-bit or a 64-bit?

How can one identify whether the current PowerShell process is running the 32-bit version (x86) or the 64-bit version of PowerShell? Well first, why would you care? You are right, normally I do not care, but if I need to execute VBscript with Invoke-Script, I need to know as that only works on 32-bit Windows.

I'm now running Vista x64 - and that is actually a pleasure. For the first time, I feel my PC is responsive enough when running many applications. If you are interested, my PC is a Dell D830 with 4 GB RAM and a Intel Turbo Channel module having 1 GB. OK specs and nice performance.

One of the minor problems I have encountered is that MSScriptControl.ScriptControl used by Invoke-Script cannot be started from 64-bit PowerShell. I simply does not exist :(

So I set off hunting a way of finding out how to differentiate, so I could do something clever.

First, I looked at the $host variable, but that seemed to return the same info. Next, I looked at the current process. The only difference I found was the image path, there does not seem to be any flag indicating the execution mode. Strange, I would have expected that.

Before jumping on a image path test, I looked as wmi32_process as well. This did not really help me, but at least win32_operatingSystem.OSArchitecture help me figuring out the platform.

This all added up in Get-Architecture.ps1 which contains -



param([switch]$CurrentProcess)

if ($CurrentProcess.ispresent) {
$me=[diagnostics.process]::GetCurrentProcess()
if ($me.path -match '\\syswow64\\') {
32
}
else {
64
}
}
else {
$os=Get-WMIObject win32_operatingsystem
if ($os.OSArchitecture -eq "64-bit") {
64
}
else {
32
}
}


Example -



PS> powershell -noprofile {get-architecture -currentprocess}
64
PS> C:\WINDOWS\syswow64\windowspowershell\v1.0\powershell.exe -noprofile {get-architecture -currentprocess}
32
PS> powershell -noprofile {get-architecture}
64
PS> C:\WINDOWS\syswow64\windowspowershell\v1.0\powershell.exe -noprofile {get-architecture}
64
PS> powershell -noprofile {get-architecture -currentprocess}
64
PS> C:\WINDOWS\syswow64\windowspowershell\v1.0\powershell.exe -noprofile {get-architecture -currentprocess}
32


Suggestions for improvements are highly welcome!

Thursday, May 15, 2008

Interesting set of AudioCodes guides

AudioCodes has released a set of guides describing Advanced Topologies for OCS 2007 and Exchange 2007. There are several interesting scenarios including -

  • Cisco Call Manager connectivity to Office Communications Server 2007 and Exchange Server 2007
  • Single gateway for Office Communications Server 2007 and Exchange Server 2007
  • Asterisk IP-PBX connectivity to Office Communications Server 2007 and Exchange Server 2007
  • Enabling fax, modem and auxiliary devices for Office Communications Server 2007
  • PBX reduced trunk solution for Office Communications Server 2007
  • SIP trunking solution for Office Communications Server 2007

The last one about SIP Trunking looks interesting to some of my customers, it describes the following scenario -

“OCA” is a small, but growing retailer of outdoor clothing and apparel company located in New-Jersey, USA. OCA has a deployed Office Communications Server 2007 in its private network for enhanced communication within the company.
OCA decided to offer its employees Enterprise voice and to connect the company to the PSTN using a SIP trunk. OCA's major market is located in Japan and therefore, decided to select two ITSPs – TelIP located in USA and IPConnect located in Japan – for providing a SIP trunking solution. In addition, since OCA's Internet infrastructure frequently experienced interruption and loss of connection, the company decided to implement a telephony backup solution whereby in case of a connection failure with the SIP trunks, the calls are rerouted to the USA PSTN through a traditional T1 connection.

Wednesday, May 07, 2008

Using Consolas Font in your Command Window

Being a fan of using Lucida Console instead of the normal raster fonts, this is good news. You can enabled the Vista/Office 2007 Consolas font and use that. Read it all here in the IE blog.

Tuesday, May 06, 2008

New update for OC 2007 and security enhancement

My colleague Claus-Ole just pointed me to a new update on Office Communicator 2007.

This update fixes four problems and especially interesting is a fix for Terminal Server users and a enhancement to security in the High Security Policy mode, where the ABS, Custom Presence and Tabs URL's now require HTTPS. Following are the fixes -

951870 - Event IDs 8239 and 8206 are logged when you schedule and then cancel a meeting in Communicator 2007

949498 - Error message when a Communicator 2007 user sends a message that contains only Japanese characters to Communicator 2005 users: "<Username> cannot receive message in the format you used"

951871 - The presence status changes to Away for all Terminal Server users when an administrator locks the desktop or lets the screen saver run in Communicator 2007

951868 - Registry settings for certain protocols are overwritten, and Communicator 2007 becomes the default application for these protocols when you log on to Communicator 2007

Find the KB here and the download here.

Tuesday, April 29, 2008

Mac Messenger 7 available

As announced earlier Microsoft has updated the Mac Messenger client to also support Office Communications Server 2007. Following are a few snippets (Source) showing some of the OCS related functionality of the client (It still supports Windows Live)

P2P or multi-party audio/video conferencing -

Messenger Contacts

Searching the Address Book -

Messenger Contacts

Use of Mac OS X Bonjour  to detect location and ability to add personal messages

Messenger Chat

Download from here.

Thursday, April 24, 2008

Hyper-V RC0 WS08 Guest OS and multiprocessor support

When you install WS08 as a Guest OS then the WS08 media includes the earlier version of Hyper-V Integration Services, so network and other hardware devices will not work. If you launch the Integration Services CD it will tell you to go to Windows Update to upgrade the Integration Components (Catch 22 I guess).

The workaround is to 'Insert Integration Services Setup Disk' start Device Manager (devmgmt.msc) find the failing device, select 'Update Driver Software' and 'Browse my computer for driver software' - the path is then e.g. D:\support\amd64.

Second, I noticed the following limitations in multiprocessor support in Hyper-V (In the Release Notes)

For the guest operating system, install one of the following:

  • Windows Server 2008 with Hyper-V, with a maximum of 4 virtual processors. No other release of Windows Server 2008 is supported with this release of Hyper-V.
  • The Windows Server 2003 operating system, with a maximum of 1 virtual processor for 64-bit and 2 virtual processors for 32-bit.

If this is also true for the RTM version (Haven't checked yet) then this product is less useful than expected for 32 bit deployment of WS03 and practically useless for 64 bit deployments of WS03 (Even though Exchange 2007 SP1 supports Windows Server 2008, many companies won't have approval/testing for this product and/or their system management, backup etc. products ready for WS08).

Wednesday, April 16, 2008

High-Definition Video and Roundtable Hardware Requirements

Historically Microsoft published a really good whitepaper on RTAudio and QoE, but information on how the RTVideo Codec works has been sparse. But at a presentation today at Interact 2008 more details were revealed (and we where promised that more details will appear, as video gets more and more attention).

Besides all the interesting stuff about High Definition video in next versions, I just briefly wanted to touch on a few things that applies to the current versions -

P2P Video Calls with VGA quality requires Dual Core (And Quad for HD in wave 13)

So you probably know that you can change from CIF to VGA quality on P2P video calls (Not conferencing) by changing a registry key. They are documented in the release notes for OC 2007 and referenced here -

To enable VGA video in a point-to-point video call, users need to set the following registry keys on both endpoints -

[HKEY_CURRENT_USER\Software\Microsoft\RTC\Quality]
"MaxAllowedSendVideoSize"=dword:00000002
"MaxAllowedReceiveVideoSize"=dword:00000002

And restart Communicator.

But what is new to me is that the hardware requirements are actually Dual Core processors for optimal quality. It is not enforced, so VGA quality will be started with one processor, but may fall back to lower quality due to lack of CPU resoucres. In wave 13 Microsoft is talking about enforcing this requirement, so VGA will not start if you are not running from a Dual Core. In terms of HD (720P) conferencing the current requirement is going to be Quad Core processors and again the requirement will be enforced.

Roundtable quality requires Dual Core

Dual Core Processors are required for Roundtable Panorama Video but again it is not enforced, so Roundtable and Panorama Vidoe quality will be started with one processor, but may fall back to lower quality due to lack of CPU resoucres).

Thursday, April 10, 2008

Microsoft Mac Messenger update / Bloggers lunch at Interact08

Today at Interact 2008 I was invited to a Bloggers Lunch hosted by Eileen Brown. It was really good use of time and we had some interesting discussions with key Microsoft Executives including Kim Akers, UC Marketing General Manager; Eric Swift, UC Marketing Senior Director; David Lemson, Exchange Group General Manager and Amritansh Raghav, Office Communications Group, General Manager.

As part of the lunch we got what all bloggers want - news not previously announced (and that we are allowed to blog about) - so here it is ;-)

Microsoft is going to release a updated version of Mac Messenger that integrates with Office Communications Server 2007 and will include the following features -

  • Rich presence
  • Instant Messaging
  • Audio/video
  • Directory search
  • Dual sign-in with Live Messenger / OCS

So good news for all you Mac users out there. I was actually invited to participate in the beta's for this client - but my company is Mac-free area (all though I'm pretty impressed by the Vista capable MacBook Pro line of notebooks )

Friday, April 04, 2008

CU at Interact08 or MVP Summit ?

I'm leaving for Interact08 in San Diego on Monday and will be there until Sunday where I travel to MVP Summit.

At Interact08 I will (besides meetings and networking) focus my time on learning about Microsoft Online Services, Exchange Server 2007 and maybe a few OCS 2007 sessions.

At MVP Summit I guess most of my time will be spent on learning about OCS Wave 13/14 and I really look forward to this as this is my first MVP Summit.

Maybe we will meet at one of the events !? Feel free to leave a comment or contact me at e-mail/sip my.initials@inceptio.dk .

MVP Award for 2008

Some good news (for me anyway). On April first I received my MVP Award for 2008 and this (almost ;-) personal note from Mr. Ballmer himself -

clip_image001

As the independent voice of users worldwide, your influence on technical communities is felt in many ways—enhancing people’s lives and contributing to our industry’s success. We’re deeply grateful to you for sharing your feedback, comments, answers, and expertise with technical communities. In recognition of your commitment, Microsoft is pleased to honor you with the Most Valuable Professional Award. Thank you for empowering the community with your outstanding leadership!

Steven A. Ballmer
Chief Executive Officer
Microsoft Corporation

clip_image002

Thank you for your exceptional contributions to technical communities! It gives us great pleasure to present you with the Microsoft Most Valuable Professional Award for the technical expertise you generously provide to others. By sharing your knowledge, experience, and objective feedback, you inspire and help people to solve problems and discover new capabilities every day. We are honored to welcome you as a Microsoft MVP.

Rich Kaplan
Vice President, Supportability & CPE
Microsoft Corporation

Office Communicator 2007 update released

Microsoft released a new update for OC 2007 and the update fixes the following issues -

949894 - Presence functions are disabled in Communicator 2007 when you use a time zone that includes a negative partial hour on a client computer

948733 - Error message when you try to shut down a client computer that is running Office Communicator 2007: "The data file 'Mailbox - user' was not closed properly"

950492 - You cannot manually change your status from "Away" in Communicator 2007 when you use a portable computer to connect to a remote computer

948159 - Error message in Communicator 2007 if the Outlook profile file name contains non-English characters: "There was a problem connecting to Microsoft Office Outlook"

948737 - A Communicator 2007 user hears a long dial tone mixed with the streaming audio if the user takes a USB telephony device handset off the hook and then uses the device to stream audio from another application

948120 - An audio conference or a video conference fails in Communicator 2007 when you try to invite a new participant to create a multiparty conference

Find the KB/download here.