Wednesday, October 31, 2007

Passed the 70-638 OCS Beta Exam ;-)

Not that I was worried in anyway :-S but other bloggers and some of my students from my Unified Communications Bootcamps already reported that they had passed the exam (Called 71-638 while in beta) .... and I haven't received an e-mail about passing.

I'm in Seattle this week and was chatting with a colleague who haven't received an e-mail either, so I re-checked today and yes I did indeed pass it ;-)



Now again, I wasn't really worried - but I guess I will treat myself with an extra beer tonight at Jillians ;-)

Sunday, October 21, 2007

Call-Method v2

This is a follow-up article to Call-Method.

When PowerShell pipes a collection or array, it unwraps the object and passes the individual items in the collection/array. This is normally a very useful behavior, but if you pipe to function like Get-Member and Call-Method, you do not always get
what you want. Let me show how it works -


# Construct an array
$array=1,2,3

# Pass the array down the pipeline
# Gettype will be called 3 times for each integer
# in the array
$array | cm gettype

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Int32 System.ValueType
True True Int32 System.ValueType
True True Int32 System.ValueType

# Wrap array with the array operator. This changes
# nothing as the array operator only creates an array
# if there is none
@($array) | cm gettype

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Int32 System.ValueType
True True Int32 System.ValueType
True True Int32 System.ValueType

# Pass an array with the first argument being our
# array - this works
,$array | cm gettype

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array

# Use the updated Call-Method and use the InputObject
# argument - like the one found on Get-Member
cm gettype -InputObject $array

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array


## This is the updated Call-Method function

function Call-Method($method,$InputObject) {
begin {
if ($inputObject) {
$m=$inputObject.$method
$m.invoke($args)
}
}
process {
if ($_) {
$m=$_.$method
$m.invoke($args)
}
}
}
new-alias -force cm Call-Method

Call-Method

When you are using PowerShell, you often have to call a method. Calling a method is not difficult -
$s="abc"
$s.toUpper()
ABC
but you kind of have to change gear - you have to switch from the PowerShell way of doing things to the .Net / programmatic way. This is no problem if you know it - but it is hard to teach someone, especially if they do not have a programming background.

So, why not create a function and do it the PowerShell way? The function is actually very simple -

function Call-Method($method) { process { $m=$_.$method; $m.invoke($args) } }


And add an alias to minimize the typing -
new-alias -force cm Call-Method


Now it is simple to call methods without dots and parenthesises -
"abc" | cm toupper
ABC
"abc" | cm indexof b
1
"abc" | cm substring 1
bc
$s="abc"
$s[($s | cm indexof b)]
b

Have fun!

Friday, October 12, 2007

Microsoft Unified Communications Partner of the year

Last night Inceptio received the Microsoft Unified Communications Partner of the year award ;-)

According to Microsoft this was due to our contributions to Unified Communications area in the past year delivering lots of Proof of Concepts, UC Bootcamps and UC projects, furthermore we contributed to the fact that UC and Microsoft now has become interconnected terms.

Thank you to all of my colleagues and all of you out there who helped Inceptio succeed in the UC space !!

Microsoft Office Communicator 2007 Hotfix released

Microsoft released a hotfix for Office Communicator 2007 that fixes some different minor issues with OC and presence -
  • 942566 Error message in Communicator 2007: "An error occurred while trying to start the conference" or "This message was not delivered to all participants"
  • 942568 The text alignment in an e-mail message may be incorrect in Communicator 2007
  • 942569 The Russian language name is spelled incorrectly in the list of available languages in Communicator 2007
  • 942570 The telephone number in a Communicator 2007 pop-up window for an incoming call has an incorrect text direction when the language is set to Arabic or to Hebrew
  • 942671 A new policy is available to specify the Contacts store that Communicator 2007 uses
  • 942674 Unrecognizable characters appear in the date field of the display on a Unified Communications device that is used with Communicator 2007
  • 942677 The transport option is not automatically set to TLS when you click "Manual configuration" in "Advanced Connection Settings" in Communicator 2007
  • 942857 Menu items are truncated in the Hebrew version of Communicator 2007
  • 943061 Communicator 2007 crashes when the SipCompression registry entry is set to PING mode and the Transport registry entry is set to TLS
  • 943062 You may be prompted to restart the computer when you try to start Communicator 2007
  • 943063 Communicator 2007 crashes when you start it by using the presence control
  • 943064 After the computer resumes from hibernation or from standby, Communicator 2007 may consume 100% of CPU usage
  • 943065 Communicator 2007 presence icons do not change in Outlook 2007 after you disconnect a computer from the network
  • 943066 Presence status does not change from "In a Meeting" to "Available" in Communicator 2007
  • 943067 Certain icons may be mirrored incorrectly in the call conversation window in the Arabic version or in the Hebrew version of Communicator 2007
Personally we haven't had any major problems with the RTM release of OC and OCS, the biggest issue in this list for me was actually 943065 (Presence in Outlook after returning from Hibernation).

Btw. sorry for being away - I know I promised to blog more on UC but an abundance of work and sickness hindered me. I will now take a week of vacation and will return with much more information afterwards (Promises, promises, promises ;-)