Tag: career

  • Powershell in a Month – Day 6 The Pipeline

    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 6. This is where I found the idea of Powershell getting interested. I used pipes extensively back in my Unix and DOS days, and have heard that these are important in powershell.

    The pipeline (|) essentially takes the output of the left command and sends it to the right. The first examples are with exporting data, such as:

    Get-Service | Export-CSV services.csv

    This command would run the Get-Service command to get a list of services, then send that output to the Export-CSV command, which would create a file, format the data in CSV format, and send all the data from the Get-Service command into the file. Simple, easy and it makes sense. There are also Export-CliXML, -FormatData, etc. commands. On my system I even have an Export-VM  command for Hyper-V. I can start to see possibilities.

    This is different from the redirector (>), which is essentially running the pipe to Out-File, a command to create a file. There are other Out-* commands that send data other places, like printers, the screen, etc. Why does it matter that you have these commands? Well, mainly because you might want to alter some parameters, like display width, encoding, etc. Having a real command build allows for parameters, and control, and thus, customization.

    Powershell is all about customization, and being able to repeat that process. This chapter gives the basics of controlling your flow out output, including to other commands. For example, one of the things the chapter has you do is

    Get-Process -name Notepad | Stop-Process

    A fancy way to kill a process. It does warn you not to forget the -name parameter, as that would be bad. I was tempted to try it on a VM, but I know what will happen, so I didn’t bother. For commands that might cause problems, the chapter goes over the -confirm and -whatif parameters, which, respectively, ask you questions to confirm your actions, and show you the action without performing it. The lab for the chapter has you dig into other parameters, like appending to files (noclobber) using the default regional settings (useculture) and changing the delimiter for export. I actually found these lab exercises to be slightly challenging, but also handy. I got to use the help system and proved to myself a bit that I’m learning how to use PoSh.

    Overall, no great leaps in knowledge here, but I find myself gaining some confidence that I understand how PoSh works, how to manipulate the environment a bit, and I can see the possibilities of using the pipeline to string commands together and manage more than a simple stream of output data.

    The next chapter looks at more involved strings of commands, and I’m looking forward to that one.

  • The Challenge of Time Off

    I’ve been working full time for most of my life. Since I was 16, I’ve rarely worked less than full time, and often worked substantially more. There are times I’ve had two or three jobs, though fortunately I think those days are behind me. I have a great job now, perhaps the best job in the world, and I get a generous vacation allowance. However I do struggle to take time off some years. That’s my issue, and I’m working on trying to make sure I get away from work more. I appreciate the time off, but I also enjoy my job and the interactions I have with the community.

    However not everyone is in the same situation. There are plenty of people out there that get limited vacation, little support for taking time off from employers. There are those consultants that are self-employed and struggle with taking time off when it means they aren’t paid for that day. I’ve been in all of those situations, and here’s my advice.

    If you don’t think you get enough time off, then look for another job. The same thing applies if your boss doesn’t want to allow you to take the time off you are allotted. There are bad managers out there, and companies that look to take advantage of their employees. You can live with it, you can complain, or you can move on. The choice is up to you, but that’s what I’d do.

    I realize it’s not easy to just get a new job, but you can make a plan and move on. My wife and I did that, though it did take years. Life is short, but hopefully still lasts for many years. Making plans across years is the way to improve your situation over time, though you should still work to appreciate and enjoy the journey along the way.

    If you’re a consultant, the only thing I can say is that you need to budget. You need to limit your expenses and plan for vacation. The amount you bill may be out of your control, but you should have some idea of a range and you your expenses, your living standard, should be based on a number that allows you to take some time off each year. If it doesn’t, you can improve your skills and bill more, or find ways to reduce your expenses.

    I know this can be tough advice, but ultimately you are responsible for your life. You may be dealt a bad situation, but it is up to you to make the best of it, and learn to live within your means if you want to avoid the stress of overwork.

    Steve Jones

    Video and Audio versions

    Today’s 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.

    Follow Steve Jones on Twitter to find links and database related items and announcements.
    Steve Jones Windows Media Video ( 22.7MB) feed

    MP4 iPod Video ( 26.2MB) feed

    MP3 Audio ( 5.3MB) feed

    Feeds are available at iTunes and Mevio

    To submit an article, rant or editorial,
    log in to the Contribution Center

  • Powershell in a Month– Day 4 and 5 – Providers

    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 4, and 5. This wasn’t a long chapter, but it came right around travel and vacation, and as a result, I ended up taking about 2 hours across multiple days. Mostly because I had to re-read things and re-type them. As a result, I’m marking this as two days. Plus, this will now line up the chapters.

    Providers are the “drivers”, I guess for Powershell. They allow you to interact with various systems through the Powershell commands. Another way of putting it is that they take some item and make it look like a file system. This means you can navigate the registry (with the registry provider) like your disk with CD, DIR, etc. It’s also why you can move through SQL Server in a folder-like hierarchy.

    This was a short chapter, and I’m not sure why it took so long, but I moved slow going through the exercises to creates files and folders, learning to use the New-Item or Set-Location commands instead of the mkdir or cd ones.  I did find this interesting.

    The lab exercises were easy, and once I could focus, I got through them quickly.

    The next chapter is pipelines, which is where I think the power of PowerShell starts to come through.

  • PVPs

    I had it happen to me. We had an SSL certificate for a website that one of my employers ran. I actually purchased the certificate, and it secured our communications for a couple years until one day it didn’t. The certificate expired and the website stopped accepting connections. If I had noticed, it might not have been a big deal. However when the owner of the company gets a call from one of his large customers, it’s an much bigger issue.

    If you worked at Microsoft last year when their security certificate expired, it was an even bigger deal. It’s not that an affected customer that sends a note; it’s affected, unaffected, and potential customers that hear about the issue from the media. It seems like tracking private virtual properties (PVPs) ought to be easy, but it’s not. As pointed out in this piece, there are a number of issues at an organizational level, and while there are fixes, it takes some effort.

    In many businesses that have periodic activities required for physical assets, there are often people dedicated to tracking, or performing the activity. Mechanics know about maintenance on vehicles, accountants renew leases, workers replace equipment nearing the end of service. Often the time lines and activities involved are understood, and individuals understand their responsibilities.

    This showcases another area in which technology is woefully immature. Need a certificate? It takes a person with specialized knowledge to understand what’s needed, purchase it, and install it. This person either then moves on to a new role without leaving instructions behind, or isn’t well equipped to understand the need to track the expiration and replacement of the technical item. There often isn’t even a system set up to handle replacements of these items, which might be superseded or replaced by some entirely new type of technical wizardry.

    Managing and tracking PVPs is hard, and I suspect, going to get harder. Security requirements increase, technical requirements grow, and specifications change. I’d like to say I’m confident Azure (or AWS or another large service) will never have another outage because of this, but I wouldn’t be surprised if they do.

    Steve Jones

    Video and Audio versions

    Today’s 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.

    Follow Steve Jones on Twitter to find links and database related items and announcements.
    Steve Jones Windows Media Video ( 20.5MB) feed

    MP4 iPod Video ( 23.9MB) feed

    MP3 Audio ( 4.9MB) feed

    Feeds are available at iTunes and Mevio

    To submit an article, rant or editorial,
    log in to the Contribution Center