Wednesday, May 18, 2016

Finding Type Information in PowerShell

On frequent occasions, I find myself using a cmdlet and needing more information about the objects that cmdlet produces. The details are in Microsoft’s MSDN library, but it can be hard to use the GUI to find it. Fortunately, I found a cool way of dealing with this. I found the trick on the Internet but I really can not remember where I found it.

The trick is simple: I use some Type XML to extend all objects with a new script method called MSDN. If I create an object – I can assign it to a variable and just call the .MSDN() method on any occurrence.  Suppose I did a Get-ChildItem against the Certificate Provider and needed more details on the object returned. I just do this:

$Certs = Get-ChildItem Cert:\CurrentUser\My

The MSDN() method, something I’ve added in, then brings up Internet Explorer and nvigates to the appropriate page in the MSDN library. Which is:

But how did that method come about – you might ask! Easy – it’s just a bit of type XML I add to each system I use. I just add an xml file and reference it in my PowerShell profile. The XML file looks like this:

           if (($global:MSDNViewer -eq $null) –or
              ($global:MSDNViewer.HWND -eq $null))
           {$global:MSDNViewer = new-object -ComObject InterNetExplorer.Application}
              $Uri = "" + $this.GetType().FullName + ".ASPX"
              $global:MSDNViewer.Visible = $TRUE

I have saved this into a file (I saved it as c:\foo\my.types.ps1.xml) then in each PowerShell profile I just add it in:

Update-TypeData -appendPath C:\foo\my.types.ps1xml

And from then on, you can just use the MSDN method on just about any type. It’s not perfect – sadly there are types/classes that do not appear documented in MSDN (or at least now where this little XML trick can find it).

If you know where this came from, Please comment – I just can’t remember where I found it!

Some Cool Writing Tools I Could Get Used To!

As someone who blogs, and contributes to a lot of web forums, my writing skills matter. I want readers to digest what I say, without the text sounding like I'm talking to a 5-year old. The technical content of a lot of what I post makes that even more challenging. I’m sure I am not the only person who cringes when I see a typo or a bit of appalling grammar in my output.

Today, I came across an interesting page from StumbleUpon, called ‘3 Simple Writing Tools that will blow your mind’.  I did find the inconsistent use of capital letters in that headline to be amusing. But the content was good – and very useful!

