Hello
I am new to powerscript - so the answer to my question is probably something simple I am overlooking.
I am attempting to create a function just for testing purposes so that I can play around with how that process works. I can do it in the console without issue just by typing this in
function script:testecho {echo this is a functional test of echo}
calling it by typing in testecho produces the expected result
PS C:\powershell\batch> testecho
this
is
a
functional
test
of
echo
however, putting the same thing in a script does not perform as expected
cls
C:\powershell\batch>Function script:testecho {echo this is a test of the echo function}
‘Function’ is not recognized as an internal or external command,
operable program or batch file.
C:\powershell\batch>pause
Press any key to continue . . .
C:\powershell\batch>testecho
‘testecho’ is not recognized as an internal or external command,
operable program or batch file.
C:\powershell\batch>pause
Press any key to continue . . .
I am sure I am doing something simple wrong.
Can someone tell me what it is?
thanks
Brent