Very informative articles. Thank you for sharing!
There is a minor error that threw me for a bit of a loop. In listing 2.3, you mention the code to load the Extended SMO assembly is:
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo.Extended")
This did not work for me. I read a bit further, and noticed in Listing 2.4, the code is this:
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SqlServer.SmoExtended”)
Listing 2.3 has an extra period between "Smo" and "Extended". Removing it allowed me to get the desired output.