0
我有一个具有各种函数的模块。我最近添加了一个函数。该函数接受一个参数,处理一些数据并调用其中的另一个函数。该函数接受一个字符串数组作为参数。下面是代码:在PowerShell 2.0中需要参数的函数内调用函数
Function Get-CMClientInstall{
some code..........
Analyze-ClientInstall $clientcheck
Function Analyze-ClientInstall
{
#[CmdletBinding()]
PARAM (
[Parameter(Mandatory=$true)][string[]]$CCMClients)
}
}
以下是错误消息:
The term 'Analyze-ClientInstall' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ConfigMgrCommands\ConfigMgrCommands.psm1:475 char:34
+ Analyze-ClientInstall <<<< $clientcheck
+ CategoryInfo : ObjectNotFound: (Analyze-ClientInstall:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
可有人请指教?提前致谢。
谢谢,它工作。 – Rajiv 2013-03-13 13:47:32