Friday, July 11, 2008

PowerShell naming conventions

Well, as you probably all know, PowerShell is using verb-noun naming convention.

I really love it. In fact I use it for few years already (Install-Server.cmd, Get-Users.vbs etc).

Obviously I used it only for naming scripts (well, I used it also for functions, but that's different story). Problem with PowerShell is that many names that I really like are already used :( For example New-Object (that's one I really need now ;)).

So I decided to use some kind of namespaces. My current project is called Solution4 Maintenance (short S4M), so I am using
S4M:New-Object or S4M:Move-Object. It is obvious and I can use names that fits me best.

Another advantage for me is that I can easily use
Get-ChildItem Function:\S4M:* to see all functions that are available.

Which naming convention do you use for your scripts? Really curious about it :)

No comments: