Friday, December 15, 2006

Tip - Installing Communicator Mobile from Vista / WMDC

When launching Communicator Mobile on Vista RTM with Windows Mobile Device Center Beta 3 you get this message –

Current version of ActiveSync is not supported. Please install Microsoft ActiveSync 4.1 ….


The workaround is to create an administrative install of Office Communicator like this –


msiexec /a CommunicatorMobile_PPC50.msi

And then launch the PCinstaller.exe from e.g. C:\Microsoft\Communicator Mobile\Windows Mobile 5 PocketPC\Setup.

Wednesday, December 13, 2006

Negating PowerShell switch parameters

The example below should tell it all. Just copy it into a file, execute it and see the output.


set-psdebug -trace 1
# f1 is a normal function with a switch parameter

function f1([switch] $showOutput) {
if ($showOutput.isPresent) {
"f1"
}
}

# f2 is a function with a switch parameter defaulted to present
function f2([switch] $showOutput=[switch]::present) {
if ($showOutput.isPresent) {
"f2"
}
}


# f3 is a function with a switch parameter defaulted to true, this gives the same result
# as using [switch]::present
function f3([switch] $showOutput=$true) {
if ($showOutput.isPresent) {
"f3"
}
}

# run f1, no output shown
f1
# run f1, show output
f1 -showOutput

# run f2, show output
f2

# run f2, show output
f2 -showOutput

# run f2, no output
f2 -showOutput:$false

# run f3, same behavior as f2
f3
f3 -showOutput
f3 -showOutput:$false

# Show the acceptable values for a switch parameter
f2 -showOutput:no
# f2 : Cannot convert value "System.String" to type "System.Management.Automation.SwitchParameter",
# parameters of this type only accept booleans or numbers, use $true, $false, 1 or 0 instead.
# At line:1 char:16
# + f2 -showOutput:n <<<< o


So what can this be used for? It is good for defaulting switches like WhatIf to true. This forces the user to enter -WhatIf:$false to get the destructive action executed

Updated: Fixed typo, thanks John!

Monday, December 11, 2006

Map of the Internet

Here.

Friday, December 01, 2006

RTC Client API's and Windows Vista

FYI there's a new post on the Unified Communications Group blog regarding the RTC API's. The main point is that they're not included in Vista; as they we're in Windows XP. Furthermore Netmeeting is deprecated in Vista and the following limitations apply -

The IM, Presence, Voice and Video functionality of the RTC 1.3 APIs work on Vista RTM. While audio and video quality are acceptable the quality level does not match what users using Communicator 1.0 have experienced in the past.
Application sharing and white boarding require Windows NetMeeting, which Vista has replaced with Windows Meeting Space so these features of the RTC 1.3 APIs will not function on Windows Vista.