Hi all,
on my srm server I am executing the following command as a post power on script
c:\windows\system32\cmd.exe /c c:\contentchange\drcontent.bat
on the srm server i have script drcontent which contains
@ech off
c:\contentchange\psexec -i -s /accepteula
10.0.1.62 -u administrator -p password c:\scripts\dr.bat
exit 0
I extractes psexec in the contentchange directory ofcourse
The script finnishes but it is not executed on the virtual machine
When I check the logs I see the following
Success: "
PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
The handle is invalid.
Connecting to 10.0.1.62...
Couldn't access 10.0.1.62:
Connecting to 10.0.1.62...
If I run the script manually while the test plan runs, it executes succesfully. I have tried a million things (I even gave the everyone user full access to the directory,psexec and the script but nothing works
Anyone?
Are you changing IP addresses on the VM? Is it possible that the script is trying to connect before the IP address changes? Are you adding two backslashes before the vm IP (
10.0.1.62)? You are passing credentials and also passing "-s" to run as system account, tried removing -s?
Have you looked into using PowerCLI on the SRM server to invoke the script you are trying to call on the recovery VM? You can use the invoke-vmscript cmdlet and avoid network connectivity issues. Of course you will need to load powershell and powercli on the SRM server.
My problem with using tools like psexec was that I wanted to avoid being dependant on network connectivity during the recovery process and powercli fixed that for me.
i did the backslashes. I'm not sure anymore that i tried without the -s but I'm trying it now
removing the -s does not help
Try to remove the "-i" (interactive mode) switch.
tried it is as well, didn't work . Thanks anyways guys
Not sure though. Can you try "c:
scripts
dr.bat" instead of "c:\scripts\dr.bat". Sometimes Path issues occurs even though permission granted.