Data Backup and Recovery Discussions

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

mheimberg

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

2 REPLIES 2

bsti

Did you try:

powershell.exe -command "  my code here "

You need the -command parameter.

mheimberg

Thanks for the input.

I will try it.

Markus

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public