The term 'AutomatedTest' is not recognized is a name of cmdlet......
but I don't know why.
But Powershell ISE works,
Function as below
if($DefaultPool.GetMachines().Name -eq $TestMachineOne)
{
MultiMachineTest
}else{
AutomatedTest
}
function AutomatedTest()
{
Write-host "test"
}