pnp / powershell

PnP PowerShell
https://pnp.github.io/powershell
MIT License
682 stars 348 forks source link

[FEATURE] Cleanup PnP PowerShell cmdlets naming: `verb-component-noun` #3144

Closed schittli closed 1 year ago

schittli commented 1 year ago

Is your feature request related to a problem? Please describe.

To summarize: It is extremely unfortunate, the project has failed to structure the cmdlets names from the beginning.

Describe the solution you'd like

It's a shame that a Microsoft(!) PowerShell(!) developer group didn't understand, or worse, ignored the ingenious concept of cmdlets naming. Therefore, please:

  1. Please structure each PnP PowerShell cmdlets name according to the very useful and common scheme: verb-component-noun. Example: Add-PnPListDesign » Add-SPO-ListDesign Add-PnPAzureADGroupMember » Add-AAD-GroupMember

    If the user would like to have a PnP prefix, then he can use the PowerShell standard feature: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/import-module?view=powershell-7.3#example-6-import-the-members-of-a-module-and-add-a-prefix

  2. To maintain backward compatibility, please rename each PnP PowerShell cmdlet to the well-structured name and add the old name as an alias.

With this concept,

Thanks a lot, kind regards, Thomas

Describe alternatives you've considered None

Additional context None

veronicageek commented 1 year ago

@schittli

It's a shame that a Microsoft(!) PowerShell(!) developer group didn't understand, or worse, ignored the ingenious concept of cmdlets naming

This module is community driven since the beginning of times, and Microsoft has nothing to do with it.

Please structure each PnP PowerShell cmdlets name according to the very useful and common scheme: verb-component-noun

No module in the PowerShell world uses this format. But Microsoft provides a description as to why cmdlets are the way they are: "PowerShell uses a verb-noun pair for the names of cmdlets and for their derived .NET classes"

https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands?view=powershell-7.3

Because the primary focus of the PnP PowerShell was SharePoint at its creation, there's no need to have a "SP" or "SPO" prefix (the latter would actually conflict with the SPO Management Shell module from Microsoft).

All other cmdlets are using the workstream in them: AzureAD, Teams, Planner, etc...

If you want to find all the cmdlets related to Azure AD: gcm -Module pnp.powershell | ? {$_.Name -like "*AzureAD*"}

If you want to find all the cmdlets related to Microsoft Teams: gcm -Module pnp.powershell | ? {$_.Name -like "*Teams*"}

so the PnP PowerShell cmdlets are likely to become much more popular, and your elaborate, great work would get the attention it deserves.

I think the module does OK...

Closing the issue.