我有这个:
function ImportModule(){
Import-module -Name .\Out-IniFile.ps1 -Force -Verbose -Global
Out-IniFile
}
ImportModule
Out-IniFile
在我的 Out-IniFile.ps1 我有这个:
Function Out-IniFile {
blah
blah
...
}
为什么“Out-IniFile”在我的函数中工作并让我失望:
Out-IniFile : The term 'Out-IniFile' is not recognized as the name of a cmdlet,...
外面呢?不过,我不明白我提到了 -Global 。