在章鱼中使用我自己的Powershell脚本模块,章鱼警告说
WARNING: Some imported command names contain one or more of the following restricted characters: # , ( ) {{ }} [ ] & - / \ $ ^ ; : " ' < > | ? @ ` * % + = ~
Run Code Online (Sandbox Code Playgroud)
脚本模块如下所示
function complete-iis-config($poolAndSitenameFilter)
{
# do stuff
}
export-modulemember -function complete-iis-config
Run Code Online (Sandbox Code Playgroud)
这是因为我两次使用了连字符。在Verb-NounPowerShell的方针意味着应该只有一个连字符。
重命名我的功能以Complete-IisConfig清除警告