Wednesday, June 30, 2010

They Called Their Web Site WHAT????

Those nice folks at Angel Internet Press sent me a copy of  new book: Slurls – They Called Their Website WHAT?!” which has been keeping me amused. A slurl is made up term – joining ‘slur’ and ‘url’. A slurl is a web site URL that can be read in ways other than what the owner probably intended. Slurls come about when someone creates a website name based on their company, but where the words can be read in a much more amusing, and often embarrasing, way! Some of the more amusing slurls are:

The book lists a number more slurls – most of them quite amusing. I still can’t quite work out just how someone really did create all these web sites and didn’t notice the potential gaff! The author’s website, shows the SLUR of the day (today, it’s which still has me chuckling) and has  discussion forums where you can suggest a SLURL and learn of those that have ceased to be. The web site also has screen shots of the site to show it’s not just a made up url, for example this page pointing to an MP3 site: (MP3’s Hits).

A light read, but highly amusing!

Network Monitor V3.4 Ships

Microsoft has just shipped a new version of Network Monitor, one of my favourite network tools. The new version has a slew of new features. MS has reworked the capturing engine to capture on faster networks without losing frames.  The parser logic has been updated giving you the ability to do deeper/slower parsing or shallower/faster parsing, a great feature for fast networks where shallower parsing is acceptable. The UI is also more customisable, something no doubt of value to those who use tools like every day. For a fuller list of features in the new version – see the beta blog announcement here.

Microsoft also provides ongoing information via the Network Monitor blog: here. Additionally, there’s a support forum on the  Network Monitor forum. The forums enable you to ask questions about the UI, NMCap, API, parsers and troubleshooting scenarios (and even get answers!).

Sunday, June 20, 2010

PowerShell Plus 3.5 Beta

I use PowerShell Plus pretty much all the time for the development of PowerShell scripts. I have it on both my desktop workstation and my laptop, and I regularly demonstrate it in my classroom teaching. Those nice folks at Idera have just released the beta of the next Version, V3.5, of this cool tool which is a free download (although the final product will be commercial and is not free).
The beta shows off the new features in V3.5:
  • Remoting Support
  • Improved Script Sharing
  • Enhancements to the code editor
  • Enhancements to the Learning Center.
I have a long boring weekend ahead stuck in a hotel – I will be playing!
Technorati Tags: ,

Saturday, June 19, 2010

Another Free PowerShell Book

