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:
WARNING: The names of some imported commands from the module 'F5Helper' include unapproved verbs that might make them less discoverable.
To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
VERBOSE: The 'Create-iRule' command in the F5Helper' module was imported, but because its name does not include an approved verb, it might be difficult to find.
The suggested alternative verbs are "New".
VERBOSE: Importing function 'Create-iRule'.
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
All cmdlets must used approved verbs. Approved verbs can be found by running the command Get-Verb. Additional documentation on approved verbs can be found in the microsoft docs page Approved Verbs for PowerShell Commands . Some unapproved verbs are documented on the approved verbs page and point to approved alternatives.
Use one of the predefined verb names provided by PowerShell Use the verb to describe the general scope of the action, and use parameters to further refine the action of the cmdlet. Do not use a synonym of an approved verb. For example, always use Remove, never use Deleteor Eliminate. Use only the form of each verb that is listed in this topic.
Approved verbs can be found by running the command Get-Verb. Additional documentation on approved verbs can be found in the microsoft docs page Approved Verbs for PowerShell Commands . Some unapproved verbs are documented on the approved verbs page and point to approved alternatives.
Use the Read verb to open a resource and either extract information contained within. Use the Invoke verb to perform synchronous operations, such as running a command and waiting for it to end. Use the Start verb to begin asynchronous operations, such as starting an autonomous process. Use the Test verb.
According to Microsoft:
PowerShell uses the term verb to describe a word that implies an action even if that word is not a standard verb in the English language. For example, the term New is a valid PowerShell verb name because it implies an action even though it is not a verb in the English language.
https://docs.microsoft.com/en-us/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With