Author: way0utwest

  • Powershell in a Month Day 14 – WMI

    This is part of my Powershell Challenge, to learn more about PowerShell (PoSh) using the Learn Windows Powershell 3 in a Month of Lunches book by Don Jones.

    Day 14 introduces us to Windows Management Instrumentation (WMI). Since many people might not be familiar with WMI, the chapter spends a little time trying to help you understand what WMI is.

    I know what it is, I hate it, and I agree, it’s a PIA. It’s a mess, it’s inconsistent, and I’m not surprised the Powershell barely integrates with it. As with the cmdlets, this shows that there are the WMI cmdlets and the newer CIM cmdlets. The old ones like

    Get-WMIObject

    are somewhat deprecated. They work, but no development is being done. Instead, we need to use

    Get-CIMInstance

    That makes sense to me and I understand it. With no legacy work, I don’t think I have any issue with using Get-CIMInstance, though I do hate the idea of querying the WMI spaces. They’re a mess and nothing is intuitive.

    gwmi -class win32_bios -computer localhost,JollyGreenGiant | format-table @(l=’Host’;e={$_.__SERVER}

    There’s more to the table, but that’s all I typed in to test. I did a few more queries, with this and Get-CIMInstance to practice, but most of this chapter is really just understanding how WMI is organized to look for things and then formatting the results. Easy enough to do, a little boring, but good practice with expressions.

    The lab was annoying, mostly because it’s asking you to figure out which WMI classes to query. I googled around for some, and found them, but mostly this is annoying. I can certainly see where it’s handy to understand how WMI queries work, but like most people, I prefer to avoid them.

    Short chapter, easy, and good practice formatting things.

  • Adding to SQL Server

    The next version of SQL Server will release in a few months. Most of the development is complete, and the feature list is set for SQL Server 2014. However there is work already underway for a version of SQL Server that will likely release in late 2016.

    Each product cycle brings with it new capabilities and enhancements to existing features. Despite the large resources that are devoted to SQL Server, we also find that choices are made and some features, functions, or tools that are ignored. As get ready for the release of SQL Server 2014, I wanted to ask you to look beyond this version.

    What feature, area, or tool would you like to see enhanced in SQL Server 2016?

    As I review the list of changes in each version, I find myself as disappointed as I am excited. The new features are interesting and bring about new ways to build on the SQL Server platform, but I find that so many existing areas receive little work and don’t mature over time.

    Service Broker has never had good tooling, and despite the fact that it underpins many features, and is a fantastic way to scale SQL Server, it seems to be largely ignore with each new release. Replication is barely changing, and spatial data seems to be a very low priority. Perhaps the most disappointing area for me is Management Studio, which seems to get the bare minimum of changes each version to support new features.

    The Connect system allows us to communicate with the SQL Server team, but the signal to noise ratio seems so low that I suspect the product managers don’t find it very useful. However if you could set a priority in one area for the next version of SQL Server, let us know what it would be in the discussion below.

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 2.4MB) podcast or subscribe to the feed at iTunes and Mevio . feed

    The Voice of the DBA podast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

  • Starting to Use Powershell

    I have to admit that before the Powershell Challenge, I wasn’t really looking forward to using Powershell for much of anything. It looked cumbersome, I didn’t always understand how sample scripts worked, and it was just easier to use the various other Windows tools to accomplish tasks.

    However as I’ve been working through the Challenge, I’ve started to gain some comfort with the language, conventions, help, etc. This came into play recently as I was beginning to set up a new domain for some testing and demos.

    I installed Server Core and went to configure a domain, which means static IP addresses and more. Once I had Core installed, with no domain and no other tools, I was slightly stuck. However I googled and when I found things like

    Get-NetAdapter

    and

    Set-NetIPAddress

    I wasn’t at all deterred. I could easily read and understand the way these commands work, how parameters are applied, how precedence matters with parens and piping works. Even a restart was quick with

    Restart-computer

    or

    stop-computer

    When I needed to verify which machine I was actually working on

    $env:computername

    was a quick way that worked well.

    The whole world of Powershell starts to look easier as I go along. The slow movement through the book has made me more likely to run a quick search and type a command than use the GUI for a number of server-level tasks that I’ve needed to do.

    It’s a neat new world for me.

  • Software Patents

    I highly dislike the current patent system in the US. I think awarding patents for an idea like “1-click purchasing” is a poor practice that discourages innovation. There are numerous problems with our patent system, not the least of which is that it can stifle new ideas and prevent small companies from building on similar ideas that are, well, what I’d all common sense. I don’t quite share Richard Stallman’s view of software patents, but I do think we have fundamental flaws in the way we handle this intellectual property.

    I do, however, think that software has value, and the work we do as software engineers deserves compensation, as noted in this post. We should have some patents, and we should reward those that create truly innovative, and not common sense, ideas in the digital world. How we define those, and how we measure innovation isn’t clear to me, but I do think that non-trivial ideas deserve protection.

    Our legal systems around the world are slow to catch up to the digital world, and may never do so. As quickly as we can debate patents, copyright, trademarks, and more, the digital world grows, expands, and changes to stretch and challenge our thinking of how the world works. It almost seems as though digital ideas and software defy analogies and explanations that we can relate to the real world.

    I don’t know how I’d change patents, but I don’t want them to go away completely. I do, however, know what I’d do with copyright. I’d change it back to the original system we had, granting 14 years exclusivity to creators, with a single option to renew for 14 years and that’s it. The world certainly changes too fast to wait 95 years to use someone else’s work.

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 2.4MB) podcast or subscribe to the feed at iTunes and Mevio . feed

    The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.