When Powershell execute this line:
Add-PSSnapin SqlServerProviderSnapin100
I get this 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.
How to suppress this warning?
To truly stop getting the name warnings use -DisableNameChecking
:
import-module MyModule.psm1 -DisableNameChecking
Or as mentioned use -WarningAction SilentlyContinue
:
import-module MyModule.psm1 -WarningAction SilentlyContinue
Or if that doesn't work use the warning stream redirection such as
import-module MyModule.psm1 3>$null
The 3
is not a typo.
You could add it using -WarningAction SilentlyContinue
like the following:
Add-PSSnapin SqlServerProviderSnapin100 -WarningAction SilentlyContinue
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