我遇到一个问题Import-Module -Name "./MyAssembly.dll"
偶尔会停止工作。如果我重新启动计算机,一切似乎都会正常工作一段时间,但它真的很令人沮丧。
导入相同模块(在不同的Powershell会话中)的原因是因为我目前正在使用C#编写cmdlet,并且在调试cmdlet时启动了powershell实例。
Import-Module命令无法反馈加载是否成功。
PS C:\Source\MyProject> Import-Module -Name "./MyAssembly.dll"
PS C:\Source\MyProject> Get-Stuffz
Get-Stuffz : The term 'Get-Stuffz' is not recognized as the name of a cmdlet, function, script file, or ope
rable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again
.
At line:1 char:1
+ Get-Stuffz
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-Stuffz:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
欢迎任何帮助或建议。