I see the Swiss MS IT Pro Team (i.e. Frank Koch) are at it again, this time with another Free PowerShell Book. The latest book is entitled Administrative Tasks Using Windows PowerShell. And it’s now available in English (along with a copy of the first e-book, Windows PowerShell. Both are great introductions to PowerShell!
You can get the English versions of both books here. This is a large-ish ZIP file with both PDF and XPS versions of the book, along with a set of sample scripts. For the German speakers, or at least those who can read German, you can get the original versions here.

I read this second document on the plane to the US, and as the comment below says, this turns out to not be such a new book - but is mainly V1 based. There are aslso a number of errors in translation.

Friday, June 18, 2010

PowerShell Script Provider

Just when you think we’ve seen all that the (awesome) PowerShell community can do, along comes another cool development. The latest coolness comes from Oisin Grehan in the form of a PowerShell Script provider. This is a tool, which you can download from Codeplex, that enables you to write a provider purely in script without the need to do stuff in C#. This is pretty cool!.

The project is at version 0.1, with at least 4 more versions planned. As it says on Codeplex, this code is alpha – but knowing Oisin those versions will come quickly. 

Thursday, June 17, 2010

Signing PowerShell Scripts – A Gotcha with ISE!

In some enterprise environments, signing PowerShell scripts and setting an execution policy to only run signed scripts is a useful control mechanism. It can avoid less skilled admins ‘fixing’ a script almost correctly and can avoid untested scripts from running. Of course, the malign admin can still cut/paste the scripts into the command line and do damage – but that same admin can nuke the registry, reformat a volume, etc. Script signing is just another layer of defence.

The Scripting Guys Team (well actually superstar MVP Ragnar Harper) has written a two part blog post on the subject of how to do script signing. Part 1 is a useful tutorial on how to setup your own PKI using Windows Server’s built in Certificate Service feature (AD CS as MSFT call it). With Part 1, you learn how to get your code signing digital certificate.  Part 2 then talks you through how to use that certificate to generate a signed script.

The demo is good and the instructions work well, however there is one small gotcha. If you use PowerShell ISE to edit and save your scripts, the technique shown in Part 2 will fail. Here’s what you will see (from the ISE).


As you can see, this results in a rather less than helpful “UnknownError”. Turns out the reason is simple: By default, ISE saves scripts in Unicode BigEndian format – which Set-Authenticode does not cater for. And worse, the ISE Save-As dialog does not give you any option to save in a more friendly encoding (ie ASCII!).

There are three solutions to this:

1. Use Notepad to re-save the file as ASCII, then sign it. This is suboptimal but it works.

2.  You can get ISE to save as Unicode (not BigEndian) using a small script, unfortunately not from the menus. Just run the following bit of code:


3: You can get ISE to save as always as ANSI. As t add the following bit of code to your PowerShell ISE:

register-objectevent $psise.CurrentPowerShellTab.Files collectionchanged -action {
    # iterate ISEFile objects
    $event.sender | % {
        # set private field which holds default encoding to ASCII
        $_.gettype().getfield("encoding","nonpublic,instance").setvalue($_, [text.encoding]::ascii)

Once this fragment is executed, probably by adding it to your Profile, scripts get saved as ANSI and can be signed just fine.

Note in the above, you can both save the current file as ASCII or auto-save as Unicode. Set-AuthenticodeSignature works with both encodings, just not the ISE normal default of Unicode BigEndian (just change ::ASCII to ::UNICODE or vice versa!). Personally, I now save as ASCII. But if you have non-ANSI characters in your scripts, set the default as Unicode!

And a tip of the hat to Oisin Grehan who posted about this on the MVP list and who has posted some of the above code on his blog here.


Thursday, June 10, 2010

Communications Server ‘14’ Powershell Blog Up And Running

The Communications Server ‘14’ team have put up a CS and Powershell blog. You can read it at It’s early days, as CS14 was finally revealed to the world (with no NDA!) here in New Orelans TechEd North America. Speaking to the PowerShell PM, the intention is for the blog to be a one-stop shop for all CS14 and PowerShell. I look forward to seeing how this evolves!

Friday, June 04, 2010

Training and the Cloud

I’ve been having some discussions with a client about the impact of cloud computing on the IT training business, particularly IT Professional training. If you believe the hype, cloud computing will take all the problems of running your IT suite and make it a thing of the past. Thus, you don’t need any more IT Pros and therefore no training. Of course it’s nowhere as simple as that! I’ve been reading an interesting blog piece by Alan Le Marquand titled From Servers to Services: the Role for the IT Pro in the Cloud. It’s provided some good input into the training question.

Alan first makes the point that 'the cloud’ is actually many things. Cloud computing has evolved in to distinct layers, each with their own approaches and IT Pro needs. Le Marquand breaks “the cloud” down into three main layers:

  • Software as a Service (SaaS)– here you buy the software hosted by a supplier. For example, an organisation can use one of many hosted Exchange solutions for email. For this layer, the hardware, OS layers and application peices are for the most part gone. so IT Pros no longer need to worry about them. Of course, at the application layer, there is still a need to perform management and provisioning functions such as adding or removing email accounts as employees come and go. And since you are paying for the application, you need to monitor your SLA, possibly differently than today as well as manage your supplier.
  • Platform as a Service (PaaS)– here the hardware and OS are provided by a supplier but you provide the application – Microsoft’s Azure is an example of this cloud layer. With PaaS, the OS and hardware are primarily managed by the supplier , but you manage the application that sits on top.This layer still requires IT Pros to handle all the application management functions plus the ability to manage the platform in the cloud. 
  • Infrastructure as a Service (IaaS) – here you just get the hardware provided by the supplier and you deal with the OS, application and everything above. To some degree, this is really not much different than from today in terms of the skills that IT Pros need – the key difference being where you put the hardware and how you scale it out (or not!). IT pros still need to know how to deploy the OS and the applications and manage them. Only the scale is different – you still need to patch, troubleshoot etc.

The role that the IT Professional plays in each of these layers differs, in some cases significantly, from today.  And of course, this means training needs differ too. All three layers require you to consider end-user/administration training in how to use and get the most out of the applications. PaaS and IaaS also require you to know how to develop and deploy your application solution. And finally, IaaS requires you to have broadly the same deployment skills as today since most IT Pros start their tasks once the hardware is in place.

The key first step all organisations considering the cloud need  to take is to get a good understanding of how to buy as well as deploy and manage cloud services. Organisations are being led to believe by the suppliers that the Cloud is the answer. That may be the case ultimately, but not all suppliers are equal and not all offerings are the same. So companies need to understand how to go about buying the services and then how to deploy them. For IT Pros, that deployment may be a challenge as there are new issues to consider. Deploying application to hundreds or thousands servers require you to have new automation skills than you might have needed if you just use the GUI to manage one server.

The suppliers of particularly PaaS and IaaS also need to deliver or facilitate training in their offerings. While SQL on Azure may be almost like SQL on your own server, there are differences. Also, deploying and managing larger numbers of servers will require new approaches to the tasks.

For organisations that are considering cloud computing, I’d recommend spending some time to think through just which cloud layers you are considering and the impact those have on your IT staffing. Then you should start to do some training needs analysis. The cloud offers organisations of all sizes some advantages and as Alan poitns out, IT Pros, and hence the training, will certainly adapt to fit the cloud model. But there is still some thinking and planning to be done before leaping off in to cloud-land!

Technorati Tags: ,

SQLIse – A PowerShell SQL Server Query Tool

I am doing some work at the moment building SQL PowerShell training for an upcoming PowerShell MasterClass. In my searching, I came across a small project being done by Chad Miller, called SQLIse. As Chad describes in his blog, SQLISE is an ISE add-on that provides  “a basic IDE for T-SQL that includes the ability to exit, execute, parse and format SQL code from within PowerShell ISE”.

SQLISE is a part of a larger SQL PowerShell project called SQL Extensions for PowerShell or SQLPSX. Having played a bit with both extensions, they are pretty cool and can certainly help IT Pros who have to deal with SQL. Chad has even created a short video to demostrate SQLISE – get this at YouTube:

SQLISE has two pre-requisites. First, you need to have the PowerShell Pack installed and you need the SQLPX extensions loaded. You can get PowerShellPack from the MSDN Code Gallery.

One issue I faced was that the SQLIse installation process was not seamless or easy.  In order to get this running, I needed two uber-modules (SQLPSX and PowerShellPack) and these come from different places. Second, the installation process requires you to run programs, SQLPSX_Install and PowerShellPack.MSI.

I find this somewhat contrary to the spirit of Modules in PowerShell V2 in that modules should be deployable using only Xcopy. In my case, I did not want either uber-module to be loaded in the personal modules folder, but in the system modules folder. But the installer(s) gave me no option. More importantly, while the SQLPSX installation program seemed to run, but left the module folder empty. A bit of hacking (and running streams.exe across the expanded file set!)  enabled me to get the module installed. But sadly the hacking did not work well – and some of the features do  not work. More hacking I suspect is needed.

In summary, a great feature let down by the complex installation process.

Wednesday, June 02, 2010

PowerShell Admin Module – A Follow Up

in a recent blog article I wrote about a new Codeplex project called PowerShell Admin Modules, being developed by super-star MVP Richard Siddaway. I noted two small things I’d noticed about the module. Well today, Richard wrote to say he’d fixed Get-Share to accept wildcards and had changed around the parameters of New-Share to match that of the venerable Net Share.

He also mentions the latest version, 0.2, has a bunch of functions for dealing with binary and hex numbers, which include:

  • ConvertTo-Binary
  • ConvertTo-Decimal
  • ConvertTo-Hex
  • Get-BinaryAND
  • Get-BinaryDifference
  • Get-BinaryOR
  • Get-BinarySum
  • Get-BinaryXOR
  • Get-HexDifference
  • Get-HexSum
  • Test-Binary
  • Test-Hex

This is nice work – although one thought would be to merge the functions of PSAM into the PowerShell Community Extensions.

Tuesday, June 01, 2010

The PowerShell Guy Has Returned

Marc, aka The PowerShell Guy is back. In his blog (now back on air), Marc recounts a tale that is all too familiar to many of us: IT problems combined with the demands of a real life. But thanks to those very nice folks over at OrcsWeb, Marc’s site and his many outstanding contributions are back online.

Welcome back to the online world Marc!