Issue with naming convention
PnP-PowerShell Cmdlets should follow the guidelines desribed at https://docs.microsoft.com/en-us/powershell/developer/cmdlet/approved-verbs-for-windows-powershell-commands
PS> ipmo SharePointPnPPowerShellOnline
WARNING: The names of some imported commands from the module 'SharePointPnPPowerShellOnline' 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.
Reason: The module contains some Cmdlets with Verb "Apply" which are not approved to use in PowerShell. These Cmdlets are: Apply-PnPProvisioningHierarchy, Apply-PnPProvisioningTemplate, Apply-PnPTenantTemplate. Suitable may be "Set-".
PS> ipmo SharePointPnPPowerShellOnline
3.8.1904.0
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Hi!
Try adding the switch parameter:
” -DisableNameChecking“
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/import-module
Piero
Hi Piero,
this suppresses the warning message but does not solve the issue.
The verb "Apply" is an unapproved verb.
Regards
Benjamin
I completely agree with Benjamin. Using -DisableNameChecking simply hides the issue. It also cannot be applied to #Requires -Modules directives.
@pieronegri @willemdupreez This does not solve the issue for when you have a module that has a dependency on this module. When your module loads the dependency modules, this warning is shown. There is no way to tell your module to call the load without name checking.
As of 3.13.1909.0, there is only two cmdlets now that have _Apply-_ verb. Will they accept a pull request if I update them to _Set-_, and create an alias for the _Apply-_? Aliases do not throw the warnings.
I created a pull request and made all need changes along with aliases and warnings. Everything that is required for a cmdlet rename. But... it was denied stating that they would need to make the needed changes to the module, that I actually already did. As if they didn't even review the PR changes. Just a simple dismiss and close.
Hello @erwinvanhunen
As described in the pull request #2286, you could solve this problem as follows:
Could you perform these steps to get this module standard compliant?
@rfc821 All of those are already completed within the PR... Minus the date that the command will be deprecated.
I'm not sure who could help it but it's been a year. Could we have someone gives a second look to the proposed solution that already contains an alias which will make the change backward compatible ?
Most helpful comment
I'm not sure who could help it but it's been a year. Could we have someone gives a second look to the proposed solution that already contains an alias which will make the change backward compatible ?