I am trying to run a powershell script with SRM to kick off the storage replication. The command runs in SRM before the step to Prepare Storage. It's a powershell script, and when you run the command to start the script you add the argument of the VM in the SRM plan. For instance, this is how I would kick off the script:
C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe c:\SRM\UpdateSnapmirror.ps1 stl-vtestsrm
When I run this command manually from the SRM server, it works fine, however, when I enter this in SRM GUI, nothing happens. I've also tried kicking this off via a batch file as well with "C:\Windows\System32\cmd.exe c:\SRM\kickoffUpdateMirror.bat" and still nothing seems to happen on the SRM server. Even with this option, I can manually run it from the SRM server and it runs fine, however, when ran from within SRM--nothing happens.
The SRM Server is running Windows 2008 R2 Enterprise. I have verified that the firewall is not running...can't think of anything that would be blocking this script to run--or I've just missed something obvious.
I'm at a loss...
Thanks
Joe Schwartz
Hi,
1. Have a look on the following article:
2. What do you mean by "nothing happens"? Do you get an error?
3. The commands are executed under the credentials of SRM service user (usually LocalSystem). You can use psexec to run the command manually with LocalSystem user and see what happens.
Michael.
FYI -- What I ended up doing was changing the SRM Service to run as the service account. That way the scripts were kicked off with the correct permissions.