SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Powershell in a Month – Day 3 – Commands

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

Day 3, chapter 4.

This one is about commands, and getting familiar with what a cmdlet is, the naming convention, and how to call things. Again, simple stuff, but knowing that most everything is a Get-xx, or Set-xxx, or New-xxx, etc. is handy. I think the hyphen separation actually makes things easy, though the completion in the ISE and with tab is very handy.

The big thing here is the parameter naming and cmd.exe execution. I wasn’t always clear on how parameters work, but this chapter helped. In this case, unless there’s punctuation or spaces, you don’t need quotes. That’s handy. I also like that the shell is explained in reference to cmd.exe, which is the command prompt that so many of us use.

This was a short chapter, a quick skim, and I made sure that as the authors talked about commands, aliases, etc, I ran all the code. When I got to the end of the chapter, I was able to actually solve all the exercises without using any references. I used help to look up commands (like Get-NetFirewallRule), but otherwise, I was able to solve all the exercises in about 5 minutes.

I felt successful and more empowered today. It’s getting a little exciting, and I can see where this will be very helpful over time.

Filed under: Blog Tagged: career, powershell, syndicated

The Voice of the DBA

Steve Jones is the editor of SQLServerCentral.com and visits a wide variety of data related topics in his daily editorial. Steve has spent years working as a DBA and general purpose Windows administrator, primarily working with SQL Server since it was ported from Sybase in 1990. You can follow Steve on Twitter at twitter.com/way0utwest


Leave a comment on the original post [voiceofthedba.wordpress.com, opens in a new window]

Loading comments...