Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable the warning about unapproved verbs when importing modules?

Tags:

powershell

When importing a module with Import-Module I get the following warning:

WARNING: Some imported command names include unapproved verbs which might make them less discoverable. Use the Verbose parameter for more detail or type Get-Verb to see the list of approved verbs.

How can I disable it?

like image 867
Micha Wiedenmann Avatar asked Dec 20 '18 15:12

Micha Wiedenmann


1 Answers

Use -DisableNameChecking as in

Import-Module -DisableNameChecking

Quoting the Import-Module documentation:

-DisableNameChecking

Indicates that this cmdlet suppresses the message that warns you when you import a cmdlet or function whose name includes an unapproved verb or a prohibited character.

By default, when a module that you import exports cmdlets or functions that have unapproved verbs in their names, PowerShell displays the following warning message:

"WARNING: Some imported command names include unapproved verbs which might make them less discoverable. Use the Verbose parameter for more detail or type Get-Verb to see the list of approved verbs."

This message is only a warning. The complete module is still imported, including the non-conforming commands. Although the message is displayed to module users, the naming problem should be fixed by the module author.

like image 171
Micha Wiedenmann Avatar answered Oct 15 '22 20:10

Micha Wiedenmann