0

I have a powershell script that takes an input parameter (int). the script then updates the status of the service based on this input parameter. I have been working on this task using the powergui editor .

Screencap from powergui window

enter image description here

enter image description here

Whenever I try to run the script from the command line of powershell file, there is nothing that's being reported by powershell . No output .. nothing.
Screencap from powershell window

enter image description here Can you please let me know what might be happening here.

Thanks

Gagan
  • 5,416
  • 13
  • 58
  • 86
  • This is the answer to my question http://stackoverflow.com/questions/6016436/in-powershell-how-do-i-define-a-function-in-a-file-and-call-it-from-the-powersh – Gagan Sep 26 '12 at 18:43

1 Answers1

0

Maybe you called the programm services.exe from the command line. You might try to rename your function.

You might know the following allready, but did you parse your powershell script before you called your function? This is nessesary to include your function into the shell. You have to invoke D:\ps>.\myScript.ps before you can use the function.

TimPe
  • 44
  • 3