Recently I was reworking a script for someone at Spiceworks, you can read about it here. But some interesting things came up and I wanted to talk about it here. It’s about functions, and when and how you should use them. Read on to hear my take on the subject.
Continue reading →
January 3, 2013
Posted by Martin9700 |
Powershell - Best Practices | Best Practices, Functions |
3 Comments
I have to be honest, I’m a bit of a perfectionist. I like things neat and tidy, and I have to be honest, I see a lot of Powershell code being posted on the Intrawebs that drives me crazy. I’ve kept my peace, my mouth has been shut and I let things slide. I have. I haven’t said, wtf are you thinking? How the hell is anyone supposed to know what this is doing? I sure as hell ain’t gonna run it to see what happens! But no more. Time to put down here a couple of things I do in Powershell to try to make my code a little easier to access for the average admin. Clearly you should be doing it too. Surly Style.
Continue reading →
December 31, 2012
Posted by Martin9700 |
Powershell - Best Practices, Powershell - Getting Started | Alias, Best Practices, Comment, Indent |
2 Comments
Powershell Best Practices – Surly Style
I have to be honest, I’m a bit of a perfectionist. I like things neat and tidy, and I have to be honest, I see a lot of Powershell code being posted on the Intrawebs that drives me crazy. I’ve kept my peace, my mouth has been shut and I let things slide. I have. I haven’t said, wtf are you thinking? How the hell is anyone supposed to know what this is doing? I sure as hell ain’t gonna run it to see what happens! But no more. Time to put down here a couple of things I do in Powershell to try to make my code a little easier to access for the average admin. Clearly you should be doing it too. Surly Style.
Continue reading →
December 31, 2012 Posted by Martin9700 | Powershell - Best Practices, Powershell - Getting Started | Alias, Best Practices, Comment, Indent | 2 Comments