Skip to content

Problems installilng nishang on Win10

Michael Hart edited this page Jul 3, 2022 · 1 revision

If you receive an error message when trying the following command

Import-Module .\nishang.psm1

Import-Module : Cannot bind argument to parameter 'Name' because it is an empty array. At line:1 char:1 + Import-Module -DisableNameChecking _+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~_ + CategoryInfo : InvalidData: (:) [Import-Module], ParameterBindingValidationExcep tion + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyArrayNotAllowed,Microsoft.Po werShell.Commands.ImportModuleCommand

Try the following:

(Note: Be careful running commands you are unfamiliar with! Consider reading through the Microsoft documentation before running this command. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2)

Set-ExecutionPolicy Unrestricted

Choose a (for all)

At this point, if you were to re-run the command above (Import-Module .\nishang.psm1), you would likely still receive an error message of:

WARNING: The names of some imported commands from the module 'nishang' 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. WARNING: Some imported command names contain one or more of the following restricted characters: _# , ( ) {{ }} [ ] & - / \ $ ^ ; : " ' < > | ? @ ` * % + = ~_

If you do see that error message, try the following:

Import-Module -DisableNameChecking .\nishang.psm1

Clone this wiki locally