Create vs. New – Powershell approved verbs

Question:

I’m trying to abide as strictly as possible to Microsoft’s Powershell development guidelines and best practices but I am getting warnings on importing a custom module:

I couldn’t find information anywhere else but maybe someone here can tell me why is it that the word New should be used over the word Create?

In my case, the function ‘Create-iRule’ does just that, it creates an iRule.

I know someone is bound to post an answer stating: “But you are creating a ‘New-iRule‘ so that should be the name of the function!”
To those people, I’ll remind you that New isn’t a verb, whereas Create is.

So why is New on the list of approved verbs and Create outputs a warning?

Approved Verbs for Windows PowerShell Commands

Answer:

I do not have a definitive source for this, so it is speculation, but New and Add are valid verbs that existed first, and seem (I think) to cover any situation where you might use Create.

I know that when they add new verbs they try to avoid overlap with existing verbs.

From the Soliciting New Verbs post from the Windows PowerShell Blog:

To provide some context, here are the things we think about when
deciding whether to add a new verb:

  • Little or no overlap with existing approved verbs
  • Broadly applicable to multiple technologies – must be domain agnostic
  • Used consistently with similar meaning across multiple contexts
  • Pairing with an opposite is good, but not required

Source:

Create vs. New – Powershell approved verbs by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply