Tuesday, February 12, 2008

Around the World With OCS Voice Ignite - continued

As I noted in a recent post (Around the World With OCS Voice Ignite) I'm taking part in the OCS Voice Ignite tour. Last week was Sydney where were were ensconced in Darling Harbour. The venue was great, and the content was even better. This week we're in the wonderful city of Kuala Lumpur.

My trip to Sydney (LHR-LAX,  LAX-SYD) was greatly improved by upgrades - entering a 747 and turning left is the only way to fly! Thanks to an unknown friend of a friend for those upgrades! The only downside was the unscheduled stop at Honolulu for fuel and the lack of laptop power across the Pacific. Nevertheless, the service was excellent, and the 4000 bonus miles United offered us as compensation helped.

Sydney is a great city - although it rained most of the week (I've seen drier days in the monsoon!). But the audience was great and we all had a lot of fun. I was sorry to leave, but Kuala Lumpur beckoned.  The flights to KL (SYD-BKK-KUL) were OK too. We were a bit late into Bangkok, but that just meant less time waiting. The flight down to KL on Lufthansa was stunning - a band new 747 (it had less than 400 flight hours said the stewardess). Think of the smell of a new car, very comfortable seats and a great crew.

Then the curse of all world travellers - I got to KL, but my luggage did not. When you travel as much as I do, lost luggage is something that is just going to happen sooner or later. And when it does, KL is the place to have it happen. The hotel and Lufthansa were great. The airline was very apologetic and gave me US$200 in local currency to buy some new stuff while they found my bag. And the hotel (The Westin) made it very easy - they called the airport every 4 hours and kept me fully informed. Fortunately the bag turned up last night and I've got a few Ringits spare to help the enjoyment of KL.

I feel very, very lucky on several levels. First I'm getting to work with a very rich content and very knowledgeable speakers. Second, we get real world labs with great hardware (I'm pretty biased though as Global Knowledge built the labs). Finally, we get to meet passionate and committed OCS fans and get them the real answers to the very real issues they and their clients face. Oh - and this week at least, we get the best breakfast buffet I've EVER seen in my entire life.

