waldo1001 / Cloud.Ready.Software.PowerShell

waldo's PowerShell Scripts & Modules
http://www.waldo.be
85 stars 94 forks source link

Use of Unapproved Verbs #54

Open MarkNavGS opened 6 years ago

MarkNavGS commented 6 years ago

Do you have plans to address this?

WARNING: The names of some imported commands from the module 'Cloud.Ready.Software.Windows' 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.

waldo1001 commented 6 years ago

I wasn't planning to address this, actually. You think it's necessary?

jhoek commented 5 years ago

I would argue that it is. What you could do in order not to break scripts that use your module is give the cmdlets a proper name with an approved verb, and specify the old name as an alias.

Alternatively, give the cmdlets a proper name with an approved verb, and lets your users create their aliases locally?

waldo1001 commented 5 years ago

Hm, that's actually a good idea... I'll experiment with that

waldo1001 commented 5 years ago

... when I find the time ... ;-)

nickrobbo commented 5 years ago

Is this planned to be fixed in the future? I understand it is probably quite a low priority. I am using the "Import-NAVModules" function quite a lot in my scripts and it would be nice to suppress the warnings, even if it is just for this function.

jhoek commented 5 years ago

@nickrobbo ImportModule does have a -DisableNameChecking parameter... ;-)

nickrobbo commented 5 years ago

@jhoek yes this works with Import-Module, but not with the command I am using:

"Import-NAVModules" - "PSModules/Cloud.Ready.Software.NAV/Import-NAVModules.ps1"

although I can see that this parameter is used within the function, so I am not sure why this happens.

jhoek commented 5 years ago

@nickrobbo I see. :-)