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