Tag: career

  • The Powershell Challenge Day 9 – The Pipelines, deeper

    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.

    The authors note this is an optional chapter, one that isn’t necessarily one you need to read. After going through it, I’m not sure I agree, especially as I’m not completely sure I grasp all the contents, though I do think they will be handy.

    When you pipe output from one command to another in Unix, it’s really a text stream. Just as it would be written to stdout, it’s sent to the next command. That means your commands need to handle text as inputs.

    In PoSh, if I understand this, that’s not the case. The inputs into commands are through parameters for the most part. That means that the output from one command, which is a collection of objects, needs to be accepted in the next. For many commands, that doesn’t quite work.

    There are two methods of sending in parameters. One is input ByValue, which is a parameter binding method. In this method, PoSh looks at the type of parameter being sent in, in essence the object type (or data type) and matches to a parameter if the parameter accepts pipeline input. Not all do, and you need to read the HELP for a command to see which parameters accept pipeline input. That seem mis-named to me. It’s ByType, not ByValue in my mind, but I’m certainly not a PoSh expert.

    The other way is ByPropertyName, which is as it implies, by name. The object coming in has its name matched with the parameters of the command on the other side of the pipeline.  That makes more sense, though there are times that the names don’t match.

    That’s where you can then create custom properties with the Select-Object syntax that creates name/value pairs from your input. It looks like handy, not too complex, but cumbersome syntax. I’ll have to play with this more as I had to work through some exercises and carefully watch my parens and braces (opening and closing) as I typed in some commands.

    One thing that frustrated me slightly with these exercises is that a bunch of them looked at multiple machines, and I don’t have a domain at the present time with matching credentials. I couldn’t figure out (easily) how to connect to another machine with custom credentials for Get-Process and Get-Service, but I also was running short of time this lunch, so I skipped.

    The lab was analysis without using PoSh, since many people reading the book might not be admins on a domain. I got most of the answers right, but not always the explanation. I certainly think I need to play with this more, and that means I’ll stand up a domain here soon that I can use. I need to do that anyway.

    The custom properties, along with the introduction of parens for order of operations, make this a must read chapter for me. I think the authors shouldn’t caveat this one at all.

  • Powershell in a Month Day 8 – Objects: data by another name

    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.

    What are objects? I’ve always found that to be a hard question to answer if I’m talking to someone that doesn’t understand how to program. The explanation here is simple, relating each row of results to an object, and the entire result as a collection. It’ s a little simplistic, but it works for Powershell. The whole idea, really, is to understand that these objects have types (each field or column) and those types matter because they affect what we can do with the output of each part of a PoSh process.

    Get-Member is the big introduction here, to help you find out what the properties and methods are for these objects. I have the feeling this is handy because when things don’t work right and you are debugging, Get-Member (or gm) is probably very handy. The other commands that are introduced here and are handy are the SortObject (or Sort) and Select-Object (or Select). These are easy concepts for me, because the way they work, with multiple columns and ascending or descending (-desc) are very similar to SQL Server.

    Overall, it’s a short chapter, but I feel like it’s starting to be more useful. I can pick and choose, easily, which columns I want, sort them, and find the various ways I can interact with an object. The lab was easy, feeling more like writing simple T-SQL queries than anything else.

  • Sabbatical

    It’s time.

    At least, it’s the year for me. I’ve worked at Red Gate for 5 years now and I’ve earned a 6 week sabbatical. My boss asked me recently what I might do, and I wasn’t sure. I haven’t really thought much about what I’d want to do with a sabbatical, and so I did what and modern IT pro would do: I asked Twitter.

    It didn’t turn out so well, but perhaps because I hadn’t defined very well what a sabbatical is. It’s not a vacation, and not a 6 week break from work involving the XBOX. Our CEO scored a number of sabbaticals (see the image below from the Book of Red Gate) in terms of what they accomplished. As you can see from the scores, the idea of the sabbatical is that is provides you a break from work, but that break should be spent somehow trying to improve or grow yourself.

    sabbaticals

    Note that this isn’t necessarily based on work, though it could be. For example, I could write a book, or make a serious attempt. I have had a few ideas, such as spending six weeks working for a charity full time. Perhaps I could find an intensive course in some subject that I’d tackle for short period of time. There are lots of choices, but I have a few restrictions as well.

    I can’t travel and leave home for a substantial period of time. My wife’s business is busy during the summer and I need to be available to help manage the ranch and kids. I also travel enough that I’m not looking to be out of town more than I already am. It also isn’t a once in a lifetime event (hopefully), so I’m not looking to spend $10,000 or more for some growth at this point in my life.

    I am looking for ideas from people, as are a few others that have sabbaticals available from Red Gate.  I have options, but I’d like to think deeply about the pros and cons of my choices, and take this seriously as a chance for personal growth. Six weeks isn’t a lot of time, but it’s more than I’ve ever taken at a time away from work in decades. I greatly appreciate the opportunity that Red Gate is giving me, and don’t want to squander my time, or their money.

    Note: lots of companies offer sabbaticals as a benefit, including Microsoft.

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 3.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.

  • The Holiday Challenge

    It seems as though I’ve seen many protests and complaints this past holiday season about the extra hours the some retailers were requiring of employees. It started in the US just before Thanksgiving with protests about some stores opening on Thanksgiving day, and it continued through the Christmas season as a few brick and mortar companies decided to stay open 24 hours a day until the holiday.
    For most of us that work in technology, the holidays can be a mixed blessing. We could have a slow time, as other people in the office work less and make less demands of us. We could also be more busy as the slow times mean opportunities for maintenance or enhancements. I’ve even had extremely busy times as we worked the New Year’s holiday to get applications ready for use on Jan 1.
    There was a survey recently and a report that said many IT people don’t get a break during the holidays. They find themselves on call, or responding over the holidays when things break. I’ve certainly experienced this, especially when managers have viewed holidays as a perfect time to take systems down that are otherwise being used heavily by our business. I suspect that much of the impact to IT depends on your particular business and how your systems are used during holidays. If you work at Amazon, I wouldn’t expect to have holidays off.
    The one thing that the survey mentioned people wanted to see changed most was a reduction in the amount of fire-fighting that they perform. It’s no fun when things are permanently broken, and even less fun when you respond to the same issue over and over without actually fixing something once. I certainly have found myself looking for other employment when the amount of fire-fighting time exceeds the amount of enhancement time.
    I hope that the holidays were not too stressful or busy for you, and you have a bit of a break. If not, perhaps it’s time to think about how you might want to change things for next year.
    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 2.5MB) 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.