Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are good guidelines for naming PowerShell verbs?

I'm early on in my PowerShell learning, and I'm wondering if there are some good guidelines for verbs in Posh for cmdlets (or advanced functions, whatever they're called in CTP3).

If I do a get-verb I can see the lot of them. But I'm still not sure how I should lay out my modules.

Here's the example I'm running into right now. I have a little script that asks Perforce: if I were to sync, what files would change and how big are they? It outputs a summary of sizes and a mini-tree of folders for where the changes will occur (as well as how many would need resolving).

Is that a query-p4sync? Or is it a 'sync-p4 -whatif'? Or something else?

Before I start writing a lot of these scripts I want to make sure I name them right.

like image 870
scobi Avatar asked Dec 08 '22 07:12

scobi


1 Answers

You can find a list of common verbs on MSDN along with a description what they should be used for.

like image 190
Joey Avatar answered Dec 19 '22 04:12

Joey