The first tool is Headline Analyzer – which does what it says. You type in an article’s headline to the page ( and then the page analyses the headline for you. It shows common, uncommon, emotional and power words in your headline. Increasing the number of uncommon or emotional words can improve the headline. The page also shows how your article might appear in both google and email! If better headlines increase readership, then so much the better! I’ve bookmarked this page!

The second tool is Hemingway – a tool at You paste your article headline/text into the page, and your text is analysed for thinks like use of passive voice, or for phrases that have simpler alternatives. Running this article’s draft through Hemmingway showed some sentences/phrases that could be improved. This is another page I have bookmarked.

The final tool is called Grammarly. This is a chrome plugin that checks your text as you type into text boxes on Web pages. I installed it, and instantly the SpiceWorks pages give me this nice editor. This tool is free, and I’m already hooked!

Tools like these are a gas!

Wednesday, April 27, 2016

Are Merrill Lynch Thieves?

In my early 20s, round about 1973, I received a phone call from Merrill Lynch – it was a stock broker who was looking for the ‘other’ Tom Lee. I lived in Michigan and there were two of us with the same name. I occasionally got calls for him. Anyway – while the call was not for me, I was interested. I was in my first job after university and wanted to start investing for my future. My great grandmother was a big fan of investing and told me I should do so as young as possible.

So following that call, I opened a Share Builder account and started investing. The idea was you sent them money and they bought fractional bits of shares and credited your account. Dividends were re-invested. It was sweet – I put a few dollars in on a fairly regular basis and slowly my portfolio grew. It was a nice programme and I invested consistently.

In 1975, I moved to the UK – but mail does get here from the US, and I managed to organise change of address with no problem. With currency control in effect at that time, I was unable to invest more – but was happy with the growth due to dividends. I hoped, one day, to be able to invest more.

In 1981, I joined what was then Arthur Andersen (now Accenture) and was forced to sell all my shares – except for one that I did not sell. I had a few shares of IBM and wanted to keep those. I was successful.

Since then, the shares just grew – each quarter, the dividend bought more bits of shares and, along with a few stock splits, I ended up with around 320 shares by last year. And although IBM has gone through a rough time – this is to me a lot of money that I planned to use in my retirement. I reached 65 last summer and was considering what to do with these shares. I did not need the money urgently so was happy to wait.

But then Merrill Lynch ‘helped’ me. In December 2015,they took all the shares, closed my account and now they refuse to talk to me. They claim they tried to contact me in August 2015, but I never received any communications. They have been utterly unhelpful at tracking down my missing IBM shares.

They claim the money has been given over to the state of Delaware under an escheat scheme. Well – Delaware has no record of any money or shares given over. And Merrill Lynch have refused to talk to me saying I should talk to Delaware.

Bottom line: I have lost 320+ shares of IBM (worth today roughly $47k). They refuse to help – and just refer me to Delaware ( Having spoken to the folks in Delaware – they know nothing about it.

What can I conclude but that Merrill Lynch are thieves and crooks? Maybe that’s strong language. But what do you call a firm of bankers who take your money and in effect laugh in your face and tell you to get lost? I am gutted to have lost that much money due to bankers who seem to be able to get away with it.

If you know any one at Merrill Lynch, feel free to point them to this blog post.

Saturday, April 23, 2016

Windows 10 Build 14328 – Two Interesting PowerShell Changes

I’ve just updated my text Windows 10 test VM to the latest Insider build, 14328. Needless to say, one of the first things I did was to open up PowerShell and look at $PSVersionTable. And when I did so, there are two interesting changes. Here’s what I see:


Note there are two interesting changes:

  • First, the $PSVersionTable variable has a new property: PSEdition. On my VM, as you can see, this is set to Desktop. The Latest Windows Server 2016 has an older build of PowerShell, and this property does not exist, nor does it exist on my main workstation (running 5.0.10586.122).
  • Second, note that the PowerShell Version number has changed to 5.1!

Taken together, it looks like Microsoft will release an updated version of PowerShell with the Windows 10 Anniversary edition. And at a wild guess, I suspect MS will ship that version of PowerShell in Windows 2016 when that ships.

What remains are two questions: what is new in 5.1 (or what WILL be new when it’s ‘released’), and what’s up with the PSEdition property? It also somewhat begs the question around what is the ongoing strategy surrounding version numbers? What is the effective difference between 5.1 and 6.0? I’d just like to understand the PowerShell team’s version numbering strategy.

So far as I can tell, there’s nothing I can see new in this build of PowerShell (aside from the additional property. But I’ve only had this new build up for an hour. More fun later today, no doubt!

Thursday, April 07, 2016

Bash on Windows– 10 Things I Learned Today

I’ve been playing today with Bash on Windows 10. I blogged earlier about how to install it. Now to getting down to use it. I spent a few hours today as a NEW to Bash user and found some differences. If you know Linux,  you may find some of these obvious but they do represent a difference new to Bash folks will find.

1. BOW is case sensitive  LS is not the same as ls. Windows is not case sensitive, so LS and ls are the same.

2. Getting help for a command is different and inconsistent between commands. In some cases it's <cmd> -h, some times <cmd> --h, or <cmd> --help, etc. Each command has its own way of providing help.    

3. The Unix MAN help system is alive and well in Bash. Type man <cmd name> for help. However, this takes you into a pager, from which you type q to escape.

4. You don’t have a graphical text editor in Bash. But you do have VI, and you can easily install emacs (apt-get install emacs23).

5. The Linux and Windows file systems are different. Windows has no single root, but a bunch of volumes C: d:, etc. With Linux there is one unified filesystem '/' with everything underneath it. 

6. You can see the windows file system from bash /mnt/c is c:, /mnt/d would be d:, etc. But interop is limited. It would be nice to be able to edit, say, over in Windows but use over in bash. That doesn't really work fully. You can, for example, mkdir /xxx from the bash side, and that folder shows up in windows. But create a file in windows and you can't see it from bash. I suspect this is a work in progress.

7. No GWMI Win32_Processor, instead cat /proc/cpuinfo , or  grep Intel /proc/cpuinfo (nb grep intel /proc/cpuinfo fails! - see rule 1)

8. The error messages are quite different.

9. Type Man Man and you can see where PowerShell help ideas came from!

10. Type the wrong command and you can often be told which where to find it (eg, type lsf and see what it offers you)

And since I can’t count well,

11. Getting packages is different - You use apt-get. apt-get install emacs, for example. PowerShellGet is modelled on APT-Get, it feels!

This is fun!

Installing BASH on Windows 10

Well – I now have Bash running on Windows 10. Turns out to be pretty easy!

The first thing to do is to get the latest Insider build – you need 14316. This build is not yet available for ISO downloads (although I suspect that that will come soon), so you need to get the update. You just go to the Settings setting and change over to get the Insider builds (make sure you specify the fast ring) and let it download. Something like this:




After downloading the update and doing a reboot brings up the new build. After tuning on the developer features, you then go over to Control Panel and Select the Windows Subsystem for Linux ( Beta). Like this:


Once WSL is installed, you get the obligatory reboot, then just run Bash. The first time you run Bash, it lets you know that you need to load the Bash Shell itself:




Once that is done, you can start typing Linux commands:



But here’s is the screen shot I love (and a tip of the hat to Paul Adare):


Bash on Windows. Real Bash. And all the tools. Including apt-get. WOW – if I did not know better, I’d wonder if Hell had frozen over.

Saturday, April 02, 2016

Bash on Windows

Hell has truly frozen over. Or something like that. At //BUILD this week, Microsoft announced Bash on Windows. I was listening to the keynote over the Internet and watching Twitter. As I listened to the keynote, I kept asking ‘why?’  Jeffrey Snover tweeted, to the effect that I’d get it eventually. As usual he was right.

I get it, now.

I read a great blog post ( and watched two videos today that helped. The first video is an overview to the feature, with Rich Turner and Russ Alexander ( It explains the feature well! The other one was a panel discussion from the BUild conference narrated by Scott. Get this at:  And here’s another good blog post from Canonical’s Dustin Kirkland:

So why does this matter and what’s the big deal.

Let’s start with how the feature is architected. When you run Bash on Windows, AKA BOW, you are running a pure Linux (Ubuntu) userspace. It is bit for bit Ubuntu, with the Linux kernel replaced by a new Windows subsystem that implements the Linux system calls. It looks like, acts like, and to all intents is Linux. On Windows. I find the solution quite elegant.

So who would want it? Well – Microsoft via UserVoice, concluded there were a lot of  developers who were developing apps for Linux server, for example a Ruby on Rails based web site.  They use Emacs and a variety of tools to edit the source code, check it into a repository (Git), and push it up to the cloud (azure). They use other tools to do the building, unit testing, etc. The open source environment is rife with tools that a canny developer can leverage.

These Linux server devs (I hesitate to use the acronym LSDs) currently use Linux client systems. WIth WOW, they can now use ALL the tools they used to, from a command prompt they know, leveraging the Linux package community as they always have – but you are running all that on top of Windows.

That enables a couple of things. First, it will simplify the management of the developer workstation. It can now be Windows (with AD, GPOs, etc, etc), but with the power to run the developer’s normal workflow unencumbered by Windows. But at the same time, the dev can Alt-Tab to Outlook, the Edge browser, leverage Office and that huge library of windows applications. The best of two worlds.

Another interesting aspect – it turns the developer’s desktop into a Windows License. Linux at the from door, Windows by the back door. Or something like kthat

I like the concept. It’s certainly NOT for everyone – but I can see there there is a market.  I suspect that, cool as this is, there is a lot more to come here.

Tuesday, March 01, 2016

The AzureRM module–Post the Great Renaming

Last summer (2015), the Azure PowerShell team took the decision to re-factor the then existing Azure module. You may remember, this older module was schitzophrenic – loading the modjule allowed you access to the Azure Service Management APIs. You then used the Switch-AzureMode cmdlet to enable access to the Resource Manager APIs.

Many PowerShell hands felt this was a sub-optomal approach. A more senible approach, the arugment went, would be to create a separate module (or separate modules!). The latter is what happend – ALL the RM cmdlets were removed from the old Azure Module (an updated module – which at the time of writing is version 1.0.4) is available that contains only  cmdlets that target the Service Manager APIs. At the same time, the Azure PowerShell team created a bunch of new, Resource Manager targeted cmdlets.

Another somewhat curious decision was made with respect to these cmdlets. The team created a simple module, AzureRM, whch contains cmdlets that actually to the installation and updating of the individual modules. You use the AzureRM module to actually install anbd manage the RM commands.

This means that the installation of the Resource Manager cmdlets is a two step affair. First, get the main RM module:

Install-Module AzureRM

This goes out to the PSGallery and obtains the latest version of this module. At the time of writing, this is version 1.0.4, but no doubt will change on a regular basis! The AzureRM module contains just 8 commands (1 alias, and 7 functions to be accurate) that enable you to manage the detailed sub-modules.  So once you have the AzureRM module installed, you can install the actual Azure RM Modules by


Strictly speaking, Install-AzureRM is an alias for Update-AzureRM. You can use either to install teh individual modules. The AzureRM module also has a command to uninstall the module as well as updating the module.

To check what modules you have on yoru system, you can do this:

Get-Module AzureRM.* -ListAvailable

And, of course, when you want to update the modules that make up the AzureRM set of modules, just:


This is a slightly different way to install/manage these modules than many of you may be used to using. But it does give the Azure PowerShell team more flexibility – to create new modules to match new Azure features and to update bits of the module set at a time. At the same time, you end up with 27 separater modules with 5 separate release versions. Keeping track of these will be work, since in some cases, updates may break earlier code.

Once you have all this done, you end up wsith 884 commands, as follows:

PSH [C:\foo]: get-command -module azurerm.* | measure | select count

PSH [C:\foo]: get-command -module azurerm.* | group commandtype

Count Name                      Group
----- ----                      -----
    6 Alias                     {Get-AzureRmSqlDatabaseServerAuditingPol…
    1 Function                  {Get-AzureRmAuthorizationChangeLog}
  877 Cmdlet                    {Add-AlertRule, Add-AutoscaleSetting….

Monday, February 29, 2016

Get-AzureResourceGroupGalleryTemplate is missing

Last september, I wrote about what I call ‘The Great Azure Cmdlet Renaming’. Well, I’m now in the process of actually using the resultant cmdlets and I am having some minor frustrations.

I am following an Azure Resource Manager training course, provided by Microsoft MVA. I suppose it’s bad enough that EVERY demo shows stuff that no longer exists – all the demos are ‘wrong’. The new portal looks vastly different from the course, although with a bit of effort I can pretty much re-produce what the demos are showing. It’s tedious, but possible in most casew.

It’s not just the portal that is so different, the cmdlets have changed too – with lots of renaming, etc. One cmdlet that is now totally gone is Get-AzureResourceGroupGalleryTemplate. This cmdlet returned a list of templates in Azure’s gallery along with details of the specific template.

While you can’t actually use this cmdlet (it no longer exists), you can re-create it like this:

Function Get-AzureResourceGroupGalleryTemplate {
$IncludePreview = $false
$StartTime = Get-Date
Write-Verbose "Started at $StartTime"
#     Create URL
$GalleryUri = ""
if ($IncludePreview)
   { $GalleryUri += "&includePreview=true"}
   { $GalleryUri += "&includePreview=false"}
#    Retrieve all available templates
Try   {
         $AllGalleryTemplates = Invoke-WebRequest -Uri $GalleryUri | ConvertFrom-Json
Catch {
         "Error invoking Call to Azure Gallery"
#     Write verbose return information
$EndTime = Get-Date
Write-Verbose "Finished at $EndTime"
Write-Verbose "$(($EndTime-$StartTime).totalseconds) seconds elapsed"
Write-Verbose "Templates returned: $($AllGalleryTemplates.count)"
#     And return it
Return $AllGalleryTemplates

Set-Alias Get-RGTemplate Get-AzureResourceGroupGalleryTemplate
Set-Alias GRGT Get-AzureResourceGroupGalleryTemplate

It’s easy enough to re-create the template – I’m not sure why it was removed in the first place. If, like me, you think that the cmdlet should be re-instated, then feel free to follow up at:

Monday, February 01, 2016

SSD Life Time Measurements

I’ve been looking at possibly upgrading one of my Hyper-V servers to use SSDs. I don’t have the budget yet, but have been pricing up various options. One issue that arises is about the life time of the SSD, also referred to in the literature as endurance. There seems to be two separate measurements in use: Terabytes Written (TBW) an Drive Writes Per Day (DWPD). At first, I could not see the relationship – which kind of made comparing harder.

I did a little searching and found this neat article:  Comparing DWPD to TBW which provides a nice equation for converting DWPD into TBW. The trick here is to consider the warranthy period. DWPD is a measure of how many times you can totally overwrite the disk each day and not have it fail during it’s warranty period. To convert that to TBW, as the artilce points out – you multipy DWPD by warranty period (in days) and capacity (in TB).

I am starting to see more virtualisation projects using SSD disks, so the comparison betwen vendors and product lines is important. I wish there was just ONE measure of endurance, but such is life.

Saturday, January 30, 2016

Introducing the PowerShell ISE Preview

Now this is pretty cool: The PowerShell team are releasing what is effectively a beta version of the PowerShell ISE as a separate stand alone tool.

As I told my PowerShell class last week in Luxembourg, the ISE is probably the best default tool out there. It’s free, and built in. I do like some features of other ISEs, but paying for them, or having to load that ISE on mujltiple systems (vs just using the ISE) – it all makes the ISE for me the tool I use. Of course, the ISE addin model has enabled fantastic tools such as ISESteroids (which I use on my laptop and main workstation).

So having loaded it – I can’t see any difference. According to the blog post:

this is intentional!  This first release is meant to ensure that the new preview release model will work and that there are no major issues.  After the initial release, we hope to ship a new release roughly once per month with new feature improvements and bug fixes.  It will also be a lot easier to ship minor releases to address bugs that may appear due to new features.”

Wow – monthly updates! I am so liking this new MIcrosoft that no longer has to wait three years just to fix typos in help text! Smile. This responsiveness is very attractice.

One small thing – if you are going to play with the new add-in model and want keep your real ISE and preview ISE profiles separate – you may need to use the variable $PsIse.IsPreviewRelease.  Naturally, this will be true when you are using the Preview version!”"

Friday, January 15, 2016

PowerShell’s Get-Random Cmdlet–a curiosity

I’ve been working on a new set of Introduction to PowerShell courses for a new client – and in doing do, I’m recycling bits of the courseware I’ve developed for my  my own PowerShell training courses. I’ve been running these for 10 years now and have an awful lot of  PowerShell decks on file!

I was looking at an example that was actually based on Version 2 of PowerShell. The example used the PSCX extensions’ Get-Random cmdlet. Well – in those days the PowerShell Community Extensions did contain such a cmdlet - the latest versions of PSCX have sensibly deprecatexd it in favor of the cmdlet built into PowerShell. The original PSCX cmdlet generated a random number between 0 and 1. So to generate a random number between 0 and 4, you could do this (again with the PSCX cmdlet) you could use: (Get-Random)  * 4. The smallest number generated would be .(and lots of zeros)1, and the largest .999999 etc. Multiply those by 4, and using interger rounding,  you have the random number between 0 and 4.

Well – to convert this to the built in cmdlet would, I thought, be easy.

Get-Random –Minimum 0 –Maximum 4

Except it did not seem to work right. If I ran this 100000 times, I only ever ended up with numbers zero through three. NO four. Then I looked closely at the documentation. Get-Random’s –Minimum specifies the smallest random number to be generated. The –Maximum parameter specifes a number such that the random number generated will be LESS than the maximum. SO the random number will be Greater or equal to zero, and less than 4.

So to create a random number greater than or equal to zero and less than or equal to four:

Get-Random –Minimum 0 –Maximum 5

Just goes to show, sometimes reading the documentation is useful.

Monday, January 04, 2016

Open Live Writer

I’ve been using MIcrosoft’s free Office Live Writer for several years – it’s a great tool for blogging. Just before Christmas, Microsoft announced that OLW was becoming Open Source and would be known as Open LIve Writer. Microsoft has foked the code and the OLW fork is now available via GitHub ( Open Live Writer is provided under a MIT license.

The move to open source has not resulted in a perfect product – initially there is no spell checker in OLW. The spell checker included in the OLW is old, and the license would not have allowed it to be released as open source. The team plan to update OLW to use the Windows 8 (and later) built in spell checker. Unfortunately this probably means no spell checking for Windows 7 users.

You can find more informatiou about OLW at the web site: This pagecontans a download link, along with details of the proejct, participants, etc. The code itself, along with a nice product road map are published over on the GitHub site noted above.

This is a great idea – thanks for saving this neat bit of software.

Saturday, December 19, 2015

Symbolic Links in PowerShell V5

I have been working today with a new feature in PowerShell V5 and the ability to create symbolic links. In Windows, a symbolic link is a file system item (i.e. a file or folder) that points to some other file system object (some other file system file or folder). The symbolic link is transparent to the user, although the UI does give some clues if you know where to work.

You can also create a hard link. A hard link is an item in file store whereby more than one path references a file in the same volume.

To create these links, you could do the following:
# Create Test Folder
Set-Location c:\Foo\SlTest
mkdir C:\Foo\SlTest
# Now a subfolder
mkdir C:\Foo\SlTest\Real
# And a real doc
1..10 | Out-File c:\Foo\SlTest\Real\foo.txt
# Now create a symbolic link
New-Item -ItemType SymbolicLink -Name .\virtual -Target .\real  
# And a symlink for a file
New-Item -ItemType SymbolicLink -Name .\SYMfoo.txt  -Target .\real\foo.txt
# You can also create a hard link
New-Item -ItemType HardLink     -Name .\hard.txt  -Target .\real\foo.txt
Once you run this (suitably amended for your environment possibly), you would see some thing like this in Explorer and within a PowerShell V5 window (nb: I am running V5 on a Server 2012R2 system with the RTM version of WMF 5).

PowerShell shows the three links in the directory listing (note  the 'l' in the mode column). Windows Explorer, however, only shows two link symbolic links. Explorer does not show an 'L' attribute for the hard link. The hard link is kind of cool, in that you can't really see it's there from Explorer. It really looks like the file, but as a different name. The symbolic links, on the other hand show up a bit more clearly in Explorer.

I find symlinks particularly useful in my training. For my PowerShell courses, I create a 4-VM 'farm', and use differencing disks to reduce the overlap in contents (Saves around 20 GB!). I create a symbolic link for the differencing disk (ie where it should be)  that points to the one copy of that file I DO copy.  Up to now, my setup instructions require the setup tech to run a batch file using Once PowerShell V5 is commonly available, I'll get rid of that and make the setup all PowerShell. Tags: ,

Monday, October 19, 2015

Azure AD As A Service

FINALLY, the news has broken about the new AD as a Service (ADAS for lack of a better acronym). I've known about this for some time, and have been eagerly awaiting the ability to comment. My immediate reaction is highly positive – it's a major missing bit of the Azure story. Azure customers I talk to want total flexibility in where to deploy servers – and often that means deploying them near to a DC/GC to handle authentication and other tasks. And while Azure AD was a nice feature to front end MS's Sass offerings, it really did not provide all the necessary features (not least of which are machine accounts, GPOs and of course OUs, the ability to support NTLM authentication and others).

But all that's changed – and we now have a fully fledged Active Directory cloud service. Like most  of Azure, you pay for this service based on usage. Depending on the size of your deployment you'll pay anywhere from $US 37/month (for up to 5000 total AD objects) to $Us 297.60/month for up to 100,000 objects. A forth tier (more than 100,000 objects) is available but no pacing has been announced for this tier. During the current preview period, only the mid tier 5000 to 25,000 objects) is offered a a half price rate of $US 74.40/month.

There are two blog articles on the AD Team Blog which describe things in more detail. – you can see both  at:

This is a big new feature of Azure and I really look forward to seeing it in operation!

Tuesday, September 15, 2015

Announcing: PowerShell PowerCamp – Oct 17-18 – London

I am pleased to announce another PowerShell PowerCamp for October 17-18th. To be held at Microsoft Victoria (Cardinal Place) London over the weekend. This is a lecture only 2-day boot camp covering the key aspects of PowerShell. Read on for more details.

What is A PowerShell PowerCamp?
PowerCamp is a fast paced weekend training event that covers all the basic aspects of Windows PowerShell - from the command line to writing production-oriented scripts. We start with the basics including configuration, formatting and providers and remoting and jobs. Then, on day 2, we look at scripting, work flows, managing script libraries using modules, WMI/CIM,  using objects, and PowerShell in Windows. The event concludes with a look at the new Desired State Configuration and other features in PowerShell 4 and 5. If time permits, we'll also take a quick glimpse at PowerShell in Server 2016, including Nano Server.

The PowerCamp event is a combination of lecture, demonstrations plus Q&A, with the opportunity to type along with the tutor. There are no formal labs. But key demos are provided along with the slides, plus a wealth of other add on material on a memory stick you get at the start of day 1. So bring along your laptop, and type away.

What is the Agenda?
The event happens over the Weekend of October 17th and 18th 2015. We start each day promptly at 9:00 and finish no later than 17:00.

Day 1 – The Basics

  • PowerShell Fundamentals – starting with the key elements of PowerShell (Cmdlets, Objects and the Pipeline) plus installation, setup, and profiles
  • What’s new in v5 – this looks at the things specifically added into PowerShell v5.
  • Formatting – how to format output nicely – both by default and using hash tables and display XML
  • Providers – getting into underlying OS data stores (certificate store, AD, registry, etc.) via providers
  • Remoting– working with remote systems using PowerShell’s remoting capabilities

Day 2 – Diving Deeper
  • Scripting Concepts – automating everyday tasks including PowerShell’s language constructs, error handling and debugging and workflows
  • Modules – managing PowerShell script libraries in the enterprise
  • Using .Net, COM, WMI and CIM objects – working with various kinds of objects
  • PowerShell in Windows – a look at what’s there and how you can leverage the huge number of cmdlets
  • PowerShell Desired State Configuration – this final module looks at PowerShell’s Desired State Configuration tool and what you can do with it.
  • A quick peek at Server 2016, including nanoserver.

What Does It Cost?
The cost is £225 (+VAT at the prevailing rate) for the weekend. Meals and accommodation are not covered.

Where Is The Event Going To Take Place?
The PowerShell PowerCamp is being held at Microsoft Cardinal Place, 100 Victoria Street in Victoria over the weekend of October 17/18 2015. Each day starts promptly at 09:00 and finishes up by 17:00. We’ll also take short break throughout the day, including a 1-hour lunch break on both days. The location is close to Victoria Station (railway and underground) with a wealth of lunch places and, if overnight accommodation is required, a range of hotels.

Who Should Attend?
Everyone who needs to learn more about PowerShell! PowerCamp starts from the beginning and we cover as much ground as possible in the two days available. In previous PowerCamp events, attendees have ranged from beginners to more advanced. Beginners benefit from a complete explanation of PowerShell, while more advanced user learn new tips and tricks to advance their usage of PowerShell. We've had several people attend more than once!

After Saturday’s session, attendees are invited to a small nearby public house for some lovely English ale and networking with each other!

Who is the tutor?
The PowerShell Weekend PowerCamp is delivered by Thomas Lee, a 17-time MVP award winner. Thomas has been involved in the PowerShell community since the very beginning. He provides training and consultancy around a range of Microsoft products, with a recent focus on PowerShell and Skye for Business Server. Thomas runs PowerShell training courses around the world, and has been a speaker at conferences across the world for the past decade. In his spare time, he lives with his wife, daughter, wine cellar, and Grateful Dead live recordings archive in a small cottage in the English countryside. His Twitter handle is @DoctorDNS and he maintains two blogs (Under the Stairs at and PowerShell Scripts Blog at

What do I need to bring?
In order to type along, you should bring a laptop with PowerShell, preferably PowerShell Version 5 , loaded. That can be either native (eg in Windows 10), or in a virtual machine. I suggest you have at least two VMs pre-configured – one a server installation the other a Windows client installation – with the server a DC and the client a member of that domain. The virtualisation software is not of concern – but you need 64-bit guest OS support for Server 2012 and later! Thus you can use Hyper-V, VMware Workstation or Oracle’s Virtual Box. Heck, run it in a VM on a Mac or Linux PC if you want. Just bring along PowerShell v3/4/5 (preferably V5!).

How do I book?
Contact to book a place and to arrange for the invoice to be paid. Payment must be in cash, cheque or bank transfer only no credit cards.

More Details
Watch this blog for any hot breaking news on the event. Tags: ,,

Tuesday, September 01, 2015

Azure PowerShell – Some Changes and Some Good News

I recently wrote a blog post, The Great Azure Cmdlet Renaming – Coming Soon, that noted the coming changes in the PowerShell module for Azure. Well – a few weeks is a very long time, when your clock is set to Internet Time! That article, and others, caused some rethinking within Microsoft and things have changed.

One key issue that the earlier plan raised was that it meant lots and lots of existing automation would need to be updated to take advantage of the later versions of the Azure module. I have thousands of lines of automation, all created using the ASM API. The big change is that, instead of renaming the ASM cmdlets, it's the ARM cmdlets that get renamed. Thus the impact is much less.

Towards the end of a long thread at, David Justice sets out the updated plan of action as:

  • Remove Switch-AzureMode and remove modal behaviour from Azure PowerShell
  • Re-factor the AzureResourceManager module into component modules by service and functionality (management vs. data plane by service)
  • Rename cmdlets in AzureResourceManager module from [Verb]-Azure[Noun] to [Verb]-AzureRM[Noun]  (e.g. Get-AzureRMVM).  Implicitly this means the Azure ServiceManager cmdlets in Azure PowerShell do not get renamed.
  • Distribute Azure and AzureResourceManager modules via PowerShell Gallery
  • Adding automated documentation submission to content team for publication (MSDN) upon release for all modules

There is a lot of detail in the Github post, which you should read, that explains the background and some of the details. The good news is that these changes should be available towards the end of September (2015), with Azure Automation updates at around the same time. As of the time of posting, I've seen nothing to suggest those time scales will not be met – but watch this space.

  1. All in all, progress and some good news. But confirmation of a bit of bad news too for ARM Cmdlet users)

Saturday, July 25, 2015

The Great Azure Cmdlet Renaming – Coming Soon

As many readers of this blog know, I am a fan of the Azure module – it makes it simple and relatively straightforward to automate just about all operations in Azure. I've written scripts to do all sorts of things, including creating LInux and Windows VMs, created web sites, worked with networking, etc. I have a lot of scripts out there – and soon, I am going to have to look at each and every one, and probably change most if not all of them. The Azure module is about to change in a very big way – and this could become work for some!

To understand the renaming that is about to happen, we must start at the beginning. In developing Azure, Microsoft created a REST API, the Azure Service Management (ASP) API. A set of cmdlets were created that interfaced with the API to enable automation via PowerShell of the Azure components like VMs. I use these cmdlets most days and they rock. There is room for improvement, but they work and work well.

But the Azure team created a second API, the Azure Resourced Manager (ARM) API. And the Azure module was changed to allow Azure ARM based cmdlets. The ARM API has a much different look and feel – and provides some features not available in the ASM version, particularly templates and resource groups. As an aside, I can only surmise that if thee Azure team were to go back in time, knowing what they know now, they may never have built the ASM API, going straight to ARM. But they didn't.

The impact to the user of the Azure module is how you call cmdlets targeting ARM vs. ASM. For a start, the two cmdlet sets were never meant to be loaded or used together. When you load the Azure module, you get a module of cmdlets, etc, that are targeted at the ASM API. To get to view the ARM based cmdlets, you use the Switch-AzureMode cmdlet, and  using the –Name parameter, you specify whether to use the expose  AzureResourceManager or AzureServiceManagement API based cmdlets. Both cmdlet sets feature cmdlets with the same name that do more or less the same thing, but are in compatible. You can't really mix and match between the cmdlet sets. With the latest Azure module, it looks like this:



As you can see, there a different number of cmdlets in each set, and when you use Switch-AzureMode, it removes one set of cmdlets and load a totally different module (where did that come from – we never loaded or installed an AzureResourceManager module! The magic of the Azure module makes this all work – and since scripts tend to only use one or other API set, no real harm done.

But it is confusing and from a pure PowerShell point of view, the basic design was flawed – it does need cleaning up. And, going forward, that is what Microsoft is going to do. In a post entitled Deprecation of Switch-AzureMode  in Azure PowerShell, Joe Levy spells out the need for the change and how it will happen.

The key changes are broadly as follows:

  • The Azure module will be renamed to “ASM”. And all ASM cmdlets will be prefixed with “ASM”, so Azure/New-AzureVM will become ASM/New-AsmVM or simply New-AsmVM.
  • The existing AzureResourceManager cmdlets will keep their existing names, so New-AzureVM will map to the ARM version.
  • The existing AzureResourceManager module will be broken into many modules by service and behaviour. Examples of the module names would be the following: AzureCompute, AzureNetwork, AzureStorage, …
  • Azure PowerShell and all of its modules will be distributed via MSI and PS-Get. MSI cadence will decrease because the MSI will be a wrapper for a PS-Get script.

So if you have written any scripts using ASM cmdlets, these will need to be updated to use the new cmdlet names. If you have written scripts using the ARM modules, these should not need to change much, but some change is inevitable (erg removing any Switch-AzureMode statements you have!).

If you have done ANY scripting with Azure and PowerShell, you should read the article carefully and start to work out your strategy for the updates that will be coming. The plan, at the moment at least, is that this will all happen over the next couple of months. The ARM decomposition should be done in August, and the Azure module rename will happen in September. Tags: ,,

Thursday, June 25, 2015

Azure Infographic

Microsoft has published a cool infographic on Azure which you can get from


This infographic provides a simple overview to Azure features, Azure services and notes typical use cases. The document is actually PDF file which means you can scale it up or down. I love this diagram as it shows all the key features of Azure. Plus it's up to date! Tags: ,,

Wednesday, June 24, 2015

Passing the Azure 70-532 Exam

I just saw a neat post describing how to study for, and pass, the Azure 70-532 Developing Microsoft Azure solutions. If you are planning on taking that exam, I suggest you see @shahedc's recent blog article: Lots of great advice! Tags: ,,

Tuesday, June 23, 2015

New Azure Pricing Calculator

Microsoft produced a basic pricing calculator to help Azure customers. But as you can see here, customer feedback on this calculator was not particularly positive. In the Azure training I do, I find partners too found this old calculator not overly outstanding.

But, MS has listened and has begin rolling out an entirely new Calculator. So far, there's a new calculator for Virtual Machines which you can access at: The VM calculator looks like this:


This is a distinct improvement – I look forward to seeing further improvements in the calculator. Tags: ,

Friday, June 12, 2015

Calling Console Applications from PowerShell

In some recent training, I challenged the attendees to 'throw away' Cmd.EXE and to use the PowerShell console for everything. A good concept, but they challenged me back with: But what about all those commands I used to use – I can't use them any more, such as Ipconfig. That caused them some concern.

But: it turns out that Windows console applications run pretty much just fine under PowerShell. While I prefer using GIP than IPconcig, the later sure is a lot faster and I confess to using it when I just can't stand to wait GIP to finish up it's work. Its' great that these commands just work in PowerShell - just about every Windows Console application runs just fine, although there are some exceptions (and work arounds!).

The first exception is where PowerShell parses the command's parameters and recognises some characters in the command invocation as special PowerShell syntax, rather than the syntax of the command itself. For example, BCDEdit.exe used a Guid, enclosed in "{}" to represent different boot entries – PowerShell sees the guid as a script block , not as some text that can be parsed by the command and thus fails. Most of the misbehaving commands can easily be tamed by using the trick I showed in my blog article: – just use the –% characters as the first text after the cmdlet name (following by the rest of the command's normal parameters).

The other exception is that Interactive console applications are not supported from the PowerShell ISE.  To get around this, just  launch the console application using "Start-Process <console application>" command. This launches the application in a new windows.

Yet another reason to stop avoid learning PowerShell today! Tags: ,

Sunday, May 24, 2015

Explore Cloud Storage with CloudXplorer

I've been working a lot with Azure Storage – creating some cool scripts/functions to demonstrate the use of Azure storage as well as managing my storage across several subscriptions. The lack of tooling has been a bit of a difficulty – the Azure Storage Explorer (on CodePlex: works, but I've found it pretty basic. And it fails to do a number of things for me (mainly remove old VHDs created during demos).

Today I found a new product: CloudXplorer, from ClumsyLeaf software. A commercial product (US$59, with larger numbers of licenses becoming cheaper per license). The product does, however both work across Azure Files, Amazon S3 and Google Storage! And it's fast.

After downloading and installing it you need to enter your storage account (and storage account keys) and then it looks something like this:


You can get the free trial from ClumsyLeaf's web site: It runs on Vista and above, and needs .NET 4. And, as I said, you need an azure, S3 or Google storage Tags: ,,

Friday, May 15, 2015

Managing Multiple Azure Subscriptions

Like many in the industry, I have multiple Azure subscriptions. When I create Azure resources, such as VMs, they are created in one of those subscriptions. However,  when I issue get-* cmdlets, such as Get-AzureVM, Azure only returns the objects in the 'current' Azure subscription, which can lead to some confusion (where did my VM go??).

Of course, when we look to making life easier for ourselves, we naturally turn to PowerShell. There is a cmdlet you can use to set a particular subscription to be the current subscriptions, which those Get-* cmdlets would then use. But that takes time – plus I seem never to remember the cmdlets and have to go discover the details.

To simplify things, I've written a short function that sets one of the subscriptions as current, which looks like this:

Function Set-CurrentAzureSubscription {
# Check minimum sub number
If ($subscriptionNumber -lt 0) {return 'Try again'}

# Get azure subs
$Subs = Get-AzureSubscription

# check the upper bound
If ($SubscriptionNumber -GE $Subs.count) {return 'try again'}

# set the sub as current
$Subs[$subscriptionNumber] |Select-AzureSubscription -Current
# and say so
"Subscription [$($subs[$subscriptionNumber].SubscriptionName)] set as current"

Set-Alias CAS Set-CurrentAzureSubscription

With this function and alias, I just type: CAS 0 to select the first subscription, and (in my case ) CAS 2 for the final one. Here's a look at using this:


As you can see, setting my current subscription causes Get-AzureVM to return different VMs! This function is now part of my $profile.

Tuesday, May 05, 2015

And Another Azure PowerShell Release

The other day, I joked via twitter that if you blink, you would miss yet another new Azure feature. Well nearly! Just 6 days ago, I noticed (and tweeted) that there was a new release of Azure PowerShell. Excitingly, the version was 0.9.0. Lots of changes (a total of 469 separate commits) and loads of new cmdlets. Release 0.9.0 has 625 cmdle5ts and 83 aliases (in service management mode), and 336 cmdlets in Azure Resource Manager mode.

Well, just 5 days later, Microsoft released an updated version of the cmdlets – I am assuming this is a drop especially for Ignite. The new build, version 0.9.1, installs nicely over the earlier build. The new version has 8 additional cmdlets in service management mode, but a total of 448 cmdlets in resource management mode (or 112 new cmdlets!). The new MSI weighs in at 19.9mb!

The main thrust of both 0.9.0 and 0.9.1 have been to add new cmdlets to Azure Resource Manager mode.  This involves using Azure Templates about which is a subject for another blog post!

Veeam FastSCP for #Azure – a Cool Free Tool

Those nice folks at Veeam have just announced a new, cool, AND FREE tool to help you manage filestore on Azure VMs. As most of you will know, It's not particularly easy to get data into an Azure VM and back out. As Veeam's blog explains: there are ways to achieve this, but they do take work. Their new FastSCP tool enabled you to copy local files to Azure VMs and copy files in an Azure VM to an on-premises system.

The tool has some neat features. All copy operations are secure, with no need for separate encryption or VPNs. You can schedule the copy commands. The UI is wizard driven and very easy to use. FastSCP, which as I noted above is in beta, runs on Windows 7 and above and needs the .NET Framework 4, and PowerShell 2.0 or later. You can register for the download here:

One small thing: this tool copies files from and to VMs, it does not support copying files to Azure's Blob or File stores. It would be cool if the final version of FastSCP enabled that! Tags: ,,

Wednesday, April 29, 2015

Jeffrey Snover AMA – A must watch!

I've just finished a most enjoyable couple of hours watching An AMA (ask me anything) interview with Jeffrey Snover, Microsoft Distinguished Engineer and inventor of PowerShell. Jeffrey and his teams) have brought about some awesome changes in terms of manageability of Windows systems. Anyone who has seen Jeffrey speak, know he is an amazing presenter – always full of interesting stories and a passion for helping us to be successful using Microsoft Tools. He is one of the best speakers at Microsoft, IMHO.

This two-part interview (part 1 here and part 2 here) has Jason Helmick ask Jeffrey a bunch of really interesting questions – ones that I see often when teaching PowerShell. If you've taken any of my PowerShell courses, many of these will not be new, but Jeffrey's spin on the question is absorbing and his vantage point unique. Things like, what were the obstacles he faced delivering PowerShell, is the information about PowerShell V3 relevant to PowerShell v5, why the V1.0 in the $Pshome path for PowerShell V5?, etc. Stuff any respectable IT Pro should know.  My question would have been: Does he still carry the 20 dollar bill? He'll know what that is a reference to!

I highly recommend taking some time to watch these two videos. Doubly so if you want to get a better understanding why PowerShell is the future of Windows management. Tags: ,

Tuesday, April 28, 2015

Azure Machine Learning – Free eBook from Microsoft Press

Microsoft Press continues to pump out cool free e-books on Azure. The latest is Microsoft Azure Essentials: Azure Machine Learning (ISBN 9780735698178), by Jeff Barnes. It's the third of what I sure hope is a long set of free e-books.

At present, this e-book is only available in PDF, but Mobi and ePub are meant to available soon.  As described over on the Microsoft Press blog, you can download this book in PDF Format (here).

Monday, April 27, 2015

Azure Virtual Networking – An MVA Course

I taught an Azure class week to a bunch of architects who were fairly new to Azure. It seemed to me that one of the subjects they had the most trouble getting to grips with was Azure Networking. Interoperating with Azure VMs (in a service and in a vnet) and Azure Paas instances is just different from on-premises networking, what with VIPs,DIPS, the complexity of VPNs, etc. There is nothing that can't be learned, but for seasoned architects used to on-premises networking many of the fundamentals are just plain different.

I see that Microsoft's Virtual Academy has brought out a course on Azure Networking, which you can find here: This course covers Virtual Networking in Azure. Basic networking inside VMs is not covered however – and that would make a great MVA course.

One small comment on this course (and some of Azure documentation) – there are not enough pictures. As this course progresses, I'd have liked to have seen more pictures containing the details. Nevertheless, the material is well covered.

This  course has four units:

  • Introduction to Azure Networking Basics and VPN requirements
  • Plan and Design your Cloud Network Infrastructure
  • Configuring Azure and On Premises
  • Testing connectivity and Monitoring

Each module has a video – in the 4 modules the videos last around 55 minutes. Each module also has a slide presentation you can download and a short assessment to test your learning. Tags: ,

Monday, April 13, 2015

Azure Resource Explorer

Microsoft has just issued a very cool new Azure Tool: Azure Resource Explorer. This tool is a web site within Azure: navigate to and you get to the base.

Once you have logged in, you can use the tool to discover the Azure Resource Management APIs. These APIs are implemented as Rest APIs, where the URI is used to specify a specific resource, and JSON is used to hold the details of this resource. If you understand REST APIs, the concept is well understood. But if you come from a more traditional IT Pro background ('no developer foo foo here thank you"), understanding both Rest and the Azure REST APIs can be quite useful. And for those of you who smugly import the Azure module – remember that these cmdlets merely wrap the REST API. Running a cmdlet simply invokes the REST API.

The tool also enables you to view the API documentation. This is a fantastic bit of assistance for the developer, or an IT Pro who wants to use the API directly within a PowerShell script. Having said that, the documentation is not overwhelming. It is incomplete in places and in others, it's pretty thin. But this is something that no doubt will improve over time!

The final cool feature of the Tool is the ability to actually make API calls to your own Azure subscriptions.  When you first open up the Explorer, you notice a tree control in the left most pane – this is the resource hierarchy tree. You can use the tree control to open up lower nodes, such as the configuration of a single VM.

Here is a screenshot of one of my Azure VMs. I have blacked out the subscription ID, but the rest is as you would see it. If you notice, the shape of the hierarchy in the tree control matches the shape of the URI. This is, of course, normal REST practice – but seeing it both as a URI and a tree helps me to visualise the resources.


In the screen shot, I show one VM. In the right pane you will see the 'data' relating to a resource. In this case, it's the details of a VM. The URI/Tree control points to a specific subscription and a specific resource group and to the VMs in that group (in this case just one). That VM has a bunch of properties (hardwareProfile, networkProfile, etc). The details of the resource, the VM, is expressed in JSON. If you issue an API call (eg a Get on this URI), you will get a JSON document back – and then use ConvertTo-JSON and ConvertFrom-Json cmdlets to interoperate with the data used with the API.

One final cool feature of this tool. If you look carefully ad the details of this VM – the line numbers in the JSON document are not fully contiguous – that's because I used the region folding feature of the explorer to hid details. Just click on the chevron to the right of a line number to hide/reveal what is below. Someone put a lot of thought into this explorer. 

I hope further work is done, particularly in terms of improving the API documentation. But an even cooler feature  would be to enable the Explorer to spit out a working PowerShell snippet to interact with the API. Much like MOW's old WMI explorer that showed you how to use WMI Methods. So you navigate to the resource you want to manage, select the HTTP Verb (Get, Put, Post, Delete) and then see how that verb would used against API expressed in the URI. It would include setting up the HTTP call, making the API call, then using the data from returned JSON.

Tuesday, April 07, 2015

Using the DSC Resource Kit – Hot Fixes may be needed

It's that time of year, and with some upcoming PowerShell classes to teach, I've been rebuilding my classroom lab environment. Turns out the client wants some DSC content, and accordingly loaded the latest build of the DSC Resource Kit. What a wonderful set of extensions – I love the speed at which these evolve.

But once I'd loaded the Resource Kit on the 'client' box, I was not able to see any of the new resources. I could see the modules containing the resources, but not the DSC Resources themselves:


But a quick question on both Spiceworks and's forums and the answer was easy. My rebuild of the lab had installed the RTM version of Server 2012 R2. For the resources to become available, I had to install three specific hotfixes:

  • Windows8.1-KB2894179-x64.msu
  • Windows8.1-KB2894029-x64.msu
  • Windows8.1-KB2883200-x64.msu

You can get all three from: OH – and be careful of the order you install them – read the KB article carefully! Tags: ,

Thursday, April 02, 2015

New Version of Azure PowerShell Module

As I was writing another blog post last night, I discovered that the Azure PowerShell module has been updated – the new version is 0.8.16. The Azure module now boasts 606 cmdlets (and 35 aliases).  The updated module has some new cmdlets (notably for Azure Insights), bug fixes and some changes to the Azure Websites cmdlets that partly reflect the removal of Web sites and their replacement (web apps).

You can get the updated module from This page features a download link to both the (updated) web platform installer and to a standalone MSI for just the module.  The page also has some more details on what's new.

Interestingly – the updated module still supports for Azure web sites (e.g. New-AzureWebsite) despite the GUI (the Azure portal and the Azure preview portal) having dropped these in favour of the newly announced Web Apps functionality that in effect subsumes the older Web Sites feature). The Azure portals no longer show Web sites, whereas the cmdlets still support the feature. One noticeable and important difference here – the web site cmdlets do not appear to support the gallery function. So while creating a web site is pretty trivial, creating it via a gallery (e.g. a WordPress site complete with MySQL) does not appear possible (yet).

Tuesday, March 31, 2015

Creating a Web Site with Azure's New App Service

Once neat feature of Azure, that I love demoing, is the ability to create a simple web site, backed with tools such as WordPress. You could create this pretty easily using the wizard – either create a bare bones IIS web site, or pre-load it with a variety of packages from the gallery – Simple! Azure Web sites – however they are now so last week!

By that, I meant that last week, Microsoft announced a huge new feature: Azure App Service. This feature is, an evolution of the old Web Site and Web/Worker Role features. Those old features are gone from the UI. IN the old portal it now looks like this:

image As you can see, there is no explicit option for Web Sites any more. The website option is now a subset of Web Apps.  And it turns out to be almost as easy as it used to be!  I now show you how to create my standard WordPress sample site using Azure Web Apps. You do it as follows:

1. Open the Portal, click on Web Apps and then click New:


2. From here, you can click on the From Gallery and get a popop:

image 3. I just scroll down and find the WordPress gallery item:

image 4. With WordPress (or any other gallery item you want to play with) selected, I click the arrow at the bottom right of the popup. This brings up an application configuration screen:

image 5. As you can see, I've filled in the basics: site name (defaults to a site within the domain), database details and where to put the db (and the account used to bill this web site!). Once filled in, it's another click on the right arrow where you can specify details of the MySQL database (and agree to the terms and conditions):


6. Finally, click the check icon at the bottom right of the screen, and the application (aka web site) will be created. Once that is done (it takes a couple of minutes to create a new web site and  My SQL database), you can then logon and install/configure WordPress. And then you canstart to blog. I'll leave the details of creating a Wordpress site as a topic for other sites! But here's the site with literally 2 minutes work:


In summary: while the explicit option to create a web SITE is gone, it's very simple to create a simple web application that just consists of a single web site. Web sites are dead, long live web applications… Tags: ,,