Tuesday, January 30, 2007

Sunday, January 28, 2007

UK PowerShell User Group's First Meeting

On January 24th, 15 hearty souls met at Global Knowledge's Wokingham offices for the first ever UK PowerShell User Group meeting. From what I can tell, this is the first ever PowerShell user group meeting in the world - something I'm pretty excited about.

Richard Siddaway started the Get-PSUKUG meeting off with a look at the organisation of the user group which was met with unanimous approval. In summary, we're planning on staying light on bureaucracy, and will try to have a physical meeting every two months. Our March meeting will take place at Microsoft in Reading on March 22. No word yet on the May meeting, but we're hoping to have the meeting in Nottingham.

The main part of the meeting was a presentation  by me on setup and installation which was lively and generated lots of discussion. I think we ALL learned a lot, including me. I'll post the slides up to the user group's web site next week.

The meeting also included some great Pizza and beer (HOT pizza and COLD beer) thanks to those very nice people at Power Gadgets.  I also managed to finesse USB  memory sticks for the attendees which contained as much PowerShell stuff as I could find, including a trial version of Power Gadgets!

It is fantastic to have a  group of PowerShell fans all in one place - this user group looks like being very useful to the community.


Saturday, January 27, 2007

Vista and Drivers

As many IT Pros know, with Vista comes new drivers - and for many devices there are no new drivers. Well not yet anyway - updated drivers will come in due course. Well, for the most part - I'm certain some vendors will simply not bother, in effect dropping support for older hardware.

Radarsync has put up a really useful Vista Drivers page, which lists the latest Vista drivers and provides direct links to downloads. They are offering this as a free service to the community.


Thursday, January 25, 2007

Longhorn Beta 3 Approaching

Microsoft has formally named Longhorn  Server as "Windows  Server 2007", and is getting close to shipping the next beta (beta 3). If you are interested in playing with Longhorn, then it's time to pre-register to get your hands on the next generation of the Windows Server operating system. W

You can register for Longhorn beta 3 through the "Beta Central" program. This ensures you are  notified when the beta is available an when he additional resources are available.  These extra resources include Web forums, virtual labs, and other e-learning tools.

In the meantime, why not spend some time to learn what's new in Longhorn, New features include improvements in networking, advanced security features (e.g. NAP), remote application access, centralized server role management, performance and reliability monitoring tools, failover clustering, deployment, and the file system. And for me one of the cooler  features: Server core - a GUI-less version of Windows.


Tuesday, January 23, 2007

Microsoft sells Linux to Wal-Mart

According to Computer Business Review On-line, Wal-Mart, the world's largest retailer, has become the latest big name to buy SUSE Linux vouchers from Microsoft Corp. Yes, you heard it right, MS are apparently selling Linux, following on from Redmond's deal with Novell last November.

CBRO says Wall Mart is to take an undisclosed number of SUSE Linux Enterprise Server subscription certificates - the support vouchers that Microsoft has to distribute to hold its end of its bargain with Novell.


Thanks Scott for  pointing out my typo - which is now fixed.


Technorati tags: , , ,

Windows Cluster Training in London - March 6 - 9, 2006

I'm really pleased, as discussed over in my work blog, that Global Knowledge has partnered with Clusterhelp.com to provide their outstanding Windows Clustering training class in the UK - March 6-9 2007 in London. This class is public and open to anyone who wants to come!

The course will be delivered by Russ Kaufmann, a US-based Microsoft Most Valued Professional (MVP),a good friend, and most importantly, a recognised knowledge leader on the Windows Clustering services. The course will present advanced content that is presently not available through Microsoft Learning. It should be a real gas!!

Monday, January 22, 2007

Speaking at Learning Technologies - 10 Things to Know About Vista

I've been selected to give a talk at the upcoming Learning Technologies show in Olympia. The talk will take place at 13:00 on Jan 31st - for more  details on the talk, see the Learning Technologies site.

The talk will look at some of the cool features in Visa - maybe I should have called it "10 Cool Things About Vista". I'll post slides once these are completed.

Visual Studio "Orcas" - January 2007 CTP Ships

Microsoft has released a new beta of the next revision of Visual Studio. Code-named Orcas, this release is a Community Technology Preview (CTP). A CTP is an updated beta release of a product, which aims to provide uses with more timely access to new and updated features, at the possible expense of the very long testing time required for major beta releases. Microsoft first used this approach with the SQL Server 2005 and Visual Studio 2005 products (quite successfully IMHO!).