It's a shame that the content is under NDA - which means I can't share much of it (and the Voice Ignite sessions are now fully booked so I can't suggest you book onto a session). I think and hope that there will be more deliveries on a regional basis - but I've had nothing confirmed. Watch this space - or take a look at Devin's blog as noted in http://cacorner.blogspot.com/2008/02/voice-ignite-sydney.html which provide some insights to this great content.

Thanks to the OCS team for allowing me to have this wonderful experience.

Sunday, February 10, 2008

ZoomIt Magnifying Applet

Most folks who do presentations know how much of a pain it is to show Windows or applications and have the screen visible to all. Even in a small room, it can be very tough. I'm presenting this week in Kuala Lumpur and want to show OCS's Snooper tool, which is pretty tiny at the back of the huge ballroom. Then I found ZoomIt, a Sysinternals tool that is excellent. A very small application, ZoomIt allows you to blow up the window on screen and enables you to draw. There's also a cool break timer feature that I'm finding VERY useful already.

You can download ZoomIt from Microsoft's web site.  Oh - and it's free - very nice!!

Technorati tags: , ,

Wednesday, February 06, 2008

Voice Ignite - Sydney

I'm in Sydney this week, helping out with Voice Ignite. Due to the NDA nature of this training,I'm not able  to blog much of the detail. However, one of the delegates is doing some live blogging about the even. Take a look at (e)Mail Insecurity.

Technorati tags: ,

Monday, February 04, 2008

PowerShell's [WMI] Type Accelerator

In a recent blog post, I introduced PowerShell's WMI related type accelerators. In this post, I'll look at the [WMI] accelerator in more detail. As I explained earlier, the [WMI] type accelerator helps you to get directly to a particular WMI object. You provide a string containing the path to a particular WMI object and the [WMI]  adapter returns the WMI object (or not if it does not exist). This approach is a little easier than using Get-WMIObject in those cases when you actually know the details of which occurrence you want.

To illustrate this TA, let's look at a WMI Class, Win32_Share. We can find all the shares on a system like this:

PSH [D:\foo]: gwmi win32_share | ft -auto

Name   Path       Description
----   ----       -----------
E$     E:\        Default share
IPC$              Remote IPC
D$     D:\        Default share
ADMIN$ C:\WINDOWS Remote Admin
foo    d:\foo
C$     C:\        Default share

This is fine if you want to just see the shares.  But if you want to access a particular share's methods or properties you need to do a bit more  work. One simple way you can  get access to the Admin$ share is like this:

PSH [D:\foo]: $admin = gwmi win32_share | where {$_.name -eq "Admin$"}

This approach works, but it's a bit ugly and can take some time if there are a lot of shares on a system. And here's where the [WMI] TA works well as follows:

$admin2 = [wmi]"\\dc1\root\cimv2:win32_share.name='admin$'"

This is much easier to write, assuming you know how to construct the path string. A simple way to determine how to construct the path for this TA is to look at the __Path property on the actual object:

PSH [D:\foo]: $admin = gwmi win32_share | where {$_.name -eq "Admin$"}
PSH [D:\foo]: $admin.__Path
\\dc1\root\cimv2:Win32_Share.Name="ADMIN$"

To convert this path for use with [WMI], you need first to replace the double quotes to single quotes, then enclose the resulting string in double quotes prepended with [WMI].  One nice feature of this approach is that the returned object is an object, not a collection/array, which makes it easier to use.

When I was creating this blog post, I wondered if it was possible to create a WMI path using other properties. However this does not appear to work:

PSH [D:\foo]: $admin3 = [wmi]"\root\cimv2:win32_share.description='Remote Admin'"
Cannot convert value "\root\cimv2:win32_share.description='Remote Admin'" to type "System.Management.ManagementObject".
Error: "Invalid object path "
At line:1 char:11
+ $admin3 = [wmi] <<<< "\root\cimv2:win32_share.description='Remote Admin'"
PSH [D:\foo]: $admin3 = [wmi]"\root\cimv2:win32_share.path='c:\windows'"
Cannot convert value "\root\cimv2:win32_share.path='c:\windows'" to type "System.Management.ManagementObject". Error: "
Invalid object path "
At line:1 char:11
+ $admin3 = [wmi] <<<< "\root\cimv2:win32_share.path='c:\windows'"

There are two different formats you can se for the WMI path - with and without a machine name as follows:

$admin4 = [wmi]"\\dc1\root\cimv2:win32_share.name='admin$'"
$admin5 = [wmi]"root\cimv2:win32_share.name='admin$'"

The first format includes a machine name (\\dc1) while the second doesn't. The second format only works on the local machine whereas the first  can work across a network. There's only one small issue (feature?) of the first format which is that you can not provide credentials. Thus if you are logged onto your local machine with your normal userid/password, that set of credentials is used to access WMI. If those credentials do not allow you to access the remote server, then there's no way to provide credentials that would work.

I hope this is a clear explanation - let me know if  you'd like more details.

Wednesday, January 30, 2008

WMI, PowerShell and PowerShell's WMI Type Accelerators

I've been playing with PowerShell's WMI interface as part of some writing work I'm doing. As I see it, PowerShell lacks built-in cmdlets to do everything. However that really is not a problem since a lot of thing can be pretty easily achieved using a few lines of PowerShell! 

PowerShell introduces the concept of type accelerators. These look like normal .NET types (type name specified inside square brackets), but they are managed by PowerShell itself. Type accelerators are just shortcuts to existing underlying functionality.

There are three WMI related type accelerators in PowerShell V1. If you are using  WMI with PowerShell, you really should know these three:

  • [WMI] - this TA helps you to get directly to a particular WMI object. You provide a string containing a detailed path to a particular WMI object and the TA returns the object. This is a little easier than using Get-WMIObject in those cases when you actually know the details of which occurrence you want.
  • [WMICLASS] - this TA gets you to a class definition. This then enables you to access WMI Class static methods. The Get-WMIObject enables you to get to instances, but to create new instances you need access to the static methods of the class.
  • [WMISEARCHER] - this TA helps you in terms of querying. When creating a WMISEARCHER, you specify a WQL query (e.g. Select * FROM Win32_Process WHERE Handlecount > 1000). You can use the searcher to execute that query and return results. This is a little easer for some times of administration.

WMI Type Accelerators are not well defined or well documented either on MSDN or inside the product itself. I hope my attempts at providing this information are useful - let me know what I'm missing and I'll try to add it. Over the coming week or so, I'll be blogging about each type accelerator in more detail. The posts also contain some simple sample code that demonstrates these cool features.

Did I mention - PowerShell rocks!!!

Technorati tags: , ,

Monday, January 28, 2008

MSDN Library Community Content and PowerShell

Microsoft turned on the community content feature of the MSDN site in late 2006, just over a year ago. That meant users could add content to MSDN in the way of additional samples,commentary, best practices, and even just simple typos! If you navigate to the root of the MSDN library page(http://msdn2.microsoft.com/en-us/library/default.aspx) you can see the statistics relating to the community content.

Thus far, I've added over 120 samples - mainly using PowerShell with a variety of components, including COM, WMI and .NET. I enjoy being one of the top contributors! I wonder if anyone over at Microsoft has noticed!

Over the past couple of days, I've been using PowerShell with several WMI and .NET objects and tonight I'm playing with the GPMC Com object.It's great that you can do so much with PowerShell, but the sheer inconsency of things lower down in the technology stack are infuriating. Sometimes things are case sensitive, other times not, some times you use quotes to hold names, other times not, etc - you probably know what I mean. This is not PowerShell's fault, but the result of a huge amount of parallel uncoordinated development within MS and therefore part of your learning curve.

The big advantage, however, of PowerShell is that you can do SO much all with one basic tool. And with a bit of work, you can write functions (and soon real cmdlets) in script that hide some of the nasty details.

PowerShell Rocks!!

Saturday, January 26, 2008

Global DNS Query Block List in Windows Server 2008

Looking over at the TechNet DNS sub-site, I've been reading a neat document: DNS Server Global Query Block List. The document describes a new feature in WS08's DNS Server: the Global Query Block List.

Some network protocols rely on DNS name resolution  to resolve specific well known host names. Two examples are WPAD and ISATAP. Malicious users could register hosts computers using these names and thus pose as a legitimate server.

Windows uses the web proxy auto-discovery protocol to discover a local web proxy. The client queries DNS for wpad.<domain> where <domain> is the computer's domain name (eg wpad.contoso.com for a computer in the contoso.com domain).

Intra-site Automatic Tunnel Addressing Protocol (ISATAP) is part of the set of protocols used to aid in IPv6 migration. ISATAP tunnels IPv6 traffic in IPv4 packets. The IPv6 traffic comes from an IPv6 network to the ISATAP server for for transmission across IPv4 only networks. Essentially, ISATAP servers encapsulate inbound IPv6 traffic into IPV4 traffic and passes it to another ISATAP server for conversion back to IPv6 and transmission to another IPv6 aware host. ISATAP does not provide for automatic ISATAP router discovery. ISATAP hosts use a potential routers list (PRL) to discover available ISATAP routers, typically  by using DNS to locate a host named isatap on the local domain (eg isatap.contoso.com).

In the case of both these protocols, if a malicious user was to rename their system it could then appear to be a genuine server, to the potential detriment of the user. The result may just be a denial of service, but could be worse. And even if your network doesn't use these protocols, your clients my be trying to use them anyway. In that case, they are vulnerable to the hijacking that DNS dynamic update enables.

The Server Block list prevents such hijacking by refusing to reply to a query. This renders the dynamic update useless. If you subsequently implement either protocol, then just remove the relevant name from the block list. Before doing this, you should manually enter the relevant RRs into DNS, and adjust the ACLs to remove the miscreant's ability to hijack the name.

And of course, you can use this same technique in your own environment, perhaps by protecting a computer called accounting, or manufacturing or something similar.

To configure the DNS query block list, you use DNSCMD as shown here:

PS C:\foo> dnscmd /config /globalqueryblocklist wpad isatap gratefuldeadmusiclibrary

Registry property globalqueryblocklist successfully reset.
Command completed successfully.

To view the current block list, use the /info switch with DNSCMD as shown here:

PS C:\foo> dnscmd /info /globalqueryblocklist

Query result:
String:  wpad
String:  isatap
String:  gratefuldeadmusiclibrary

Command completed successfully.

A neat feature!

Saturday, January 19, 2008

Microsoft and Time Travel

Happy New Year for those of you who have survived the holiday period, and the shocking reality of being back to work.

I've been looking at some documentation on the new functions and features of  DNS in Windows Server 2008. As to be expected, there's a bunch of really good documentation up on the MS web site.

One ,j- separating the DNS client from the DNS server (complete with hyperlinks to drill down for more information). A nice touch! Following the link to the article DNS Server, there's a good overview of the features of DNS. The DNS team should be congratulated on producing good useful and usable documentation.

But then I noticed the last updates to these pages: November 13, 2008 for the DNS Infrastructure page, and November 9, 2008 for the second! WOW - 11 months from now!! That's pretty cool.

So - is there more to Windows Server 2008 than meets the eye or has Microsoft really invented time travel?? I also wonder what sort of overtime arrangements the writers get for posting content they last update 11 months in the future!

Technorati Tags: ,,,

Friday, December 28, 2007

Writing Cmdlets for Windows PowerShell

I've just seen a cool article on Bennie's Weblog over on the Foo Theory site. Entitled Writing Custom Cmdlets for Windows PowerShell, it is a long and involved piece covering both some intro material on PowerShell plus full details on how to create a new Cmdlet using Visual Studio.

Thursday, December 20, 2007

Jerome's Place Bit Torrent Site

As many of my friends know, I collect Jerry Garcia and Grateful Dead live shows. I've got just over 1060 live Dead shows, and just under 400 Jerry Garcia shows. Several thousand hours of great music (plus it has to be said, many hours of not so good music - not every show was good!).

I have access to a private bit torrent site, Jerome's Place which shares this music to a small fanatical fraternity of dead heads. The site is looking for some new users, and I've just been provided some invites. If you are a trusthworthy Dead or Jerry fan, have reasonable bandwidth and want access to this treasure trove, send me an email. 'll happily pass one your way as long as the invites last!

[Later - August 2009]

Sadly, Jerome's Place has gone to join Jerry in that great music site in the sky and is no more. I've still got the music I've downloaded from that site, so if you want a copy, contact me and we can work something out.

Tuesday, December 18, 2007

Updated Windows PowerShell Online

Admittedly, the URL http://technet.microsoft.com/en-us/library/bb978526.aspx does not readily roll off the tongue. So PowerShell users should book mark this page. Microsoft has just updated the TechNet site with the full PowerShell help files. Better yet, these are the latest updates and include fixes, etc. Thanks to superstar June Blender for getting this done.

If the help isn't clear enough for you, use the feedback mechanism to leave a comment. I'm sure these will be actioned as quickly as possible!

Technorati tags: ,

Getting Hot Fixes for Windows

I wrote last spring about the problems IT Pros can have with getting hot fixes for Microsoft products. I pointed out a Microsoft provided web site that you could use to get a hot fix. Thanks to a comment on my earlier blog article from MSMQ guru John Breakwell, I see that this hot fix web page has been retired.

As John notes in a recent blog article, Microsoft has replaced the web page with something a whole lot better - the hot fixes are now linked directly from the KB article page - something long overdue IMHO!

Thanks John for pointing out this change.

Technorati tags: , ,

Thursday, December 13, 2007

Microsoft Releases Windows Server 2008 RC1 Public Beta

In a pre-christmas peice of generousity, Microsoft has released Windows Server 2008 RC1 to the general public. See the Microsoft web site to download the code and to get a license key. The software is a 30-day evaluation version, but you can get a key for a longer evaluation period.

Wednesday, December 05, 2007

Microsoft to modify Windows Genuine Advantage anti-piracy scheme

Microsoft has agreed to modify it's much reviled anti-piracy scheme. As noted on Mary Jo's blog, Microsoft has is to modify Windows Genuine Advantage scheme to drop the "reduced functionality mode". At last, Redmond is seeing sense over this! Mary Jo goes on to say "Microsoft will introduce the changes to future test builds of Windows SP 1 before the final version is released in the first quarter of 2008. Ditto with Windows Server 2008 — the current Windows Server 2008 test builds do not include the WGA changes, but some future builds will."

Technorati tags: ,

Monday, December 03, 2007

OCS Voice Ignite - going to Orlando

Just got the final confirmation through today - I'm heading off to Orlando on Saturday to attend the OCS Voice Ignite event that I wrote about recently. I hit Orlando late on Saturday night, with a day to hang out with the Global Knowledge crew (and hopefully some rest) before 5 days of deep, deep technical OCS voice stuff. I've started looking at the labs - I can't wait.

I'm booked to help the team re-deliver this in Barcelona (I suspect I'll be a lab rat or similar). And I may also be Australia bound to help re-deliver parts of this seminar in Sydney. So it looks like some fun travel coming up soon!

Technorati tags: ,

What it means to be out of beta (Eurekster Blog)

Not long after posting an article about Swikis, I read this article on the Eurekster blog: What it means to be out of beta (Eurekster Blog) noting that the swiki platform is out of beta. It's an interesting business model - I wish them well.

Technorati tags: ,

Swiki - from Eurekster

A swiki is a "custom social search portal on a topic of your choice", says Eurekster.com. In effect, a swiki is a widget you put into a web page and chose the topics that you are interested in. Eurekster then creates a tag cloud based on the tags you supply. What's nice is that as others use your swiki, they can vote on certain search hits, to help the gadget generates more and more relevant content.

I've been playing around with this and have created a PowerShell-Stuff swiki, and have placed it onto this blog. I've also put an OCS-Stuff swiki over on my corporate blog. are these useful/interesting/helpful??

Technorati tags: , ,

Visual Studio 2008 Training Kit Requires PowerShell

Super star PowerShell MVP Keith Hill has made an interesting find in Visual Studio's 2008 recent release - it needs PowerShell. Keith describes his find over on his excellent PowerShell focused blog: Visual Studio 2008 Training Kit Requires PowerShell.

Thanks for the find Keith (and thanks for your great blog too!).

Sunday, December 02, 2007

SecPol in Vista Home Premium - there isn't any!

As Susan Bradley has discovered is: There's no secpol in Vista Home Premium and she asks the all important question - now what. Naturally, Susan provides a neat answer - just hack the registry.

This tip will come in handy - I'm getting my wife a new computer and it'll come with Vista loaded and I want to not have to have her deal with UAC.

Thanks Susan.

Windows Live Writer: Out of Beta

As noted over on the Windows Live Writer blog: Windows Live Writer is out of Beta! I've been using this tool for a while as my principal blogging tool. It rocks!

Technorati Tags: