If I execute remotely from share a script which contain :
echolog : The term 'echolog' 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.
$_Day=Get-Date -f yyyy/MM/dd
$_Hour=Get-Date -f HH:mm:ss
Write-Host ("###LOG###;" + $_Day + " " + $_Hour + " :: " + $_Message)
Write-Host "$_ScriptName - $_Day $_Hour :: LOG :: $_Message";
$_ScriptName + " - " + $_Day + " " + $_Hour + " :: LOG :: " + $_Message | Out-File $_LogFile -append;
echolog("Create database $Db (SQLServer : $SQLS)")
The following error is returned but not if I execute the script locally, why ?
'echolog' is not recognized as the name of a cmdlet