(I cannot believe that I am actually asking about this, but I am not able to do it during the day.)
I just wrote my first serious PowerShell script, and I'm really happy with it. I plan to use it every day or so. I want to be able to call it from the Posh command line. I will give it a noun verb type name, but at the moment it is a simple .ps1, and not one of those fancy advanced functions that take parameters, etc.
So where should he go and what should I call him from the Posh command line? I plan to write more! Where should they go?
- Should there be a function in my profile?
- Should he go my way?
- Does this happen in PSMODULEPATH? What is happening there? Does it look recursive or is it like a regular PATH?
Where do you all put your PowerShell scripts and how to organize them? I have a lot of experience creating C # and C ++ tools and know how to name them and where to place them. And on the other hand, I made a lot of crappy .bat files that are usually standalone or heaped in some kind of folder. But PowerShell seems very different. You can make a crappy file like file in it very quickly, or you can create libraries and complex services with it.
I would really like some ideas on how I should start organizing these things before I begin. Obviously, everyone is different, so I hope for some discussion. Thank!
powershell
scobi Jun 18 '09 at 7:22 2009-06-18 07:22
source share