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.

Thursday, April 03, 2008

Windows Server 2008 Exam Offer

MS has an offer where you can get a 40% discount on two exams. Register here to get the savings code.

Free Windows Server 2008 and PowerShell Scripting e-Books

Get them from here, the home of Windows Server 2008 learning, switch to the special offers tab, scroll down to Books from Microsoft Press. I cannot construct a direct link, so you have to work your way through yourself.

Tuesday, March 18, 2008

Singularity

If you are into reading hardcore stuff about compiler techniques, jit, computer architecture etc. - just a couple of times are year, this topic from Microsoft Research is for you. Microsoft Research has created a new OS callled Singularity. The purpose of it is to investigate how an OS should be built from scratch if the goal is to provide dependability and trustworthiness. An interesting paper worth a read. The RDK - Resource Devlopment Kit is found here. And you can even get the runable code from Codeplex.

After reading the research paper Singularity: Rethinking the Software Stack (only 13 pages), it came to my mind that the architecture principle of channels - e.g. a process can only communicate with other processes through well-defined channels - could be used as an interprocess communication methods and make it much easier to build high-performance distributed systems. Imagine a situation where processes can simply be put anywhere (within the limits of the required bandwidth and latency). This would enable us to use a pool of resources much more efficient and e.g. simply offload the device you are using onto other devices nearby.

Vmware Virtualization Security Best Practices

Following security Best Practices is the key to maintaining strong security
in a virtualized IT environment. Read below to get guidance on implementing and
maintaining your virtual infrastructure with Best Practices for secure design,
deployment, operations and networking


Read more here on vmware's site.

Friday, March 14, 2008

Interact08 offer and possibility to win free pass to Teched / IT Forum 2009

If wou are working with Microsoft Unified Communications then Interact08 is the place to be.

Gurdeep Singh Pall just blogged about this at the OCS Team Blog

If you see yourself as a leader in the world of unified communications, I invite you to join me and my team at INTERACT 2008 as we look at how communications have evolved and how these industry changes position you for exciting new opportunities.

INTERACT 2008 is our exclusive event focused on building community among technology professionals, specifically, those who are evaluating and deploying Microsoft’s Unified Communications products. It will be held on April 8-10 in San Diego, California and will provide ample opportunities for attendees to network with one another. More than fifty members of our product  engineering teams will be there for interactive technical sessions, birds of feather sessions, and social events at what we’re calling “PubWorld”.  I’ll be there talking about what we’re seeing in the new world of communications technology and I’d like to hear what you are seeing and hear your feedback on our products.

If you see yourself as a leader in bringing Unified Communications technologies to your organization and taking your career to the next level, I’d encourage you to come.

Register today and use this special code [OCS08].

Be among the first 5 people to register, I will buy either your ITForum 2009 or TechEd 2009 registration pass.

See you in sunny San Diego!

Gurdeep

Register today! http://www.interact08.com/ with code OCS08

New version of the OCS 2007 Planning and Supportability Guides

Just noticed that the following documents important documents where updated to version 1.2

Office Communications Server 2007 Planning Guide

Used for planning and sizing your deployments

Office Communications Server 2007 Supportability Guide

This is the ultimate guide used when you want to check if this is a "supported scenario" e.g. collocating the CWA role with a Standard Edition Server.

Wednesday, March 12, 2008

Dr. Dobb's Excellence in Programming Award 2008

This year's recipient of the Dr. Dobb's Excellence in Programming Award is
the inventor of C++, Bjarne Stroustrup

Read it all here.

Friday, March 07, 2008

Planning Tool for OCS 2007

Microsoft has RTW'ed their planning tool for OCS 2007. I have seen and tested some of the beta's and it ended up being a neat little tool.

You will input parameters such as #users, regional distribution, demand for high availability features and end up with a topology drawing looking like this -

image

and this

image

One of the good features are all the links to resources like planning steps, hardware configurations, bandwidth capacity etc.

It's a very good start, but there are still room for improvement like the ability to export the drawings in Visio format and e.g. removing the requirement for high availability at the small sites.

If you want to do more detailed capacity planning and sizing the you should definitely take a look at the OCS 2007 resource kit - it contains very good chapters on this and Excel spreadsheets for doing your own sizing.

Find the tool here.