The interesting thing about this CTP is that MS are shipping it both as a normal product install (up to 4.3GB in total) and as a VPC Virtual Image. The VPC setup involves downloading 8 RAR files taking up 4.83 GB. Once these files are downloaded, you can extract the VHD image and create your VM - which means you need over 20GB of free space (for the download, for the temp file WinRAR creates, and for the actual VHD). Once the downloads are finished, I'll post another article with the actual size of the VHD.

The highlights of this CTP include:

  • Extended, more powerful data APIs with the ADO.NET Entity Framework and LINQ to ADO.NET
  • ADO.NET is fully integrated with LINQ
  • C# 3.0 Language Support
  • ClickOnce improvements
  • Managed classes for Elliptic Curve Diffie Hellman and Elliptic Curve Digital Signature Algorithm cryptographic functionality
  • Runtime and design-time support for Office 2007 (including Outlook 2007
  • Support for advanced lifetime management of add-ins and their AppDomains
  • Client service support for Login/Logout, Role management and Profiles
  • A trace listener that logs event to ETW, event tracing for Windows in Vista
  • Jscript Intellisense support
  • A new numeric type that provides support for very large numbers (i.e. beyond the range of In64)
  • LINQ over XML (XLinq)
  • SQL Server Compact Edition (SSCE) (SSCE provides a local relational data store for occasionally connected client applications from desktops to devices).

Sunday, January 21, 2007

Windows Vista Ultimate - Limited Numbered Signature Edition

Engadget reports that Microsoft is releasing a limited edition version of Windows Vista Ultimate Edition. The cool thing about this - it's signed by Bill Gates. Allegedly anyway - I agree with Engadget that the "signature" is probably just a signature print).

There are only 20,000 copies being produced - this may end up a collector's item. Unfortunately, Engadget doesn't give a link to buy it!


Vista Content Protection - MS Responds

Late last year, Peter Gutmann, a researcher from New Zealand, published a pretty scathing article, entitled A Cost Analysis of Windows Vista Content Protection. One of his conclusions is that "Overall, Vista's content-protection functionality seems like an astonishingly short-sighted piece of engineering, concentrating entirely on content protection with no consideration given to the enormous repercussions of the measures employed". 

Microsoft has now responded in an article on the Vista Team Blog site, entitled Windows Vista Content Protection - Twenty Questions (and Answers). Written by Dave Marsh of Microsoft, this article aims "to address some of the other points raised in the paper". While Marsh's piece does try to attach Guttman's comment, it confirms other points. For example, MS acknowledges that DRM increases  CPU usage  by stating"the use of additional CPU cycles is inevitable".

Also inevitable is the reaction to Marsh's piece - one comment on the Vista blog suggests "This essay has essentially CONFIRMED every horrible charge leveled at Vista by Gutmann".


Saturday, January 20, 2007

Random Numbers in PowerShell

With PowerShell, you can leverage the .NET Framework's System.Random class to create random numbers. To create a random numbers you must first create a new random number object, then the object's methods to generate a random number as follows:
$rand = New-Object  System.Random

If you want  a random  number  between 0 and  1, you can use the .NextDouble method which woule look like this:
PSH [D:\foo]: $rand = New-Object system.random
PSH [D:\foo]: $rand.nextdouble()
PSH [D:\foo]:
If you want to create random numbers that  are between two other numbers (e.g. a random number  between 1 and 10, or between  4 and 16), you can specify a bottom and top range in a call to .NEXT(), where the first number is part of the range, but the second is above the max value you wish to compute, as shown   here:
PSH [D:\foo]: $rand = New-Object system.randomPSH [D:\foo]: $rand.next(1,11) # gets random number between 1 and 10
PSH [D:\foo]: $rand.next(4,17)
# gets random number between 5 and 16

Thanks to a couple of readers who spotted that the second parameter was exclusive.

Windows Vista Ultimate Extras Revealed

At this year's Consumer Electronics Show (CES) Bill Gates showed off Microsoft's upcoming Ultimate Extras as part of his keynote. Ultimate Extras are some additional programs for users of Vista Ultimate edition. MS has three Ultimate Extras ready for release on Windows Vista's general availability date (end Jan 2007). These extras are:

  • Windows DreamScene:  This Ultimate Extra allows you to to use a video as your desktop background. DreamScene then loops through this video as your desktop background. There's a nice waterfall video  and you can even use your own videos.  the downside is that this uses a huge amount of CPU and can be distracting.
  • BitLocker and EFS Enhancements:   This includes a tool called the Secure Online Key Backup that you can use to store your BitLocker recovery password on a secure MS web site.
  • Texas Hold'em Poker Game:  This is not a bad version of Texas Hold'em. You can not, however, play online with other users.  

Ultimate Extras are slated for release on 30 January with more Extras coming.  MS has created the Windows Ultimate Web site for updates and information on current and upcoming Windows Vista Ultimate Extras.



Thursday, January 18, 2007

Manipulating the Recycle Bin in PowerShell

The Windows Recycle Bin is a special folder in Windows, but with some simple PowerShell commands, you can manipulate it easily. The method of manipulation is to create a Shell Application COM object, and manipulate it a technique familiar to VB-Scripters the world over

To get to the recycle  bin, you need to do something like this:

$objShell = New-Object -Com Shell.Application
$objFolder = $objShell.Namespace(
0xA) # recycle bin!
$objFolderItem = $objFolder.Self

Following on from this, you can  explore the recycle bin by entering the following additional commmand:


And to delete all the items in the recycle bin, just type:

$objFolderItem.InvokeVerbEx("Empty Recycle &Bin")

You will, in this last case, be asked to confirm deletion so this command  is nearly safe! As ever, take care when playing with commands like this!!


Wednesday, January 17, 2007

Using The Registry with PowerShell

Providers, in PowerShell, are a way of exposing data to PowerShell's native cmdlets, such as Get-ChildItem, GetItemProperty, etc in a consistent and predictable way. PowerShell ships with 7 providers.

The provider obtains data  from some underlying data store such as the registry, DNS, the file system, etc, and exposes this information in a consistent way. PowerShell native cmdlets act on the provider interface to enable you to access data from any provider in a consistent manner.

One provider shipped with PowerShell is a Windows Registry provider that allows you to read and write to Window's registry. The registry provider is installed by default, along with two Registry "drives", HKCU: (the current user) and HKLM: (local machine). You can see these two drives by typing:

PS C:\> Get-PSDrive | where {$_.name -match "hk"}

This command  displays the two default drives, which you can use like other drives in PowerShell. You can also go to the root of the registry by specifying "Registry::".

To see all the service entries in your registry, you could do the following:

PS C:\> cd hklm:
PS HKLM:\> cd HKLM:\SYSTEM\CurrentControlSet\Services
PS HKLM:\SYSTEM\CurrentControlSet\Services> ls

Hive: Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

SKC VC Name Property
--- -- ---- --------
2 0 .NET CLR Data {}
2 0 .NET CLR Networking {}
2 0 .NET Data Provider for SqlS... {}
1 0 .NETFramework {}
0 5 Abiosdsk {ErrorControl, Group, Start, Tag...}
1 7 abp480n5 {ErrorControl, Group, Start, Tag...}
2 7 ACPI {ErrorControl, Group, Start, Tag...}
... {snipped for brevity}

As you can see, you can quickly get to the service definitions inside the registry.

With the Registry provider, each registry key maps to a child item (which can in turn have additional child items). The registry provider enables you to Get-ChildItem (i.e. ls, dir) to retrieve children, aka, individual registry keys. You can also Set-Location (cd) to point to a specific hive or registry key. This means you can use the  cd command command to move up and down the registry and type dir or ls  - in much the same way you would navigate the filestore using CMD.exe (or PowerShell).

Each registry key in the Windows registry can have registry value entries - where each entry has a name and an associated value. The registry provider exposes a registry value entry as an item property which you can manipulate using the Get-ItemProperty and Set-ItemProperty cmdlets.

To get the service startup type for, say, the TCP/IP service, you could do the following:

PS C:\> cd hklm:
PS HKLM:\SYSTEM\CurrentControlSet\Services\tcpip> cd HKLM:\SYSTEM\CurrentControlSet\Services\tcpip
PS HKLM:\SYSTEM\CurrentControlSet\Services\tcpip> (Get-ItemProperty . ).start

The Set-ItemProperty cmdlet allows you to select a value entry and set a value. If, for example, you wanted to set the the service startup type for for the TCP/IP service to 999, you could do the following:

PS C:\> Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\tcpip" -name "Start" -value 999
PS C:\>
(Get-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\tcpip").start

If you try this at home, be very careful and ensure you reset the startup type carefully!!!

Finally, to print out the services that are set to start at startup (for those services that have a startup value set):

PS C:\> $shive= "HKLM:\SYSTEM\currentcontrolset\Services\"
PS C:\> $Services=ls -path $shive
PS C:\> foreach ($s in $services) {
>> $sername=($s.name.split("\"))[($s.name.split("\").count-1)]
>> $ss= get-ItemProperty -path registry::$s -erroraction silentlycontinue
>> if ($ss) {"Service: $sername, Start= $($ss.start)"}
>> }
Service: Abiosdsk, Start= 4
Service: abp480n5, Start= 4
... {snipped for brevity}


Enjoy playing with the registry!


Sunday, January 14, 2007

Joining Up MSF and MOF - Revisited


A little over 2 years ago, I wrote a post entitled Joining Up MSF and MOF. In that post, I noted that Microsoft had two great framework methodologies Microsoft Solutions Framework (MSF) which helped teams envision, design, develop, and deploy a business solution, and Microsoft Operations Framework (MOF) which is all about you operate the solution you built with MSF.

These two frameworks are based on proven practices - things that have been proven to really work. MOF is based on ITIL, recognised world wide for its value in the service management arena. The two frameworks also fully incorporate risk management in a highly structured way - something useful in today's complex IT world!

The post went on to list 10 things I thought MS should do to improve the usage of MSF and MOF. I argued hard in the intervening years for more emphasis on MOF and MSF.  I also argued that groups like Microsoft Learning should use MSF and MOF as a way to improve their offerings. I even traveled to Redmond to teach MSF to MSL. 

However, it would appear that this post, and the later discussions on this topic, fell on deaf ears. As of the start of the year, Microsoft Learning has discontinued MOF training. Not because it's no good (the MOF courses were great to teach and take) and not because there's no interest in the area (ITIL classes across the country are regularly full).  And  despite asking, there seems to be no updated MSF training courses.

RIP MOF and MSF Training.


Saturday, January 13, 2007

What Can You Do With Windows PowerShell?

Microsoft has a cool set of pages on the TechNet site entitled, What Can I Do With Windows PowerShell? These pages provide a great task based tutorial on things you can do with PowerShell. These include:

Technorati tags: ,

PowerQuest: Games in PowerShell too

Don Jones, from Sapien, has written a neat bit of game code, which he calls PowerQuest. PowerQuest is a game snap-in for Windows PowerShell. PowerQuest is loosely inspired by the classic "Colossal Caves" text-based adventure game. PowerShell also provided a look at how to build PowerShell cmdlets using various programming styles. Don's also written a graphical map editor for the game.

You can get PowerQuest from CodePlex at http://www.codeplex.com/powerquest.


Going Home in PowerShell

In PowerShell, the "~" symbol is used as your home folder, which you can use in constructing file paths as follows:

PSH [D:\foo]: cd ~
PSH [D:\Users\tfl]:
cd \foo
PSH [D:\foo]: ls ~

Directory: Microsoft.PowerShell.Core\FileSystem::D:\Users\tfl

Mode LastWriteTime Length Name
---- ------------- ------ ----
d-r-- 10/12/2006 11:52 Contacts

PSH [D:\foo]: ls ~\links

Directory: Microsoft.PowerShell.Core\FileSystem::D:\Users\tfl\links

Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 25/11/2006 20:02 376 Documents.lnk
-a--- 25/11/2006 20:02 364 Music.lnk
-a--- 25/11/2006 20:02 373 Pictures.lnk


By default, PowerShell sets ~  to <systemdrive>:\users\<current user>. I prefer on my laptop to have a home folder set to D:\foo. So to change where PowerShell points, you just need to update the filesystem provider as follows:

PSH [D:\foo]: $provider=get-psprovider filesystem
PSH [D:\foo]:
PSH [D:\foo]: cd \
PSH [D:\]: cd ~
PSH [D:\foo]:


Technorati tags: ,

Sunday, January 07, 2007

Windows PowerShell 1.0 DeskSheet

 I just came across an interesting document, the Windows PowerShell 1.0 DeskSheet, a neat PDF document describing the core PowerShell functions. A useful document for those learning PowerShell.


More Sample XML Documents

In a blog post last November, I described a version of Romeo and Juliet in XML which Jeffrey Snover used as a demo. It turns out that most of Shakespeare's plays have been rendered into XML - and these are freely downloadable from Ibiblio.org.

If you look within Ibiblio.org's vast document catalog, there are a number of other lager XML documents, including the Holy Koran, the Book of Mormon, both the New Testament and the Old Testament, and some US baseball statistics.

And  of course, you can use PowerShell to manipulate these documents.


Monday, January 01, 2007

Vista Content Protection - A cost or a benefit?

I've been reading an interesting paper by Peter Gutman entitled  A Cost Analysis of Windows Vista Content Protection. It is a somewhat depressing read. I'm not sure how much of this paper is accurate but Chris Samuel has some support for Gutman's analysis. The comments on Bruce Schneier's blog are aslo pretty interesting.

No doubt, someone from MS will be along to defend Vista's content protection features. I look forward to seeing  how this issue play out.