Subscribe

Invoke Powershell-script in SnapManager "run command after operation"

Hi all

I intend to run a little Powershell script after the Snapmanager job - like we all know, there is that checkbox "run command after operation" to call an external program or script.


But pointing to my script triggers no action.

At a second look, this is not surprising much: also when calling it from a DOS-box the syntax is "powershell <path-to-script>".

So I tried pointing to the powershell.exe in %systempath%\windowspowershell\v1.0\ and specify the path to my script as parameter.

But adding the parameter in the line "Specify full path to the program...." together with the powershell.exe-path generates an error "invalid location".

Adding the parameter into the field "Command arguments" results in the error "Invalid command arguments: Unable to find the matched SnapManager variables."

So: anyone got an idea how to invoke a powershell-script in a SnapManager job?

THX

Markus

Re: Invoke Powershell-script in SnapManager "run command after operation"

Did you try:

powershell.exe -command "  my code here "

You need the -command parameter.

Re: Invoke Powershell-script in SnapManager "run command after operation"

Thanks for the input.

I will try it.

Markus