Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Invoke Powershell-script in SnapManager "run command after operation"
2010-02-04
06:09 AM
2,813 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you try:
powershell.exe -command " my code here "
You need the -command parameter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the input.
I will try it.
Markus
