I am getting the below error when i call the method in PowerShell. Any help would be thankful very much.
Error:
Error in The term 'Test' 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.
Code
Try
{
Test
}
Catch
{
$ErrorMessage = $_.Exception.Message
Write-Host "Error in"
Write-Host $ErrorMessage
}
function Test()
{
Write-Host "Test Method Called"
}